http://git-wip-us.apache.org/repos/asf/curator/blob/95b70d2b/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorService.java ---------------------------------------------------------------------- diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorService.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorService.java deleted file mode 100644 index 63d46ee..0000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorService.java +++ /dev/null @@ -1,24123 +0,0 @@ -/** - * Autogenerated by Thrift Compiler (0.9.1) - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package org.apache.curator.generated; - -import org.apache.thrift.scheme.IScheme; -import org.apache.thrift.scheme.SchemeFactory; -import org.apache.thrift.scheme.StandardScheme; - -import org.apache.thrift.scheme.TupleScheme; -import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; -import org.apache.thrift.EncodingUtils; -import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; -import java.util.EnumSet; -import java.util.Collections; -import java.util.BitSet; -import java.nio.ByteBuffer; -import java.util.Arrays; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class CuratorService { - - public interface Iface { - - public OptionalLockProjection acquireLock(CuratorProjection projection, String path, int maxWaitMs) throws CuratorException, org.apache.thrift.TException; - - public List<LeaseProjection> acquireSemaphore(CuratorProjection projection, String path, int acquireQty, int maxWaitMs, int maxLeases) throws CuratorException, org.apache.thrift.TException; - - public void closeCuratorProjection(CuratorProjection projection) throws org.apache.thrift.TException; - - public boolean closeGenericProjection(CuratorProjection projection, String id) throws CuratorException, org.apache.thrift.TException; - - public OptionalPath createNode(CuratorProjection projection, CreateSpec spec) throws CuratorException, org.apache.thrift.TException; - - public void deleteNode(CuratorProjection projection, DeleteSpec spec) throws CuratorException, org.apache.thrift.TException; - - public OptionalStat exists(CuratorProjection projection, ExistsSpec spec) throws CuratorException, org.apache.thrift.TException; - - public OptionalChildrenList getChildren(CuratorProjection projection, GetChildrenSpec spec) throws CuratorException, org.apache.thrift.TException; - - public OptionalData getData(CuratorProjection projection, GetDataSpec spec) throws CuratorException, org.apache.thrift.TException; - - public List<Participant> getLeaderParticipants(CuratorProjection projection, LeaderProjection leaderProjection) throws CuratorException, org.apache.thrift.TException; - - public ChildData getNodeCacheData(CuratorProjection projection, NodeCacheProjection cacheProjection) throws CuratorException, org.apache.thrift.TException; - - public List<ChildData> getPathChildrenCacheData(CuratorProjection projection, PathChildrenCacheProjection cacheProjection) throws CuratorException, org.apache.thrift.TException; - - public ChildData getPathChildrenCacheDataForPath(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, String path) throws CuratorException, org.apache.thrift.TException; - - public boolean isLeader(CuratorProjection projection, LeaderProjection leaderProjection) throws CuratorException, org.apache.thrift.TException; - - public CuratorProjection newCuratorProjection(String connectionName) throws CuratorException, org.apache.thrift.TException; - - public void pingCuratorProjection(CuratorProjection projection) throws org.apache.thrift.TException; - - public OptionalStat setData(CuratorProjection projection, SetDataSpec spec) throws CuratorException, org.apache.thrift.TException; - - public LeaderResult startLeaderSelector(CuratorProjection projection, String path, String participantId, int waitForLeadershipMs) throws CuratorException, org.apache.thrift.TException; - - public NodeCacheProjection startNodeCache(CuratorProjection projection, String path, boolean dataIsCompressed, boolean buildInitial) throws CuratorException, org.apache.thrift.TException; - - public PathChildrenCacheProjection startPathChildrenCache(CuratorProjection projection, String path, boolean cacheData, boolean dataIsCompressed, PathChildrenCacheStartMode startMode) throws CuratorException, org.apache.thrift.TException; - - public PersistentEphemeralNodeProjection startPersistentEphemeralNode(CuratorProjection projection, String path, ByteBuffer data, PersistentEphemeralNodeMode mode) throws CuratorException, org.apache.thrift.TException; - - public void sync(CuratorProjection projection, String path, String asyncContext) throws CuratorException, org.apache.thrift.TException; - - } - - public interface AsyncIface { - - public void acquireLock(CuratorProjection projection, String path, int maxWaitMs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void acquireSemaphore(CuratorProjection projection, String path, int acquireQty, int maxWaitMs, int maxLeases, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void closeCuratorProjection(CuratorProjection projection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void closeGenericProjection(CuratorProjection projection, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void createNode(CuratorProjection projection, CreateSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void deleteNode(CuratorProjection projection, DeleteSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void exists(CuratorProjection projection, ExistsSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void getChildren(CuratorProjection projection, GetChildrenSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void getData(CuratorProjection projection, GetDataSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void getLeaderParticipants(CuratorProjection projection, LeaderProjection leaderProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void getNodeCacheData(CuratorProjection projection, NodeCacheProjection cacheProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void getPathChildrenCacheData(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void getPathChildrenCacheDataForPath(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void isLeader(CuratorProjection projection, LeaderProjection leaderProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void newCuratorProjection(String connectionName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void pingCuratorProjection(CuratorProjection projection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void setData(CuratorProjection projection, SetDataSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void startLeaderSelector(CuratorProjection projection, String path, String participantId, int waitForLeadershipMs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void startNodeCache(CuratorProjection projection, String path, boolean dataIsCompressed, boolean buildInitial, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void startPathChildrenCache(CuratorProjection projection, String path, boolean cacheData, boolean dataIsCompressed, PathChildrenCacheStartMode startMode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void startPersistentEphemeralNode(CuratorProjection projection, String path, ByteBuffer data, PersistentEphemeralNodeMode mode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void sync(CuratorProjection projection, String path, String asyncContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - } - - public static class Client extends org.apache.thrift.TServiceClient implements Iface { - public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> { - public Factory() {} - public Client getClient(org.apache.thrift.protocol.TProtocol prot) { - return new Client(prot); - } - public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { - return new Client(iprot, oprot); - } - } - - public Client(org.apache.thrift.protocol.TProtocol prot) - { - super(prot, prot); - } - - public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { - super(iprot, oprot); - } - - public OptionalLockProjection acquireLock(CuratorProjection projection, String path, int maxWaitMs) throws CuratorException, org.apache.thrift.TException - { - send_acquireLock(projection, path, maxWaitMs); - return recv_acquireLock(); - } - - public void send_acquireLock(CuratorProjection projection, String path, int maxWaitMs) throws org.apache.thrift.TException - { - acquireLock_args args = new acquireLock_args(); - args.setProjection(projection); - args.setPath(path); - args.setMaxWaitMs(maxWaitMs); - sendBase("acquireLock", args); - } - - public OptionalLockProjection recv_acquireLock() throws CuratorException, org.apache.thrift.TException - { - acquireLock_result result = new acquireLock_result(); - receiveBase(result, "acquireLock"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "acquireLock failed: unknown result"); - } - - public List<LeaseProjection> acquireSemaphore(CuratorProjection projection, String path, int acquireQty, int maxWaitMs, int maxLeases) throws CuratorException, org.apache.thrift.TException - { - send_acquireSemaphore(projection, path, acquireQty, maxWaitMs, maxLeases); - return recv_acquireSemaphore(); - } - - public void send_acquireSemaphore(CuratorProjection projection, String path, int acquireQty, int maxWaitMs, int maxLeases) throws org.apache.thrift.TException - { - acquireSemaphore_args args = new acquireSemaphore_args(); - args.setProjection(projection); - args.setPath(path); - args.setAcquireQty(acquireQty); - args.setMaxWaitMs(maxWaitMs); - args.setMaxLeases(maxLeases); - sendBase("acquireSemaphore", args); - } - - public List<LeaseProjection> recv_acquireSemaphore() throws CuratorException, org.apache.thrift.TException - { - acquireSemaphore_result result = new acquireSemaphore_result(); - receiveBase(result, "acquireSemaphore"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "acquireSemaphore failed: unknown result"); - } - - public void closeCuratorProjection(CuratorProjection projection) throws org.apache.thrift.TException - { - send_closeCuratorProjection(projection); - recv_closeCuratorProjection(); - } - - public void send_closeCuratorProjection(CuratorProjection projection) throws org.apache.thrift.TException - { - closeCuratorProjection_args args = new closeCuratorProjection_args(); - args.setProjection(projection); - sendBase("closeCuratorProjection", args); - } - - public void recv_closeCuratorProjection() throws org.apache.thrift.TException - { - closeCuratorProjection_result result = new closeCuratorProjection_result(); - receiveBase(result, "closeCuratorProjection"); - return; - } - - public boolean closeGenericProjection(CuratorProjection projection, String id) throws CuratorException, org.apache.thrift.TException - { - send_closeGenericProjection(projection, id); - return recv_closeGenericProjection(); - } - - public void send_closeGenericProjection(CuratorProjection projection, String id) throws org.apache.thrift.TException - { - closeGenericProjection_args args = new closeGenericProjection_args(); - args.setProjection(projection); - args.setId(id); - sendBase("closeGenericProjection", args); - } - - public boolean recv_closeGenericProjection() throws CuratorException, org.apache.thrift.TException - { - closeGenericProjection_result result = new closeGenericProjection_result(); - receiveBase(result, "closeGenericProjection"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "closeGenericProjection failed: unknown result"); - } - - public OptionalPath createNode(CuratorProjection projection, CreateSpec spec) throws CuratorException, org.apache.thrift.TException - { - send_createNode(projection, spec); - return recv_createNode(); - } - - public void send_createNode(CuratorProjection projection, CreateSpec spec) throws org.apache.thrift.TException - { - createNode_args args = new createNode_args(); - args.setProjection(projection); - args.setSpec(spec); - sendBase("createNode", args); - } - - public OptionalPath recv_createNode() throws CuratorException, org.apache.thrift.TException - { - createNode_result result = new createNode_result(); - receiveBase(result, "createNode"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createNode failed: unknown result"); - } - - public void deleteNode(CuratorProjection projection, DeleteSpec spec) throws CuratorException, org.apache.thrift.TException - { - send_deleteNode(projection, spec); - recv_deleteNode(); - } - - public void send_deleteNode(CuratorProjection projection, DeleteSpec spec) throws org.apache.thrift.TException - { - deleteNode_args args = new deleteNode_args(); - args.setProjection(projection); - args.setSpec(spec); - sendBase("deleteNode", args); - } - - public void recv_deleteNode() throws CuratorException, org.apache.thrift.TException - { - deleteNode_result result = new deleteNode_result(); - receiveBase(result, "deleteNode"); - if (result.ex1 != null) { - throw result.ex1; - } - return; - } - - public OptionalStat exists(CuratorProjection projection, ExistsSpec spec) throws CuratorException, org.apache.thrift.TException - { - send_exists(projection, spec); - return recv_exists(); - } - - public void send_exists(CuratorProjection projection, ExistsSpec spec) throws org.apache.thrift.TException - { - exists_args args = new exists_args(); - args.setProjection(projection); - args.setSpec(spec); - sendBase("exists", args); - } - - public OptionalStat recv_exists() throws CuratorException, org.apache.thrift.TException - { - exists_result result = new exists_result(); - receiveBase(result, "exists"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "exists failed: unknown result"); - } - - public OptionalChildrenList getChildren(CuratorProjection projection, GetChildrenSpec spec) throws CuratorException, org.apache.thrift.TException - { - send_getChildren(projection, spec); - return recv_getChildren(); - } - - public void send_getChildren(CuratorProjection projection, GetChildrenSpec spec) throws org.apache.thrift.TException - { - getChildren_args args = new getChildren_args(); - args.setProjection(projection); - args.setSpec(spec); - sendBase("getChildren", args); - } - - public OptionalChildrenList recv_getChildren() throws CuratorException, org.apache.thrift.TException - { - getChildren_result result = new getChildren_result(); - receiveBase(result, "getChildren"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getChildren failed: unknown result"); - } - - public OptionalData getData(CuratorProjection projection, GetDataSpec spec) throws CuratorException, org.apache.thrift.TException - { - send_getData(projection, spec); - return recv_getData(); - } - - public void send_getData(CuratorProjection projection, GetDataSpec spec) throws org.apache.thrift.TException - { - getData_args args = new getData_args(); - args.setProjection(projection); - args.setSpec(spec); - sendBase("getData", args); - } - - public OptionalData recv_getData() throws CuratorException, org.apache.thrift.TException - { - getData_result result = new getData_result(); - receiveBase(result, "getData"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getData failed: unknown result"); - } - - public List<Participant> getLeaderParticipants(CuratorProjection projection, LeaderProjection leaderProjection) throws CuratorException, org.apache.thrift.TException - { - send_getLeaderParticipants(projection, leaderProjection); - return recv_getLeaderParticipants(); - } - - public void send_getLeaderParticipants(CuratorProjection projection, LeaderProjection leaderProjection) throws org.apache.thrift.TException - { - getLeaderParticipants_args args = new getLeaderParticipants_args(); - args.setProjection(projection); - args.setLeaderProjection(leaderProjection); - sendBase("getLeaderParticipants", args); - } - - public List<Participant> recv_getLeaderParticipants() throws CuratorException, org.apache.thrift.TException - { - getLeaderParticipants_result result = new getLeaderParticipants_result(); - receiveBase(result, "getLeaderParticipants"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLeaderParticipants failed: unknown result"); - } - - public ChildData getNodeCacheData(CuratorProjection projection, NodeCacheProjection cacheProjection) throws CuratorException, org.apache.thrift.TException - { - send_getNodeCacheData(projection, cacheProjection); - return recv_getNodeCacheData(); - } - - public void send_getNodeCacheData(CuratorProjection projection, NodeCacheProjection cacheProjection) throws org.apache.thrift.TException - { - getNodeCacheData_args args = new getNodeCacheData_args(); - args.setProjection(projection); - args.setCacheProjection(cacheProjection); - sendBase("getNodeCacheData", args); - } - - public ChildData recv_getNodeCacheData() throws CuratorException, org.apache.thrift.TException - { - getNodeCacheData_result result = new getNodeCacheData_result(); - receiveBase(result, "getNodeCacheData"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNodeCacheData failed: unknown result"); - } - - public List<ChildData> getPathChildrenCacheData(CuratorProjection projection, PathChildrenCacheProjection cacheProjection) throws CuratorException, org.apache.thrift.TException - { - send_getPathChildrenCacheData(projection, cacheProjection); - return recv_getPathChildrenCacheData(); - } - - public void send_getPathChildrenCacheData(CuratorProjection projection, PathChildrenCacheProjection cacheProjection) throws org.apache.thrift.TException - { - getPathChildrenCacheData_args args = new getPathChildrenCacheData_args(); - args.setProjection(projection); - args.setCacheProjection(cacheProjection); - sendBase("getPathChildrenCacheData", args); - } - - public List<ChildData> recv_getPathChildrenCacheData() throws CuratorException, org.apache.thrift.TException - { - getPathChildrenCacheData_result result = new getPathChildrenCacheData_result(); - receiveBase(result, "getPathChildrenCacheData"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPathChildrenCacheData failed: unknown result"); - } - - public ChildData getPathChildrenCacheDataForPath(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, String path) throws CuratorException, org.apache.thrift.TException - { - send_getPathChildrenCacheDataForPath(projection, cacheProjection, path); - return recv_getPathChildrenCacheDataForPath(); - } - - public void send_getPathChildrenCacheDataForPath(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, String path) throws org.apache.thrift.TException - { - getPathChildrenCacheDataForPath_args args = new getPathChildrenCacheDataForPath_args(); - args.setProjection(projection); - args.setCacheProjection(cacheProjection); - args.setPath(path); - sendBase("getPathChildrenCacheDataForPath", args); - } - - public ChildData recv_getPathChildrenCacheDataForPath() throws CuratorException, org.apache.thrift.TException - { - getPathChildrenCacheDataForPath_result result = new getPathChildrenCacheDataForPath_result(); - receiveBase(result, "getPathChildrenCacheDataForPath"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPathChildrenCacheDataForPath failed: unknown result"); - } - - public boolean isLeader(CuratorProjection projection, LeaderProjection leaderProjection) throws CuratorException, org.apache.thrift.TException - { - send_isLeader(projection, leaderProjection); - return recv_isLeader(); - } - - public void send_isLeader(CuratorProjection projection, LeaderProjection leaderProjection) throws org.apache.thrift.TException - { - isLeader_args args = new isLeader_args(); - args.setProjection(projection); - args.setLeaderProjection(leaderProjection); - sendBase("isLeader", args); - } - - public boolean recv_isLeader() throws CuratorException, org.apache.thrift.TException - { - isLeader_result result = new isLeader_result(); - receiveBase(result, "isLeader"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isLeader failed: unknown result"); - } - - public CuratorProjection newCuratorProjection(String connectionName) throws CuratorException, org.apache.thrift.TException - { - send_newCuratorProjection(connectionName); - return recv_newCuratorProjection(); - } - - public void send_newCuratorProjection(String connectionName) throws org.apache.thrift.TException - { - newCuratorProjection_args args = new newCuratorProjection_args(); - args.setConnectionName(connectionName); - sendBase("newCuratorProjection", args); - } - - public CuratorProjection recv_newCuratorProjection() throws CuratorException, org.apache.thrift.TException - { - newCuratorProjection_result result = new newCuratorProjection_result(); - receiveBase(result, "newCuratorProjection"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "newCuratorProjection failed: unknown result"); - } - - public void pingCuratorProjection(CuratorProjection projection) throws org.apache.thrift.TException - { - send_pingCuratorProjection(projection); - } - - public void send_pingCuratorProjection(CuratorProjection projection) throws org.apache.thrift.TException - { - pingCuratorProjection_args args = new pingCuratorProjection_args(); - args.setProjection(projection); - sendBase("pingCuratorProjection", args); - } - - public OptionalStat setData(CuratorProjection projection, SetDataSpec spec) throws CuratorException, org.apache.thrift.TException - { - send_setData(projection, spec); - return recv_setData(); - } - - public void send_setData(CuratorProjection projection, SetDataSpec spec) throws org.apache.thrift.TException - { - setData_args args = new setData_args(); - args.setProjection(projection); - args.setSpec(spec); - sendBase("setData", args); - } - - public OptionalStat recv_setData() throws CuratorException, org.apache.thrift.TException - { - setData_result result = new setData_result(); - receiveBase(result, "setData"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setData failed: unknown result"); - } - - public LeaderResult startLeaderSelector(CuratorProjection projection, String path, String participantId, int waitForLeadershipMs) throws CuratorException, org.apache.thrift.TException - { - send_startLeaderSelector(projection, path, participantId, waitForLeadershipMs); - return recv_startLeaderSelector(); - } - - public void send_startLeaderSelector(CuratorProjection projection, String path, String participantId, int waitForLeadershipMs) throws org.apache.thrift.TException - { - startLeaderSelector_args args = new startLeaderSelector_args(); - args.setProjection(projection); - args.setPath(path); - args.setParticipantId(participantId); - args.setWaitForLeadershipMs(waitForLeadershipMs); - sendBase("startLeaderSelector", args); - } - - public LeaderResult recv_startLeaderSelector() throws CuratorException, org.apache.thrift.TException - { - startLeaderSelector_result result = new startLeaderSelector_result(); - receiveBase(result, "startLeaderSelector"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startLeaderSelector failed: unknown result"); - } - - public NodeCacheProjection startNodeCache(CuratorProjection projection, String path, boolean dataIsCompressed, boolean buildInitial) throws CuratorException, org.apache.thrift.TException - { - send_startNodeCache(projection, path, dataIsCompressed, buildInitial); - return recv_startNodeCache(); - } - - public void send_startNodeCache(CuratorProjection projection, String path, boolean dataIsCompressed, boolean buildInitial) throws org.apache.thrift.TException - { - startNodeCache_args args = new startNodeCache_args(); - args.setProjection(projection); - args.setPath(path); - args.setDataIsCompressed(dataIsCompressed); - args.setBuildInitial(buildInitial); - sendBase("startNodeCache", args); - } - - public NodeCacheProjection recv_startNodeCache() throws CuratorException, org.apache.thrift.TException - { - startNodeCache_result result = new startNodeCache_result(); - receiveBase(result, "startNodeCache"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startNodeCache failed: unknown result"); - } - - public PathChildrenCacheProjection startPathChildrenCache(CuratorProjection projection, String path, boolean cacheData, boolean dataIsCompressed, PathChildrenCacheStartMode startMode) throws CuratorException, org.apache.thrift.TException - { - send_startPathChildrenCache(projection, path, cacheData, dataIsCompressed, startMode); - return recv_startPathChildrenCache(); - } - - public void send_startPathChildrenCache(CuratorProjection projection, String path, boolean cacheData, boolean dataIsCompressed, PathChildrenCacheStartMode startMode) throws org.apache.thrift.TException - { - startPathChildrenCache_args args = new startPathChildrenCache_args(); - args.setProjection(projection); - args.setPath(path); - args.setCacheData(cacheData); - args.setDataIsCompressed(dataIsCompressed); - args.setStartMode(startMode); - sendBase("startPathChildrenCache", args); - } - - public PathChildrenCacheProjection recv_startPathChildrenCache() throws CuratorException, org.apache.thrift.TException - { - startPathChildrenCache_result result = new startPathChildrenCache_result(); - receiveBase(result, "startPathChildrenCache"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPathChildrenCache failed: unknown result"); - } - - public PersistentEphemeralNodeProjection startPersistentEphemeralNode(CuratorProjection projection, String path, ByteBuffer data, PersistentEphemeralNodeMode mode) throws CuratorException, org.apache.thrift.TException - { - send_startPersistentEphemeralNode(projection, path, data, mode); - return recv_startPersistentEphemeralNode(); - } - - public void send_startPersistentEphemeralNode(CuratorProjection projection, String path, ByteBuffer data, PersistentEphemeralNodeMode mode) throws org.apache.thrift.TException - { - startPersistentEphemeralNode_args args = new startPersistentEphemeralNode_args(); - args.setProjection(projection); - args.setPath(path); - args.setData(data); - args.setMode(mode); - sendBase("startPersistentEphemeralNode", args); - } - - public PersistentEphemeralNodeProjection recv_startPersistentEphemeralNode() throws CuratorException, org.apache.thrift.TException - { - startPersistentEphemeralNode_result result = new startPersistentEphemeralNode_result(); - receiveBase(result, "startPersistentEphemeralNode"); - if (result.isSetSuccess()) { - return result.success; - } - if (result.ex1 != null) { - throw result.ex1; - } - throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startPersistentEphemeralNode failed: unknown result"); - } - - public void sync(CuratorProjection projection, String path, String asyncContext) throws CuratorException, org.apache.thrift.TException - { - send_sync(projection, path, asyncContext); - recv_sync(); - } - - public void send_sync(CuratorProjection projection, String path, String asyncContext) throws org.apache.thrift.TException - { - sync_args args = new sync_args(); - args.setProjection(projection); - args.setPath(path); - args.setAsyncContext(asyncContext); - sendBase("sync", args); - } - - public void recv_sync() throws CuratorException, org.apache.thrift.TException - { - sync_result result = new sync_result(); - receiveBase(result, "sync"); - if (result.ex1 != null) { - throw result.ex1; - } - return; - } - - } - public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { - public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> { - private org.apache.thrift.async.TAsyncClientManager clientManager; - private org.apache.thrift.protocol.TProtocolFactory protocolFactory; - public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { - this.clientManager = clientManager; - this.protocolFactory = protocolFactory; - } - public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { - return new AsyncClient(protocolFactory, clientManager, transport); - } - } - - public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { - super(protocolFactory, clientManager, transport); - } - - public void acquireLock(CuratorProjection projection, String path, int maxWaitMs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - acquireLock_call method_call = new acquireLock_call(projection, path, maxWaitMs, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class acquireLock_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private String path; - private int maxWaitMs; - public acquireLock_call(CuratorProjection projection, String path, int maxWaitMs, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.path = path; - this.maxWaitMs = maxWaitMs; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("acquireLock", org.apache.thrift.protocol.TMessageType.CALL, 0)); - acquireLock_args args = new acquireLock_args(); - args.setProjection(projection); - args.setPath(path); - args.setMaxWaitMs(maxWaitMs); - args.write(prot); - prot.writeMessageEnd(); - } - - public OptionalLockProjection getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_acquireLock(); - } - } - - public void acquireSemaphore(CuratorProjection projection, String path, int acquireQty, int maxWaitMs, int maxLeases, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - acquireSemaphore_call method_call = new acquireSemaphore_call(projection, path, acquireQty, maxWaitMs, maxLeases, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class acquireSemaphore_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private String path; - private int acquireQty; - private int maxWaitMs; - private int maxLeases; - public acquireSemaphore_call(CuratorProjection projection, String path, int acquireQty, int maxWaitMs, int maxLeases, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.path = path; - this.acquireQty = acquireQty; - this.maxWaitMs = maxWaitMs; - this.maxLeases = maxLeases; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("acquireSemaphore", org.apache.thrift.protocol.TMessageType.CALL, 0)); - acquireSemaphore_args args = new acquireSemaphore_args(); - args.setProjection(projection); - args.setPath(path); - args.setAcquireQty(acquireQty); - args.setMaxWaitMs(maxWaitMs); - args.setMaxLeases(maxLeases); - args.write(prot); - prot.writeMessageEnd(); - } - - public List<LeaseProjection> getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_acquireSemaphore(); - } - } - - public void closeCuratorProjection(CuratorProjection projection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - closeCuratorProjection_call method_call = new closeCuratorProjection_call(projection, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class closeCuratorProjection_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - public closeCuratorProjection_call(CuratorProjection projection, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeCuratorProjection", org.apache.thrift.protocol.TMessageType.CALL, 0)); - closeCuratorProjection_args args = new closeCuratorProjection_args(); - args.setProjection(projection); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_closeCuratorProjection(); - } - } - - public void closeGenericProjection(CuratorProjection projection, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - closeGenericProjection_call method_call = new closeGenericProjection_call(projection, id, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class closeGenericProjection_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private String id; - public closeGenericProjection_call(CuratorProjection projection, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.id = id; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("closeGenericProjection", org.apache.thrift.protocol.TMessageType.CALL, 0)); - closeGenericProjection_args args = new closeGenericProjection_args(); - args.setProjection(projection); - args.setId(id); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_closeGenericProjection(); - } - } - - public void createNode(CuratorProjection projection, CreateSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - createNode_call method_call = new createNode_call(projection, spec, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class createNode_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private CreateSpec spec; - public createNode_call(CuratorProjection projection, CreateSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.spec = spec; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createNode", org.apache.thrift.protocol.TMessageType.CALL, 0)); - createNode_args args = new createNode_args(); - args.setProjection(projection); - args.setSpec(spec); - args.write(prot); - prot.writeMessageEnd(); - } - - public OptionalPath getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_createNode(); - } - } - - public void deleteNode(CuratorProjection projection, DeleteSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - deleteNode_call method_call = new deleteNode_call(projection, spec, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class deleteNode_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private DeleteSpec spec; - public deleteNode_call(CuratorProjection projection, DeleteSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.spec = spec; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteNode", org.apache.thrift.protocol.TMessageType.CALL, 0)); - deleteNode_args args = new deleteNode_args(); - args.setProjection(projection); - args.setSpec(spec); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_deleteNode(); - } - } - - public void exists(CuratorProjection projection, ExistsSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - exists_call method_call = new exists_call(projection, spec, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class exists_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private ExistsSpec spec; - public exists_call(CuratorProjection projection, ExistsSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.spec = spec; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("exists", org.apache.thrift.protocol.TMessageType.CALL, 0)); - exists_args args = new exists_args(); - args.setProjection(projection); - args.setSpec(spec); - args.write(prot); - prot.writeMessageEnd(); - } - - public OptionalStat getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_exists(); - } - } - - public void getChildren(CuratorProjection projection, GetChildrenSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getChildren_call method_call = new getChildren_call(projection, spec, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getChildren_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private GetChildrenSpec spec; - public getChildren_call(CuratorProjection projection, GetChildrenSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.spec = spec; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getChildren", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getChildren_args args = new getChildren_args(); - args.setProjection(projection); - args.setSpec(spec); - args.write(prot); - prot.writeMessageEnd(); - } - - public OptionalChildrenList getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getChildren(); - } - } - - public void getData(CuratorProjection projection, GetDataSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getData_call method_call = new getData_call(projection, spec, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getData_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private GetDataSpec spec; - public getData_call(CuratorProjection projection, GetDataSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.spec = spec; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getData", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getData_args args = new getData_args(); - args.setProjection(projection); - args.setSpec(spec); - args.write(prot); - prot.writeMessageEnd(); - } - - public OptionalData getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getData(); - } - } - - public void getLeaderParticipants(CuratorProjection projection, LeaderProjection leaderProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getLeaderParticipants_call method_call = new getLeaderParticipants_call(projection, leaderProjection, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getLeaderParticipants_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private LeaderProjection leaderProjection; - public getLeaderParticipants_call(CuratorProjection projection, LeaderProjection leaderProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.leaderProjection = leaderProjection; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLeaderParticipants", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getLeaderParticipants_args args = new getLeaderParticipants_args(); - args.setProjection(projection); - args.setLeaderProjection(leaderProjection); - args.write(prot); - prot.writeMessageEnd(); - } - - public List<Participant> getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getLeaderParticipants(); - } - } - - public void getNodeCacheData(CuratorProjection projection, NodeCacheProjection cacheProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getNodeCacheData_call method_call = new getNodeCacheData_call(projection, cacheProjection, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getNodeCacheData_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private NodeCacheProjection cacheProjection; - public getNodeCacheData_call(CuratorProjection projection, NodeCacheProjection cacheProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.cacheProjection = cacheProjection; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNodeCacheData", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getNodeCacheData_args args = new getNodeCacheData_args(); - args.setProjection(projection); - args.setCacheProjection(cacheProjection); - args.write(prot); - prot.writeMessageEnd(); - } - - public ChildData getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getNodeCacheData(); - } - } - - public void getPathChildrenCacheData(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getPathChildrenCacheData_call method_call = new getPathChildrenCacheData_call(projection, cacheProjection, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getPathChildrenCacheData_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private PathChildrenCacheProjection cacheProjection; - public getPathChildrenCacheData_call(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.cacheProjection = cacheProjection; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPathChildrenCacheData", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getPathChildrenCacheData_args args = new getPathChildrenCacheData_args(); - args.setProjection(projection); - args.setCacheProjection(cacheProjection); - args.write(prot); - prot.writeMessageEnd(); - } - - public List<ChildData> getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getPathChildrenCacheData(); - } - } - - public void getPathChildrenCacheDataForPath(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getPathChildrenCacheDataForPath_call method_call = new getPathChildrenCacheDataForPath_call(projection, cacheProjection, path, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getPathChildrenCacheDataForPath_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private PathChildrenCacheProjection cacheProjection; - private String path; - public getPathChildrenCacheDataForPath_call(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, String path, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.cacheProjection = cacheProjection; - this.path = path; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPathChildrenCacheDataForPath", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getPathChildrenCacheDataForPath_args args = new getPathChildrenCacheDataForPath_args(); - args.setProjection(projection); - args.setCacheProjection(cacheProjection); - args.setPath(path); - args.write(prot); - prot.writeMessageEnd(); - } - - public ChildData getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getPathChildrenCacheDataForPath(); - } - } - - public void isLeader(CuratorProjection projection, LeaderProjection leaderProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - isLeader_call method_call = new isLeader_call(projection, leaderProjection, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class isLeader_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private LeaderProjection leaderProjection; - public isLeader_call(CuratorProjection projection, LeaderProjection leaderProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.leaderProjection = leaderProjection; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isLeader", org.apache.thrift.protocol.TMessageType.CALL, 0)); - isLeader_args args = new isLeader_args(); - args.setProjection(projection); - args.setLeaderProjection(leaderProjection); - args.write(prot); - prot.writeMessageEnd(); - } - - public boolean getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_isLeader(); - } - } - - public void newCuratorProjection(String connectionName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - newCuratorProjection_call method_call = new newCuratorProjection_call(connectionName, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class newCuratorProjection_call extends org.apache.thrift.async.TAsyncMethodCall { - private String connectionName; - public newCuratorProjection_call(String connectionName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.connectionName = connectionName; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("newCuratorProjection", org.apache.thrift.protocol.TMessageType.CALL, 0)); - newCuratorProjection_args args = new newCuratorProjection_args(); - args.setConnectionName(connectionName); - args.write(prot); - prot.writeMessageEnd(); - } - - public CuratorProjection getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_newCuratorProjection(); - } - } - - public void pingCuratorProjection(CuratorProjection projection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - pingCuratorProjection_call method_call = new pingCuratorProjection_call(projection, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class pingCuratorProjection_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - public pingCuratorProjection_call(CuratorProjection projection, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, true); - this.projection = projection; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("pingCuratorProjection", org.apache.thrift.protocol.TMessageType.CALL, 0)); - pingCuratorProjection_args args = new pingCuratorProjection_args(); - args.setProjection(projection); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - } - } - - public void setData(CuratorProjection projection, SetDataSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - setData_call method_call = new setData_call(projection, spec, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class setData_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private SetDataSpec spec; - public setData_call(CuratorProjection projection, SetDataSpec spec, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.spec = spec; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setData", org.apache.thrift.protocol.TMessageType.CALL, 0)); - setData_args args = new setData_args(); - args.setProjection(projection); - args.setSpec(spec); - args.write(prot); - prot.writeMessageEnd(); - } - - public OptionalStat getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_setData(); - } - } - - public void startLeaderSelector(CuratorProjection projection, String path, String participantId, int waitForLeadershipMs, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - startLeaderSelector_call method_call = new startLeaderSelector_call(projection, path, participantId, waitForLeadershipMs, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class startLeaderSelector_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private String path; - private String participantId; - private int waitForLeadershipMs; - public startLeaderSelector_call(CuratorProjection projection, String path, String participantId, int waitForLeadershipMs, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.path = path; - this.participantId = participantId; - this.waitForLeadershipMs = waitForLeadershipMs; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startLeaderSelector", org.apache.thrift.protocol.TMessageType.CALL, 0)); - startLeaderSelector_args args = new startLeaderSelector_args(); - args.setProjection(projection); - args.setPath(path); - args.setParticipantId(participantId); - args.setWaitForLeadershipMs(waitForLeadershipMs); - args.write(prot); - prot.writeMessageEnd(); - } - - public LeaderResult getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_startLeaderSelector(); - } - } - - public void startNodeCache(CuratorProjection projection, String path, boolean dataIsCompressed, boolean buildInitial, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - startNodeCache_call method_call = new startNodeCache_call(projection, path, dataIsCompressed, buildInitial, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class startNodeCache_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private String path; - private boolean dataIsCompressed; - private boolean buildInitial; - public startNodeCache_call(CuratorProjection projection, String path, boolean dataIsCompressed, boolean buildInitial, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.path = path; - this.dataIsCompressed = dataIsCompressed; - this.buildInitial = buildInitial; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startNodeCache", org.apache.thrift.protocol.TMessageType.CALL, 0)); - startNodeCache_args args = new startNodeCache_args(); - args.setProjection(projection); - args.setPath(path); - args.setDataIsCompressed(dataIsCompressed); - args.setBuildInitial(buildInitial); - args.write(prot); - prot.writeMessageEnd(); - } - - public NodeCacheProjection getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_startNodeCache(); - } - } - - public void startPathChildrenCache(CuratorProjection projection, String path, boolean cacheData, boolean dataIsCompressed, PathChildrenCacheStartMode startMode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - startPathChildrenCache_call method_call = new startPathChildrenCache_call(projection, path, cacheData, dataIsCompressed, startMode, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class startPathChildrenCache_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private String path; - private boolean cacheData; - private boolean dataIsCompressed; - private PathChildrenCacheStartMode startMode; - public startPathChildrenCache_call(CuratorProjection projection, String path, boolean cacheData, boolean dataIsCompressed, PathChildrenCacheStartMode startMode, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.path = path; - this.cacheData = cacheData; - this.dataIsCompressed = dataIsCompressed; - this.startMode = startMode; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPathChildrenCache", org.apache.thrift.protocol.TMessageType.CALL, 0)); - startPathChildrenCache_args args = new startPathChildrenCache_args(); - args.setProjection(projection); - args.setPath(path); - args.setCacheData(cacheData); - args.setDataIsCompressed(dataIsCompressed); - args.setStartMode(startMode); - args.write(prot); - prot.writeMessageEnd(); - } - - public PathChildrenCacheProjection getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_startPathChildrenCache(); - } - } - - public void startPersistentEphemeralNode(CuratorProjection projection, String path, ByteBuffer data, PersistentEphemeralNodeMode mode, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - startPersistentEphemeralNode_call method_call = new startPersistentEphemeralNode_call(projection, path, data, mode, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class startPersistentEphemeralNode_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private String path; - private ByteBuffer data; - private PersistentEphemeralNodeMode mode; - public startPersistentEphemeralNode_call(CuratorProjection projection, String path, ByteBuffer data, PersistentEphemeralNodeMode mode, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.path = path; - this.data = data; - this.mode = mode; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startPersistentEphemeralNode", org.apache.thrift.protocol.TMessageType.CALL, 0)); - startPersistentEphemeralNode_args args = new startPersistentEphemeralNode_args(); - args.setProjection(projection); - args.setPath(path); - args.setData(data); - args.setMode(mode); - args.write(prot); - prot.writeMessageEnd(); - } - - public PersistentEphemeralNodeProjection getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_startPersistentEphemeralNode(); - } - } - - public void sync(CuratorProjection projection, String path, String asyncContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - sync_call method_call = new sync_call(projection, path, asyncContext, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class sync_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private String path; - private String asyncContext; - public sync_call(CuratorProjection projection, String path, String asyncContext, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { - super(client, protocolFactory, transport, resultHandler, false); - this.projection = projection; - this.path = path; - this.asyncContext = asyncContext; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sync", org.apache.thrift.protocol.TMessageType.CALL, 0)); - sync_args args = new sync_args(); - args.setProjection(projection); - args.setPath(path); - args.setAsyncContext(asyncContext); - args.write(prot); - prot.writeMessageEnd(); - } - - public void getResult() throws CuratorException, org.apache.thrift.TException { - if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); - org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); - (new Client(prot)).recv_sync(); - } - } - - } - - public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); - public Processor(I iface) { - super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>())); - } - - protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) { - processMap.put("acquireLock", new acquireLock()); - processMap.put("acquireSemaphore", new acquireSemaphore()); - processMap.put("closeCuratorProjection", new closeCuratorProjection()); - processMap.put("closeGenericProjection", new closeGenericProjection()); - processMap.put("createNode", new createNode()); - processMap.put("deleteNode", new deleteNode()); - processMap.put("exists", new exists()); - processMap.put("getChildren", new getChildren()); - processMap.put("getData", new getData()); - processMap.put("getLeaderParticipants", new getLeaderParticipants()); - processMap.put("getNodeCacheData", new getNodeCacheData()); - processMap.put("getPathChildrenCacheData", new getPathChildrenCacheData()); - processMap.put("getPathChildrenCacheDataForPath", new getPathChildrenCacheDataForPath()); - processMap.put("isLeader", new isLeader()); - processMap.put("newCuratorProjection", new newCuratorProjection()); - processMap.put("pingCuratorProjection", new pingCuratorProjection()); - processMap.put("setData", new setData()); - processMap.put("startLeaderSelector", new startLeaderSelector()); - processMap.put("startNodeCache", new startNodeCache()); - processMap.put("startPathChildrenCache", new startPathChildrenCache()); - processMap.put("startPersistentEphemeralNode", new startPersistentEphemeralNode()); - processMap.put("sync", new sync()); - return processMap; - } - - public static class acquireLock<I extends Iface> extends org.apache.thrift.ProcessFunction<I, acquireLock_args> { - public acquireLock() { - super("acquireLock"); - } - - public acquireLock_args getEmptyArgsInstance() { - return new acquireLock_args(); - } - - protected boolean isOneway() { - return false; - } - - public acquireLock_result getResult(I iface, acquireLock_args args) throws org.apache.thrift.TException { - acquireLock_result result = new acquireLock_result(); - try { - result.success = iface.acquireLock(args.projection, args.path, args.maxWaitMs); - }
<TRUNCATED>
