2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.dmaap.mr.cambria.backends.kafka;
23 import java.util.concurrent.TimeUnit;
25 import org.apache.curator.CuratorZookeeperClient;
26 import org.apache.curator.framework.CuratorFramework;
27 import org.apache.curator.framework.WatcherRemoveCuratorFramework;
28 import org.apache.curator.framework.api.CreateBuilder;
29 import org.apache.curator.framework.api.CuratorListener;
30 import org.apache.curator.framework.api.DeleteBuilder;
31 import org.apache.curator.framework.api.ExistsBuilder;
32 import org.apache.curator.framework.api.GetACLBuilder;
33 import org.apache.curator.framework.api.GetChildrenBuilder;
34 import org.apache.curator.framework.api.GetConfigBuilder;
35 import org.apache.curator.framework.api.GetDataBuilder;
36 import org.apache.curator.framework.api.ReconfigBuilder;
37 import org.apache.curator.framework.api.RemoveWatchesBuilder;
38 import org.apache.curator.framework.api.SetACLBuilder;
39 import org.apache.curator.framework.api.SetDataBuilder;
40 import org.apache.curator.framework.api.SyncBuilder;
41 import org.apache.curator.framework.api.UnhandledErrorListener;
42 import org.apache.curator.framework.api.transaction.CuratorMultiTransaction;
43 import org.apache.curator.framework.api.transaction.CuratorTransaction;
44 import org.apache.curator.framework.api.transaction.TransactionOp;
45 import org.apache.curator.framework.imps.CuratorFrameworkState;
46 import org.apache.curator.framework.listen.Listenable;
47 import org.apache.curator.framework.schema.SchemaSet;
48 import org.apache.curator.framework.state.ConnectionStateErrorPolicy;
49 import org.apache.curator.framework.state.ConnectionStateListener;
50 import org.apache.curator.utils.EnsurePath;
51 import org.apache.zookeeper.Watcher;
52 import org.apache.zookeeper.server.quorum.flexible.QuorumVerifier;
54 public class CuratorFrameworkImpl implements CuratorFramework {
57 public void blockUntilConnected() throws InterruptedException {
58 // TODO Auto-generated method stub
63 public boolean blockUntilConnected(int arg0, TimeUnit arg1) throws InterruptedException {
64 // TODO Auto-generated method stub
69 public ExistsBuilder checkExists() {
70 // TODO Auto-generated method stub
75 public void clearWatcherReferences(Watcher arg0) {
76 // TODO Auto-generated method stub
82 // TODO Auto-generated method stub
87 public CreateBuilder create() {
88 // TODO Auto-generated method stub
93 public DeleteBuilder delete() {
94 // TODO Auto-generated method stub
99 public GetACLBuilder getACL() {
100 // TODO Auto-generated method stub
105 public GetChildrenBuilder getChildren() {
106 // TODO Auto-generated method stub
111 public Listenable<ConnectionStateListener> getConnectionStateListenable() {
112 // TODO Auto-generated method stub
117 public Listenable<CuratorListener> getCuratorListenable() {
118 // TODO Auto-generated method stub
123 public GetDataBuilder getData() {
124 // TODO Auto-generated method stub
129 public String getNamespace() {
130 // TODO Auto-generated method stub
135 public CuratorFrameworkState getState() {
136 // TODO Auto-generated method stub
141 public Listenable<UnhandledErrorListener> getUnhandledErrorListenable() {
142 // TODO Auto-generated method stub
147 public CuratorZookeeperClient getZookeeperClient() {
148 // TODO Auto-generated method stub
153 public CuratorTransaction inTransaction() {
154 // TODO Auto-generated method stub
159 public boolean isStarted() {
160 // TODO Auto-generated method stub
165 public EnsurePath newNamespaceAwareEnsurePath(String arg0) {
166 // TODO Auto-generated method stub
171 public CuratorFramework nonNamespaceView() {
172 // TODO Auto-generated method stub
177 public SetACLBuilder setACL() {
178 // TODO Auto-generated method stub
183 public SetDataBuilder setData() {
184 // TODO Auto-generated method stub
189 public void start() {
190 // TODO Auto-generated method stub
195 public SyncBuilder sync() {
196 // TODO Auto-generated method stub
201 public void sync(String arg0, Object arg1) {
202 // TODO Auto-generated method stub
207 public CuratorFramework usingNamespace(String arg0) {
208 // TODO Auto-generated method stub
213 public ReconfigBuilder reconfig() {
214 // TODO Auto-generated method stub
219 public GetConfigBuilder getConfig() {
220 // TODO Auto-generated method stub
225 public CuratorMultiTransaction transaction() {
226 // TODO Auto-generated method stub
231 public TransactionOp transactionOp() {
232 // TODO Auto-generated method stub
237 public void createContainers(String path) throws Exception {
238 // TODO Auto-generated method stub
243 public RemoveWatchesBuilder watches() {
244 // TODO Auto-generated method stub
249 public WatcherRemoveCuratorFramework newWatcherRemoveCuratorFramework() {
250 // TODO Auto-generated method stub
255 public ConnectionStateErrorPolicy getConnectionStateErrorPolicy() {
256 // TODO Auto-generated method stub
261 public QuorumVerifier getCurrentConfig() {
262 // TODO Auto-generated method stub
267 public SchemaSet getSchemaSet() {
268 // TODO Auto-generated method stub
273 public boolean isZk34CompatibilityMode() {
274 // TODO Auto-generated method stub