98dfd6966190026708d0f75a744f490ef1e35af0
[policy/apex-pdp.git] / testsuites / integration / integration-context-test / src / test / java / org / onap / policy / apex / testsuites / integration / context / utils / ConfigrationProvider.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2018 Ericsson. All rights reserved.
4  *  Modifications Copyright (C) 2019 Nordix Foundation.
5  * ================================================================================
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *      http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * SPDX-License-Identifier: Apache-2.0
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.onap.policy.apex.testsuites.integration.context.utils;
23
24 import java.util.Map;
25 import java.util.concurrent.ExecutorService;
26
27 import org.onap.policy.apex.context.ContextAlbum;
28 import org.onap.policy.apex.context.ContextException;
29 import org.onap.policy.apex.context.Distributor;
30 import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
31 import org.onap.policy.apex.testsuites.integration.context.lock.modifier.AlbumModifier;
32 import org.onap.policy.apex.testsuites.integration.context.lock.modifier.LockType;
33
34 /**
35  * The Interface ConfigrationProvider provides the configuration for a context test to a context test executor.
36  */
37 public interface ConfigrationProvider {
38
39     /**
40      * Gets the test name.
41      *
42      * @return the test name
43      */
44     String getTestName();
45
46     /**
47      * Gets the loop size.
48      *
49      * @return the loop size
50      */
51     int getLoopSize();
52
53     /**
54      * Gets the thread count.
55      *
56      * @return the thread count
57      */
58     int getThreadCount();
59
60     /**
61      * Gets the jvm count.
62      *
63      * @return the jvm count
64      */
65     int getJvmCount();
66
67     /**
68      * Gets the album size.
69      *
70      * @return the album size
71      */
72     int getAlbumSize();
73
74     /**
75      * Gets the executor service.
76      *
77      * @return the executor service
78      */
79     ExecutorService getExecutorService();
80
81     /**
82      * Gets the executor service.
83      *
84      * @param threadFactoryName the thread factory name
85      * @param threadPoolSize the thread pool size
86      * @return the executor service
87      */
88     ExecutorService getExecutorService(final String threadFactoryName, final int threadPoolSize);
89
90     /**
91      * Gets the distributor.
92      *
93      * @param key the key
94      * @return the distributor
95      */
96     Distributor getDistributor(final AxArtifactKey key);
97
98     /**
99      * Gets the distributor.
100      *
101      * @return the distributor
102      */
103     Distributor getDistributor();
104
105     /**
106      * Gets the context album.
107      *
108      * @param distributor the distributor
109      * @return the context album
110      */
111     ContextAlbum getContextAlbum(final Distributor distributor);
112
113     /**
114      * Gets the context album.
115      *
116      * @param distributor the distributor
117      * @param axContextAlbumKey the ax context album key
118      * @param artifactKeys the artifact keys
119      * @return the context album
120      * @throws ContextException the context exception
121      */
122     ContextAlbum getContextAlbum(final Distributor distributor, AxArtifactKey axContextAlbumKey,
123                     AxArtifactKey[] artifactKeys) throws ContextException;
124
125     /**
126      * Gets the context album init values.
127      *
128      * @return the context album init values
129      */
130     Map<String, Object> getContextAlbumInitValues();
131
132     /**
133      * Gets the album modifier.
134      *
135      * @return the album modifier
136      */
137     AlbumModifier getAlbumModifier();
138
139     /**
140      * Gets the lock type.
141      *
142      * @return the lock type
143      */
144     LockType getLockType();
145
146 }