From 939994838320b7f0394bdf4f8919df101f5b7359 Mon Sep 17 00:00:00 2001 From: randgalt Date: Thu, 20 Jul 2017 13:54:44 -0500 Subject: [PATCH 1/2] Removed Curator RPC --- pom.xml | 7 ------- src/site/confluence/index.confluence | 1 - src/site/site.xml | 1 - 3 files changed, 9 deletions(-) diff --git a/pom.xml b/pom.xml index aa8fd86aea..3aceb5ff65 100644 --- a/pom.xml +++ b/pom.xml @@ -296,7 +296,6 @@ curator-examples curator-x-discovery curator-x-discovery-server - curator-x-rpc curator-x-async @@ -369,12 +368,6 @@ ${project.version} - - org.apache.curator - curator-x-rpc - ${project.version} - - org.apache.commons commons-math diff --git a/src/site/confluence/index.confluence b/src/site/confluence/index.confluence index f9490b4c58..4caf9c8018 100644 --- a/src/site/confluence/index.confluence +++ b/src/site/confluence/index.confluence @@ -34,7 +34,6 @@ most users, the only artifact you need is curator\-recipes. |org.apache.curator|curator\-examples|Example usages of various Curator features.| |org.apache.curator|curator\-x\-discovery|A Service Discovery implementation built on the Curator Framework.| |org.apache.curator|curator\-x\-discovery-server|A RESTful server that can be used with Curator Discovery.| -|org.apache.curator|curator\-x\-rpc|A proxy that bridges non\-java environments with the Curator framework and recipes.| h2. Versions diff --git a/src/site/site.xml b/src/site/site.xml index 8136c9a04e..776196614a 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -99,7 +99,6 @@ - From 1e7902427f627f0efc5e2486437929a26bd237bd Mon Sep 17 00:00:00 2001 From: randgalt Date: Thu, 20 Jul 2017 14:42:41 -0500 Subject: [PATCH 2/2] Remove Curator RPC code from git --- curator-x-rpc/pom.xml | 189 - .../x/rpc/CuratorProjectionServer.java | 152 - .../AuthorizationConfiguration.java | 45 - ...dExponentialBackoffRetryConfiguration.java | 69 - .../x/rpc/configuration/Configuration.java | 86 - .../configuration/ConfigurationBuilder.java | 87 - .../ConnectionConfiguration.java | 129 - .../ExponentialBackoffRetryConfiguration.java | 58 - .../RetryNTimesConfiguration.java | 58 - .../RetryPolicyConfiguration.java | 28 - .../curator/x/rpc/connections/Closer.java | 24 - .../x/rpc/connections/ConnectionManager.java | 141 - .../x/rpc/connections/CuratorEntry.java | 170 - .../x/rpc/details/RpcBackgroundCallback.java | 44 - .../curator/x/rpc/details/RpcWatcher.java | 43 - .../rpc/idl/discovery/DiscoveryInstance.java | 95 - .../idl/discovery/DiscoveryInstanceType.java | 26 - .../idl/discovery/DiscoveryProjection.java | 38 - .../DiscoveryProviderProjection.java | 38 - .../x/rpc/idl/discovery/DiscoveryService.java | 259 - .../discovery/DiscoveryServiceLowLevel.java | 159 - .../idl/discovery/ProviderStrategyType.java | 27 - .../x/rpc/idl/exceptions/ExceptionType.java | 26 - .../rpc/idl/exceptions/NodeExceptionType.java | 27 - .../x/rpc/idl/exceptions/RpcException.java | 98 - .../exceptions/ZooKeeperExceptionType.java | 40 - .../services/CuratorProjectionService.java | 765 - .../x/rpc/idl/services/EventService.java | 55 - .../curator/x/rpc/idl/structs/CreateSpec.java | 66 - .../x/rpc/idl/structs/CuratorProjection.java | 38 - .../curator/x/rpc/idl/structs/DeleteSpec.java | 50 - .../curator/x/rpc/idl/structs/ExistsSpec.java | 46 - .../x/rpc/idl/structs/GetChildrenSpec.java | 46 - .../x/rpc/idl/structs/GetDataSpec.java | 50 - .../x/rpc/idl/structs/LeaderEvent.java | 46 - .../x/rpc/idl/structs/LeaderProjection.java | 38 - .../x/rpc/idl/structs/LeaderResult.java | 42 - .../x/rpc/idl/structs/LeaseProjection.java | 38 - .../x/rpc/idl/structs/LockProjection.java | 38 - .../rpc/idl/structs/NodeCacheProjection.java | 38 - .../rpc/idl/structs/OptionalChildrenList.java | 39 - .../x/rpc/idl/structs/OptionalData.java | 38 - .../idl/structs/OptionalLockProjection.java | 38 - .../x/rpc/idl/structs/OptionalPath.java | 38 - .../x/rpc/idl/structs/OptionalRpcStat.java | 38 - .../structs/PathChildrenCacheProjection.java | 38 - .../structs/PathChildrenCacheStartMode.java | 26 - .../PersistentEphemeralNodeProjection.java | 38 - .../curator/x/rpc/idl/structs/RpcAcl.java | 42 - .../x/rpc/idl/structs/RpcChildData.java | 57 - .../x/rpc/idl/structs/RpcCreateMode.java | 31 - .../x/rpc/idl/structs/RpcCuratorEvent.java | 224 - .../rpc/idl/structs/RpcCuratorEventType.java | 46 - .../x/rpc/idl/structs/RpcEventType.java | 31 - .../curator/x/rpc/idl/structs/RpcId.java | 42 - .../x/rpc/idl/structs/RpcKeeperState.java | 34 - .../x/rpc/idl/structs/RpcParticipant.java | 42 - .../structs/RpcPathChildrenCacheEvent.java | 54 - .../RpcPathChildrenCacheEventType.java | 33 - .../RpcPersistentEphemeralNodeMode.java | 30 - .../curator/x/rpc/idl/structs/RpcStat.java | 95 - .../x/rpc/idl/structs/RpcWatchedEvent.java | 54 - .../x/rpc/idl/structs/SetDataSpec.java | 58 - .../curator/x/rpc/idl/structs/Version.java | 38 - .../src/main/resources/curator/help.txt | 72 - .../src/main/scripts/apply-thrift.sh | 36 - curator-x-rpc/src/main/scripts/generate.sh | 56 - curator-x-rpc/src/main/thrift/curator.thrift | 297 - .../site/confluence/configuration.confluence | 143 - .../src/site/confluence/deploy.confluence | 31 - .../src/site/confluence/events.confluence | 90 - .../src/site/confluence/index.confluence | 49 - .../src/site/confluence/reference.confluence | 120 - .../src/site/confluence/usage.confluence | 115 - .../src/site/resources/images/topology.png | Bin 135534 -> 0 bytes curator-x-rpc/src/site/site.xml | 33 - .../org/apache/curator/generated/Acl.java | 491 - .../apache/curator/generated/ChildData.java | 604 - .../apache/curator/generated/CreateMode.java | 51 - .../apache/curator/generated/CreateSpec.java | 1001 - .../curator/generated/CuratorEvent.java | 1636 -- .../curator/generated/CuratorEventType.java | 99 - .../curator/generated/CuratorException.java | 736 - .../curator/generated/CuratorProjection.java | 388 - .../curator/generated/CuratorService.java | 24123 ---------------- .../apache/curator/generated/DeleteSpec.java | 691 - .../curator/generated/DiscoveryInstance.java | 1201 - .../generated/DiscoveryInstanceType.java | 48 - .../generated/DiscoveryProjection.java | 388 - .../DiscoveryProviderProjection.java | 388 - .../curator/generated/DiscoveryService.java | 7236 ----- .../generated/DiscoveryServiceLowLevel.java | 6966 ----- .../curator/generated/EventService.java | 1082 - .../apache/curator/generated/EventType.java | 54 - .../curator/generated/ExceptionType.java | 48 - .../apache/curator/generated/ExistsSpec.java | 586 - .../curator/generated/GetChildrenSpec.java | 586 - .../apache/curator/generated/GetDataSpec.java | 680 - .../java/org/apache/curator/generated/Id.java | 488 - .../apache/curator/generated/KeeperState.java | 63 - .../apache/curator/generated/LeaderEvent.java | 586 - .../curator/generated/LeaderProjection.java | 388 - .../curator/generated/LeaderResult.java | 491 - .../curator/generated/LeaseProjection.java | 388 - .../curator/generated/LockProjection.java | 388 - .../generated/NodeCacheProjection.java | 388 - .../curator/generated/NodeExceptionType.java | 51 - .../generated/OptionalChildrenList.java | 437 - .../curator/generated/OptionalData.java | 399 - .../generated/OptionalLockProjection.java | 393 - .../curator/generated/OptionalPath.java | 388 - .../curator/generated/OptionalStat.java | 393 - .../apache/curator/generated/Participant.java | 486 - .../generated/PathChildrenCacheEvent.java | 609 - .../generated/PathChildrenCacheEventType.java | 60 - .../PathChildrenCacheProjection.java | 388 - .../generated/PathChildrenCacheStartMode.java | 48 - .../PersistentEphemeralNodeMode.java | 51 - .../PersistentEphemeralNodeProjection.java | 388 - .../generated/ProviderStrategyType.java | 51 - .../apache/curator/generated/SetDataSpec.java | 896 - .../org/apache/curator/generated/Stat.java | 1326 - .../org/apache/curator/generated/Version.java | 386 - .../curator/generated/WatchedEvent.java | 620 - .../generated/ZooKeeperExceptionType.java | 90 - .../org/apache/curator/x/rpc/RpcTests.java | 294 - .../org/apache/curator/x/rpc/TestClient.java | 168 - .../org/apache/curator/x/rpc/TestServer.java | 34 - .../resources/configuration/connections.json | 27 - .../test/resources/configuration/logging.json | 19 - .../test/resources/configuration/simple.json | 7 - .../test/resources/configuration/test.json | 14 - 132 files changed, 66044 deletions(-) delete mode 100644 curator-x-rpc/pom.xml delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorProjectionServer.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/AuthorizationConfiguration.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/BoundedExponentialBackoffRetryConfiguration.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/Configuration.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/ConfigurationBuilder.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/ConnectionConfiguration.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/ExponentialBackoffRetryConfiguration.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/RetryNTimesConfiguration.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/RetryPolicyConfiguration.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/connections/Closer.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/connections/ConnectionManager.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/connections/CuratorEntry.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/details/RpcBackgroundCallback.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/details/RpcWatcher.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryInstance.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryInstanceType.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryProjection.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryProviderProjection.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryService.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryServiceLowLevel.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/ProviderStrategyType.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/exceptions/ExceptionType.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/exceptions/NodeExceptionType.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/exceptions/RpcException.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/exceptions/ZooKeeperExceptionType.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/services/CuratorProjectionService.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/services/EventService.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/CreateSpec.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/CuratorProjection.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/DeleteSpec.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/ExistsSpec.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/GetChildrenSpec.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/GetDataSpec.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LeaderEvent.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LeaderProjection.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LeaderResult.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LeaseProjection.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LockProjection.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/NodeCacheProjection.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalChildrenList.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalData.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalLockProjection.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalPath.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalRpcStat.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/PathChildrenCacheProjection.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/PathChildrenCacheStartMode.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/PersistentEphemeralNodeProjection.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcAcl.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcChildData.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcCreateMode.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcCuratorEvent.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcCuratorEventType.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcEventType.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcId.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcKeeperState.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcParticipant.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcPathChildrenCacheEvent.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcPathChildrenCacheEventType.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcPersistentEphemeralNodeMode.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcStat.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcWatchedEvent.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/SetDataSpec.java delete mode 100644 curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/Version.java delete mode 100644 curator-x-rpc/src/main/resources/curator/help.txt delete mode 100755 curator-x-rpc/src/main/scripts/apply-thrift.sh delete mode 100755 curator-x-rpc/src/main/scripts/generate.sh delete mode 100644 curator-x-rpc/src/main/thrift/curator.thrift delete mode 100644 curator-x-rpc/src/site/confluence/configuration.confluence delete mode 100644 curator-x-rpc/src/site/confluence/deploy.confluence delete mode 100644 curator-x-rpc/src/site/confluence/events.confluence delete mode 100644 curator-x-rpc/src/site/confluence/index.confluence delete mode 100644 curator-x-rpc/src/site/confluence/reference.confluence delete mode 100644 curator-x-rpc/src/site/confluence/usage.confluence delete mode 100644 curator-x-rpc/src/site/resources/images/topology.png delete mode 100644 curator-x-rpc/src/site/site.xml delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/Acl.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/ChildData.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/CreateMode.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/CreateSpec.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorEvent.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorEventType.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorException.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorProjection.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorService.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/DeleteSpec.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryInstance.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryInstanceType.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryProjection.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryProviderProjection.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryService.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryServiceLowLevel.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/EventService.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/EventType.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/ExceptionType.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/ExistsSpec.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/GetChildrenSpec.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/GetDataSpec.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/Id.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/KeeperState.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/LeaderEvent.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/LeaderProjection.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/LeaderResult.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/LeaseProjection.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/LockProjection.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/NodeCacheProjection.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/NodeExceptionType.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalChildrenList.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalData.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalLockProjection.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalPath.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalStat.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/Participant.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheEvent.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheEventType.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheProjection.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheStartMode.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/PersistentEphemeralNodeMode.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/PersistentEphemeralNodeProjection.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/ProviderStrategyType.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/SetDataSpec.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/Stat.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/Version.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/WatchedEvent.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/generated/ZooKeeperExceptionType.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/x/rpc/RpcTests.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/x/rpc/TestClient.java delete mode 100644 curator-x-rpc/src/test/java/org/apache/curator/x/rpc/TestServer.java delete mode 100644 curator-x-rpc/src/test/resources/configuration/connections.json delete mode 100644 curator-x-rpc/src/test/resources/configuration/logging.json delete mode 100644 curator-x-rpc/src/test/resources/configuration/simple.json delete mode 100644 curator-x-rpc/src/test/resources/configuration/test.json diff --git a/curator-x-rpc/pom.xml b/curator-x-rpc/pom.xml deleted file mode 100644 index e831e1f407..0000000000 --- a/curator-x-rpc/pom.xml +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - apache-curator - org.apache.curator - 3.3.1-SNAPSHOT - - 4.0.0 - - curator-x-rpc - 3.3.1-SNAPSHOT - - Curator RPC Proxy - A proxy that bridges non-java environments with the Curator framework and recipes - 2014 - - - - org.apache.curator - curator-recipes - - - org.slf4j - log4j-over-slf4j - - - org.slf4j - slf4j-log4j12 - - - log4j - log4j - - - - - - org.apache.curator - curator-x-discovery - - - org.slf4j - log4j-over-slf4j - - - org.slf4j - slf4j-log4j12 - - - log4j - log4j - - - - - - com.facebook.swift - swift-service - - - com.fasterxml.jackson.core - jackson-annotations - - - - - - io.dropwizard - dropwizard-configuration - - - - io.dropwizard - dropwizard-logging - - - - org.apache.curator - curator-test - - - org.slf4j - log4j-over-slf4j - - - org.slf4j - slf4j-log4j12 - - - log4j - log4j - - - test - - - - org.testng - testng - test - - - - org.slf4j - slf4j-log4j12 - test - - - - - - - ${project.basedir}/src/main/resources - - curator/help.txt - - - - ${project.basedir}/src/main/thrift - - curator.thrift - - - - - - - org.apache.maven.plugins - maven-shade-plugin - - false - - - *:* - - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - - - - - - - package - - shade - - - - - - org.apache.curator.x.rpc.CuratorProjectionServer - - - - - - - - - org.codehaus.mojo - clirr-maven-plugin - - true - - - - - diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorProjectionServer.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorProjectionServer.java deleted file mode 100644 index a01f462210..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/CuratorProjectionServer.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc; - -import com.codahale.metrics.MetricRegistry; -import com.facebook.swift.codec.ThriftCodecManager; -import com.facebook.swift.service.ThriftEventHandler; -import com.facebook.swift.service.ThriftServer; -import com.facebook.swift.service.ThriftServiceProcessor; -import com.google.common.base.Preconditions; -import com.google.common.collect.Lists; -import com.google.common.io.Files; -import com.google.common.io.Resources; -import org.apache.curator.x.rpc.configuration.Configuration; -import org.apache.curator.x.rpc.configuration.ConfigurationBuilder; -import org.apache.curator.x.rpc.connections.ConnectionManager; -import org.apache.curator.x.rpc.idl.discovery.DiscoveryService; -import org.apache.curator.x.rpc.idl.discovery.DiscoveryServiceLowLevel; -import org.apache.curator.x.rpc.idl.services.EventService; -import org.apache.curator.x.rpc.idl.services.CuratorProjectionService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.nio.charset.Charset; -import java.util.concurrent.atomic.AtomicReference; - -public class CuratorProjectionServer -{ - private final Logger log = LoggerFactory.getLogger(getClass()); - private final ConnectionManager connectionManager; - private final ThriftServer server; - private final AtomicReference state = new AtomicReference(State.LATENT); - private final Configuration configuration; - - private enum State - { - LATENT, - STARTED, - STOPPED - } - - public static void main(String[] args) throws Exception - { - if ( (args.length != 1) || args[0].equalsIgnoreCase("?") || args[0].equalsIgnoreCase("-h") || args[0].equalsIgnoreCase("--help") ) - { - printHelp(); - return; - } - - String configurationSource; - File f = new File(args[0]); - if ( f.exists() ) - { - configurationSource = Files.toString(f, Charset.defaultCharset()); - } - else - { - System.out.println("First argument is not a file. Treating the command line as a json/yaml object"); - configurationSource = args[0]; - } - - final CuratorProjectionServer server = startServer(configurationSource); - - Runnable shutdown = new Runnable() - { - @Override - public void run() - { - server.stop(); - } - }; - Thread hook = new Thread(shutdown); - Runtime.getRuntime().addShutdownHook(hook); - } - - public static CuratorProjectionServer startServer(String configurationSource) throws Exception - { - Configuration configuration = new ConfigurationBuilder(configurationSource).build(); - - final CuratorProjectionServer server = new CuratorProjectionServer(configuration); - server.start(); - return server; - } - - public CuratorProjectionServer(Configuration configuration) - { - this.configuration = configuration; - connectionManager = new ConnectionManager(configuration.getConnections(), configuration.getProjectionExpiration().toMillis()); - EventService eventService = new EventService(connectionManager, configuration.getPingTime().toMillis()); - DiscoveryService discoveryService = new DiscoveryService(connectionManager); - CuratorProjectionService projectionService = new CuratorProjectionService(connectionManager); - DiscoveryServiceLowLevel discoveryServiceLowLevel = new DiscoveryServiceLowLevel(connectionManager); - ThriftServiceProcessor processor = new ThriftServiceProcessor(new ThriftCodecManager(), Lists.newArrayList(), projectionService, eventService, discoveryService, discoveryServiceLowLevel); - server = new ThriftServer(processor, configuration.getThrift()); - } - - public void start() - { - Preconditions.checkState(state.compareAndSet(State.LATENT, State.STARTED), "Already started"); - - configuration.getLogging().configure(new MetricRegistry(), "curator-rpc"); - connectionManager.start(); - server.start(); - - log.info("Server listening on port: " + configuration.getThrift().getPort()); - } - - public void stop() - { - if ( state.compareAndSet(State.STARTED, State.STOPPED) ) - { - log.info("Stopping..."); - - server.close(); - connectionManager.close(); - configuration.getLogging().stop(); - - log.info("Stopped"); - } - } - - private static void printHelp() throws IOException - { - URL helpUrl = Resources.getResource("curator/help.txt"); - System.out.println(Resources.toString(helpUrl, Charset.defaultCharset())); - - System.out.println(); - System.out.println("======= Curator Thrift IDL ======="); - System.out.println(); - - URL idlUrl = Resources.getResource("curator.thrift"); - System.out.println(Resources.toString(idlUrl, Charset.defaultCharset())); - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/AuthorizationConfiguration.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/AuthorizationConfiguration.java deleted file mode 100644 index d045a80bd6..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/AuthorizationConfiguration.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.configuration; - -public class AuthorizationConfiguration -{ - private String scheme; - private String auth; - - public String getScheme() - { - return scheme; - } - - public void setScheme(String scheme) - { - this.scheme = scheme; - } - - public String getAuth() - { - return auth; - } - - public void setAuth(String auth) - { - this.auth = auth; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/BoundedExponentialBackoffRetryConfiguration.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/BoundedExponentialBackoffRetryConfiguration.java deleted file mode 100644 index 44231b14d9..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/BoundedExponentialBackoffRetryConfiguration.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.configuration; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.airlift.units.Duration; -import org.apache.curator.RetryPolicy; -import org.apache.curator.retry.BoundedExponentialBackoffRetry; -import java.util.concurrent.TimeUnit; - -@JsonTypeName("bounded-exponential-backoff") -public class BoundedExponentialBackoffRetryConfiguration extends RetryPolicyConfiguration -{ - private Duration baseSleepTime = new Duration(100, TimeUnit.MILLISECONDS); - private Duration maxSleepTime = new Duration(30, TimeUnit.SECONDS); - private int maxRetries = 3; - - @Override - public RetryPolicy build() - { - return new BoundedExponentialBackoffRetry((int)baseSleepTime.toMillis(), (int)maxSleepTime.toMillis(), maxRetries); - } - - public Duration getBaseSleepTime() - { - return baseSleepTime; - } - - public void setBaseSleepTime(Duration baseSleepTime) - { - this.baseSleepTime = baseSleepTime; - } - - public int getMaxRetries() - { - return maxRetries; - } - - public void setMaxRetries(int maxRetries) - { - this.maxRetries = maxRetries; - } - - public Duration getMaxSleepTime() - { - return maxSleepTime; - } - - public void setMaxSleepTime(Duration maxSleepTime) - { - this.maxSleepTime = maxSleepTime; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/Configuration.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/Configuration.java deleted file mode 100644 index 973b6f0849..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/Configuration.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.configuration; - -import com.facebook.swift.service.ThriftServerConfig; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Lists; -import io.airlift.units.Duration; -import io.dropwizard.logging.LoggingFactory; -import java.util.List; -import java.util.concurrent.TimeUnit; - -public class Configuration -{ - private ThriftServerConfig thrift = new ThriftServerConfig(); - private LoggingFactory logging = new LoggingFactory(); - private Duration projectionExpiration = new Duration(3, TimeUnit.MINUTES); - private Duration pingTime = new Duration(5, TimeUnit.SECONDS); - private List connections = Lists.newArrayList(); - - public LoggingFactory getLogging() - { - return logging; - } - - public void setLogging(LoggingFactory logging) - { - this.logging = logging; - } - - public ThriftServerConfig getThrift() - { - return thrift; - } - - public void setThrift(ThriftServerConfig thrift) - { - this.thrift = thrift; - } - - public Duration getProjectionExpiration() - { - return projectionExpiration; - } - - public void setProjectionExpiration(Duration projectionExpiration) - { - this.projectionExpiration = projectionExpiration; - } - - public Duration getPingTime() - { - return pingTime; - } - - public void setPingTime(Duration pingTime) - { - this.pingTime = pingTime; - } - - public List getConnections() - { - return ImmutableList.copyOf(connections); - } - - public void setConnections(List connections) - { - this.connections = connections; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/ConfigurationBuilder.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/ConfigurationBuilder.java deleted file mode 100644 index e5cff3e8ad..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/ConfigurationBuilder.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.configuration; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.jsontype.SubtypeResolver; -import com.fasterxml.jackson.databind.jsontype.impl.StdSubtypeResolver; -import io.dropwizard.configuration.ConfigurationFactory; -import io.dropwizard.configuration.ConfigurationFactoryFactory; -import io.dropwizard.configuration.ConfigurationSourceProvider; -import io.dropwizard.configuration.DefaultConfigurationFactoryFactory; -import io.dropwizard.jackson.AnnotationSensitivePropertyNamingStrategy; -import io.dropwizard.jackson.LogbackModule; -import io.dropwizard.logging.ConsoleAppenderFactory; -import io.dropwizard.logging.FileAppenderFactory; -import io.dropwizard.logging.LoggingFactory; -import io.dropwizard.logging.SyslogAppenderFactory; -import org.jboss.netty.logging.InternalLoggerFactory; -import org.jboss.netty.logging.Slf4JLoggerFactory; -import javax.validation.Validation; -import javax.validation.ValidatorFactory; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.nio.charset.Charset; - -public class ConfigurationBuilder -{ - private final String configurationSource; - - static - { - LoggingFactory.bootstrap(); - InternalLoggerFactory.setDefaultFactory(new Slf4JLoggerFactory()); - } - - public ConfigurationBuilder(String configurationSource) - { - this.configurationSource = configurationSource; - } - - public Configuration build() throws Exception - { - ObjectMapper mapper = new ObjectMapper(); - mapper.registerModule(new LogbackModule()); - mapper.setPropertyNamingStrategy(new AnnotationSensitivePropertyNamingStrategy()); - SubtypeResolver subtypeResolver = new StdSubtypeResolver(); - subtypeResolver.registerSubtypes - ( - ConsoleAppenderFactory.class, - FileAppenderFactory.class, - SyslogAppenderFactory.class, - ExponentialBackoffRetryConfiguration.class, - RetryNTimesConfiguration.class - ); - mapper.setSubtypeResolver(subtypeResolver); - - ValidatorFactory validatorFactory = Validation.buildDefaultValidatorFactory(); - ConfigurationFactoryFactory factoryFactory = new DefaultConfigurationFactoryFactory(); - ConfigurationFactory configurationFactory = factoryFactory.create(Configuration.class, validatorFactory.getValidator(), mapper, "curator"); - ConfigurationSourceProvider provider = new ConfigurationSourceProvider() - { - @Override - public InputStream open(String path) throws IOException - { - return new ByteArrayInputStream(configurationSource.getBytes(Charset.defaultCharset())); - } - }; - return configurationFactory.build(provider, ""); - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/ConnectionConfiguration.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/ConnectionConfiguration.java deleted file mode 100644 index c69fdaa794..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/ConnectionConfiguration.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.configuration; - -import com.google.common.base.Preconditions; -import io.airlift.units.Duration; -import org.apache.curator.framework.CuratorFramework; -import org.apache.curator.framework.CuratorFrameworkFactory; -import javax.validation.constraints.NotNull; -import java.util.concurrent.TimeUnit; - -public class ConnectionConfiguration -{ - @NotNull private String name; - private String connectionString = null; - private Duration sessionLength = new Duration(1, TimeUnit.MINUTES); - private Duration connectionTimeout = new Duration(15, TimeUnit.SECONDS); - private AuthorizationConfiguration authorization = null; - private String namespace = null; - private RetryPolicyConfiguration retry = new ExponentialBackoffRetryConfiguration(); - - public String getName() - { - return name; - } - - public void setName(String name) - { - this.name = name; - } - - public String getConnectionString() - { - return connectionString; - } - - public void setConnectionString(String connectionString) - { - this.connectionString = connectionString; - } - - public Duration getSessionLength() - { - return sessionLength; - } - - public void setSessionLength(Duration sessionLength) - { - this.sessionLength = sessionLength; - } - - public Duration getConnectionTimeout() - { - return connectionTimeout; - } - - public void setConnectionTimeout(Duration connectionTimeout) - { - this.connectionTimeout = connectionTimeout; - } - - public AuthorizationConfiguration getAuthorization() - { - return authorization; - } - - public void setAuthorization(AuthorizationConfiguration authorization) - { - this.authorization = authorization; - } - - public String getNamespace() - { - return namespace; - } - - public void setNamespace(String namespace) - { - this.namespace = namespace; - } - - public RetryPolicyConfiguration getRetry() - { - return retry; - } - - public void setRetry(RetryPolicyConfiguration retry) - { - this.retry = retry; - } - - public CuratorFramework build() - { - Preconditions.checkState((connectionString != null) && (connectionString.length() > 0), "You must specify a connection string for connection: " + name); - Preconditions.checkNotNull(retry, "retry cannot be null"); - - CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder(); - builder = builder - .connectString(connectionString) - .sessionTimeoutMs((int)sessionLength.toMillis()) - .connectionTimeoutMs((int)connectionTimeout.toMillis()) - .retryPolicy(retry.build()); - if ( authorization != null ) - { - builder = builder.authorization(authorization.getScheme(), authorization.getAuth().getBytes()); - } - if ( namespace != null ) - { - builder = builder.namespace(namespace); - } - return builder.build(); - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/ExponentialBackoffRetryConfiguration.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/ExponentialBackoffRetryConfiguration.java deleted file mode 100644 index 2c68440ef6..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/ExponentialBackoffRetryConfiguration.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.configuration; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.airlift.units.Duration; -import org.apache.curator.RetryPolicy; -import org.apache.curator.retry.ExponentialBackoffRetry; -import java.util.concurrent.TimeUnit; - -@JsonTypeName("exponential-backoff") -public class ExponentialBackoffRetryConfiguration extends RetryPolicyConfiguration -{ - private Duration baseSleepTime = new Duration(100, TimeUnit.MILLISECONDS); - private int maxRetries = 3; - - @Override - public RetryPolicy build() - { - return new ExponentialBackoffRetry((int)baseSleepTime.toMillis(), maxRetries); - } - - public Duration getBaseSleepTime() - { - return baseSleepTime; - } - - public void setBaseSleepTime(Duration baseSleepTime) - { - this.baseSleepTime = baseSleepTime; - } - - public int getMaxRetries() - { - return maxRetries; - } - - public void setMaxRetries(int maxRetries) - { - this.maxRetries = maxRetries; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/RetryNTimesConfiguration.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/RetryNTimesConfiguration.java deleted file mode 100644 index 448bde3f9b..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/RetryNTimesConfiguration.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.configuration; - -import com.fasterxml.jackson.annotation.JsonTypeName; -import io.airlift.units.Duration; -import org.apache.curator.RetryPolicy; -import org.apache.curator.retry.RetryNTimes; -import java.util.concurrent.TimeUnit; - -@JsonTypeName("ntimes") -public class RetryNTimesConfiguration extends RetryPolicyConfiguration -{ - private Duration sleepBetweenRetries = new Duration(100, TimeUnit.MILLISECONDS); - private int n = 3; - - @Override - public RetryPolicy build() - { - return new RetryNTimes(n, (int)sleepBetweenRetries.toMillis()); - } - - public Duration getSleepBetweenRetries() - { - return sleepBetweenRetries; - } - - public void setSleepBetweenRetries(Duration sleepBetweenRetries) - { - this.sleepBetweenRetries = sleepBetweenRetries; - } - - public int getN() - { - return n; - } - - public void setN(int n) - { - this.n = n; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/RetryPolicyConfiguration.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/RetryPolicyConfiguration.java deleted file mode 100644 index d5d1d9510c..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/configuration/RetryPolicyConfiguration.java +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.configuration; - -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import org.apache.curator.RetryPolicy; - -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") -public abstract class RetryPolicyConfiguration -{ - public abstract RetryPolicy build(); -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/connections/Closer.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/connections/Closer.java deleted file mode 100644 index a113879b77..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/connections/Closer.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.connections; - -public interface Closer -{ - public void close(); -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/connections/ConnectionManager.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/connections/ConnectionManager.java deleted file mode 100644 index d644231a61..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/connections/ConnectionManager.java +++ /dev/null @@ -1,141 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.connections; - -import com.google.common.base.Preconditions; -import com.google.common.cache.Cache; -import com.google.common.cache.CacheBuilder; -import com.google.common.cache.RemovalListener; -import com.google.common.cache.RemovalNotification; -import com.google.common.collect.ImmutableMap; -import org.apache.curator.framework.CuratorFramework; -import org.apache.curator.utils.ThreadUtils; -import org.apache.curator.x.rpc.configuration.ConnectionConfiguration; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import java.io.Closeable; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicReference; - -public class ConnectionManager implements Closeable -{ - private final Logger log = LoggerFactory.getLogger(getClass()); - private final Cache cache; - private final AtomicReference state = new AtomicReference(State.LATENT); - private final Map connections; - private final ScheduledExecutorService service = ThreadUtils.newSingleThreadScheduledExecutor("ConnectionManager"); - - private static final int FORCED_CLEANUP_SECONDS = 30; - - private enum State - { - LATENT, - STARTED, - CLOSED - } - - public ConnectionManager(List connections, long expirationMs) - { - this.connections = buildConnectionsMap(connections); - - RemovalListener listener = new RemovalListener() - { - @SuppressWarnings("NullableProblems") - @Override - public void onRemoval(RemovalNotification notification) - { - if ( notification != null ) - { - log.debug(String.format("Entry being removed. id (%s), reason (%s)", notification.getKey(), notification.getCause())); - - CuratorEntry entry = notification.getValue(); - if ( entry != null ) - { - entry.close(); - } - } - } - }; - cache = CacheBuilder.newBuilder().expireAfterAccess(expirationMs, TimeUnit.MILLISECONDS).removalListener(listener).build(); - } - - public void start() - { - Preconditions.checkState(state.compareAndSet(State.LATENT, State.STARTED), "Already started"); - - Runnable cleanup = new Runnable() - { - @Override - public void run() - { - cache.cleanUp(); - } - }; - service.scheduleWithFixedDelay(cleanup, FORCED_CLEANUP_SECONDS, 30, TimeUnit.SECONDS); - } - - @Override - public void close() - { - if ( state.compareAndSet(State.STARTED, State.CLOSED) ) - { - service.shutdownNow(); - cache.invalidateAll(); - cache.cleanUp(); - } - } - - public CuratorFramework newConnection(String name) - { - ConnectionConfiguration configuration = connections.get(name); - return (configuration != null) ? configuration.build() : null; - } - - public void add(String id, CuratorFramework client) - { - Preconditions.checkState(state.get() == State.STARTED, "Not started"); - cache.put(id, new CuratorEntry(client)); - } - - public CuratorEntry get(String id) - { - return (state.get() == State.STARTED) ? cache.getIfPresent(id) : null; - } - - public CuratorEntry remove(String id) - { - Preconditions.checkState(state.get() == State.STARTED, "Not started"); - return cache.asMap().remove(id); - } - - private Map buildConnectionsMap(List connections) - { - Preconditions.checkArgument(connections.size() > 0, "You must have at least one connection configured"); - - ImmutableMap.Builder builder = ImmutableMap.builder(); - for ( ConnectionConfiguration configuration : connections ) - { - builder.put(configuration.getName(), configuration); - } - return builder.build(); - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/connections/CuratorEntry.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/connections/CuratorEntry.java deleted file mode 100644 index b077a76c21..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/connections/CuratorEntry.java +++ /dev/null @@ -1,170 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.connections; - -import com.google.common.base.Preconditions; -import com.google.common.collect.Maps; -import com.google.common.collect.Queues; -import org.apache.curator.framework.CuratorFramework; -import org.apache.curator.framework.api.CuratorEvent; -import org.apache.curator.x.rpc.idl.exceptions.ExceptionType; -import org.apache.curator.x.rpc.idl.exceptions.RpcException; -import org.apache.curator.x.rpc.idl.structs.CuratorProjection; -import org.apache.curator.x.rpc.idl.structs.RpcCuratorEvent; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import java.io.Closeable; -import java.util.Map; -import java.util.UUID; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicReference; - -public class CuratorEntry implements Closeable -{ - private final Logger log = LoggerFactory.getLogger(getClass()); - private final CuratorFramework client; - private final BlockingQueue events = Queues.newLinkedBlockingQueue(); - private final AtomicReference state = new AtomicReference(State.OPEN); - private final Map things = Maps.newConcurrentMap(); - - public static T mustGetThing(CuratorEntry entry, String id, Class clazz) - { - T thing = entry.getThing(id, clazz); - Preconditions.checkNotNull(thing, "No item of type " + clazz.getSimpleName() + " found with id " + id); - return thing; - } - - private static class Entry - { - final Object thing; - final Closer closer; - - private Entry(Object thing, Closer closer) - { - this.thing = thing; - this.closer = closer; - } - } - - private enum State - { - OPEN, - CLOSED - } - - public CuratorEntry(CuratorFramework client) - { - this.client = client; - } - - @Override - public void close() - { - if ( state.compareAndSet(State.OPEN, State.CLOSED) ) - { - for ( Map.Entry mapEntry : things.entrySet() ) - { - Entry entry = mapEntry.getValue(); - if ( entry.closer != null ) - { - log.debug(String.format("Closing left over thing. Type: %s - Id: %s", entry.thing.getClass(), mapEntry.getKey())); - entry.closer.close(); - } - } - things.clear(); - - client.close(); - events.clear(); - } - } - - public RpcCuratorEvent pollForEvent(long maxWaitMs) throws InterruptedException - { - if ( state.get() == State.OPEN ) - { - return events.poll(maxWaitMs, TimeUnit.MILLISECONDS); - } - return null; - } - - public void addEvent(RpcCuratorEvent event) - { - if ( state.get() == State.OPEN ) - { - events.offer(event); - } - } - - public static CuratorEntry mustGetEntry(ConnectionManager connectionManager, CuratorProjection projection) throws RpcException - { - CuratorEntry entry = connectionManager.get(projection.id); - if ( entry == null ) - { - throw new RpcException(ExceptionType.GENERAL, null, null, "No CuratorProjection found with the id: " + projection.id); - } - return entry; - } - - public CuratorFramework getClient() - { - return (state.get() == State.OPEN) ? client : null; - } - - public String addThing(Object thing, Closer closer) - { - return addThing(newId(), thing, closer); - } - - public static String newId() - { - return UUID.randomUUID().toString(); - } - - public T getThing(String id, Class clazz) - { - Entry entry = (id != null) ? things.get(id) : null; - return cast(clazz, entry); - } - - public boolean closeThing(String id) - { - Entry entry = (id != null) ? things.remove(id) : null; - if ( entry != null ) - { - entry.closer.close(); - } - return false; - } - - private String addThing(String id, T thing, Closer closer) - { - things.put(id, new Entry(thing, closer)); - return id; - } - - private T cast(Class clazz, Entry entry) - { - if ( entry != null ) - { - return clazz.cast(entry.thing); - } - return null; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/details/RpcBackgroundCallback.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/details/RpcBackgroundCallback.java deleted file mode 100644 index 519790c4a1..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/details/RpcBackgroundCallback.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.details; - -import org.apache.curator.framework.CuratorFramework; -import org.apache.curator.framework.api.BackgroundCallback; -import org.apache.curator.framework.api.CuratorEvent; -import org.apache.curator.x.rpc.idl.structs.RpcCuratorEvent; -import org.apache.curator.x.rpc.idl.structs.CuratorProjection; -import org.apache.curator.x.rpc.idl.services.CuratorProjectionService; - -public class RpcBackgroundCallback implements BackgroundCallback -{ - private final CuratorProjection projection; - private final CuratorProjectionService projectionService; - - public RpcBackgroundCallback(CuratorProjectionService projectionService, CuratorProjection projection) - { - this.projection = projection; - this.projectionService = projectionService; - } - - @Override - public void processResult(CuratorFramework client, CuratorEvent event) throws Exception - { - projectionService.addEvent(projection, new RpcCuratorEvent(event)); - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/details/RpcWatcher.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/details/RpcWatcher.java deleted file mode 100644 index 6fa596154c..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/details/RpcWatcher.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.details; - -import org.apache.curator.x.rpc.idl.structs.RpcCuratorEvent; -import org.apache.curator.x.rpc.idl.structs.CuratorProjection; -import org.apache.curator.x.rpc.idl.services.CuratorProjectionService; -import org.apache.zookeeper.WatchedEvent; -import org.apache.zookeeper.Watcher; - -public class RpcWatcher implements Watcher -{ - private final CuratorProjection projection; - private final CuratorProjectionService projectionService; - - public RpcWatcher(CuratorProjectionService projectionService, CuratorProjection projection) - { - this.projection = projection; - this.projectionService = projectionService; - } - - @Override - public void process(WatchedEvent event) - { - projectionService.addEvent(projection, new RpcCuratorEvent(event)); - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryInstance.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryInstance.java deleted file mode 100644 index 2547467b89..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryInstance.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.discovery; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; -import com.google.common.base.Objects; -import org.apache.curator.x.discovery.ServiceInstance; -import org.apache.curator.x.discovery.ServiceType; -import org.apache.curator.x.discovery.UriSpec; - -@ThriftStruct -public class DiscoveryInstance -{ - @ThriftField(1) - public String name; - - @ThriftField(2) - public String id; - - @ThriftField(3) - public String address; - - @ThriftField(4) - public int port; - - @ThriftField(5) - public int sslPort; - - @ThriftField(6) - public byte[] payload; - - @ThriftField(7) - public long registrationTimeUTC; - - @ThriftField(8) - public DiscoveryInstanceType serviceType; - - @ThriftField(9) - public String uriSpec; - - public DiscoveryInstance() - { - } - - public DiscoveryInstance(ServiceInstance instance) - { - if ( instance != null ) - { - this.name = instance.getName(); - this.id = instance.getId(); - this.address = instance.getAddress(); - this.port = Objects.firstNonNull(instance.getPort(), 0); - this.sslPort = Objects.firstNonNull(instance.getSslPort(), 0); - this.payload = instance.getPayload(); - this.registrationTimeUTC = instance.getRegistrationTimeUTC(); - this.serviceType = DiscoveryInstanceType.valueOf(instance.getServiceType().name()); - this.uriSpec = instance.buildUriSpec(); - } - } - - public DiscoveryInstance(String name, String id, String address, int port, int sslPort, byte[] payload, long registrationTimeUTC, DiscoveryInstanceType serviceType, String uriSpec) - { - this.name = name; - this.id = id; - this.address = address; - this.port = port; - this.sslPort = sslPort; - this.payload = payload; - this.registrationTimeUTC = registrationTimeUTC; - this.serviceType = serviceType; - this.uriSpec = uriSpec; - } - - public ServiceInstance toReal() - { - return new ServiceInstance(name, id, address, port, sslPort, payload, registrationTimeUTC, ServiceType.valueOf(serviceType.name()), new UriSpec(uriSpec)); - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryInstanceType.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryInstanceType.java deleted file mode 100644 index 352a12e8a2..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryInstanceType.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.discovery; - -public enum DiscoveryInstanceType -{ - DYNAMIC, - STATIC, - PERMANENT -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryProjection.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryProjection.java deleted file mode 100644 index 6b1e0f4788..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryProjection.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.discovery; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class DiscoveryProjection -{ - @ThriftField(1) - public String id; - - public DiscoveryProjection() - { - } - - public DiscoveryProjection(String id) - { - this.id = id; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryProviderProjection.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryProviderProjection.java deleted file mode 100644 index c8655faad6..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryProviderProjection.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.discovery; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class DiscoveryProviderProjection -{ - @ThriftField(1) - public String id; - - public DiscoveryProviderProjection() - { - } - - public DiscoveryProviderProjection(String id) - { - this.id = id; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryService.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryService.java deleted file mode 100644 index 22f732db78..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryService.java +++ /dev/null @@ -1,259 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.discovery; - -import com.facebook.swift.service.ThriftMethod; -import com.facebook.swift.service.ThriftService; -import com.google.common.base.Function; -import com.google.common.collect.Collections2; -import com.google.common.collect.Lists; -import org.apache.curator.utils.ThreadUtils; -import org.apache.curator.x.discovery.DownInstancePolicy; -import org.apache.curator.x.discovery.ProviderStrategy; -import org.apache.curator.x.discovery.ServiceDiscovery; -import org.apache.curator.x.discovery.ServiceDiscoveryBuilder; -import org.apache.curator.x.discovery.ServiceInstance; -import org.apache.curator.x.discovery.ServiceProvider; -import org.apache.curator.x.discovery.ServiceType; -import org.apache.curator.x.discovery.strategies.RandomStrategy; -import org.apache.curator.x.discovery.strategies.RoundRobinStrategy; -import org.apache.curator.x.discovery.strategies.StickyStrategy; -import org.apache.curator.x.rpc.connections.Closer; -import org.apache.curator.x.rpc.connections.ConnectionManager; -import org.apache.curator.x.rpc.connections.CuratorEntry; -import org.apache.curator.x.rpc.idl.exceptions.RpcException; -import org.apache.curator.x.rpc.idl.structs.CuratorProjection; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import java.io.IOException; -import java.util.Collection; -import java.util.concurrent.TimeUnit; - -@ThriftService -public class DiscoveryService -{ - private final Logger log = LoggerFactory.getLogger(getClass()); - private final ConnectionManager connectionManager; - - public DiscoveryService(ConnectionManager connectionManager) - { - this.connectionManager = connectionManager; - } - - @ThriftMethod - public DiscoveryInstance makeDiscoveryInstance(String name, byte[] payload, int port) throws RpcException - { - try - { - ServiceInstance serviceInstance = ServiceInstance.builder() - .serviceType(ServiceType.DYNAMIC) - .name(name) - .payload(payload) - .port(port) - .build(); - return new DiscoveryInstance(serviceInstance); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public DiscoveryProjection startDiscovery(CuratorProjection projection, final String basePath, DiscoveryInstance yourInstance) throws RpcException - { - try - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - final ServiceDiscovery serviceDiscovery = ServiceDiscoveryBuilder - .builder(byte[].class) - .basePath(basePath) - .client(entry.getClient()) - .thisInstance((yourInstance != null) ? yourInstance.toReal() : null) - .build(); - serviceDiscovery.start(); - - Closer closer = new Closer() - { - @Override - public void close() - { - try - { - serviceDiscovery.close(); - } - catch ( IOException e ) - { - log.error("Could not close ServiceDiscovery with basePath: " + basePath, e); - } - } - }; - String id = entry.addThing(serviceDiscovery, closer); - - return new DiscoveryProjection(id); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public DiscoveryProviderProjection startProvider(CuratorProjection projection, DiscoveryProjection discoveryProjection, final String serviceName, ProviderStrategyType providerStrategy, int downTimeoutMs, int downErrorThreshold) throws RpcException - { - ProviderStrategy strategy; - switch ( providerStrategy ) - { - default: - case RANDOM: - { - strategy = new RandomStrategy(); - break; - } - - case STICKY_RANDOM: - { - strategy = new StickyStrategy(new RandomStrategy()); - break; - } - - case STICKY_ROUND_ROBIN: - { - strategy = new StickyStrategy(new RoundRobinStrategy()); - break; - } - - case ROUND_ROBIN: - { - strategy = new RoundRobinStrategy(); - break; - } - } - - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - @SuppressWarnings("unchecked") - ServiceDiscovery serviceDiscovery = CuratorEntry.mustGetThing(entry, discoveryProjection.id, ServiceDiscovery.class); - final ServiceProvider serviceProvider = serviceDiscovery - .serviceProviderBuilder() - .downInstancePolicy(new DownInstancePolicy(downTimeoutMs, TimeUnit.MILLISECONDS, downErrorThreshold)) - .providerStrategy(strategy) - .serviceName(serviceName) - .build(); - try - { - serviceProvider.start(); - Closer closer = new Closer() - { - @Override - public void close() - { - try - { - serviceProvider.close(); - } - catch ( IOException e ) - { - ThreadUtils.checkInterrupted(e); - log.error("Could not close ServiceProvider with serviceName: " + serviceName, e); - } - } - }; - String id = entry.addThing(serviceProvider, closer); - return new DiscoveryProviderProjection(id); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public DiscoveryInstance getInstance(CuratorProjection projection, DiscoveryProviderProjection providerProjection) throws RpcException - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - @SuppressWarnings("unchecked") - ServiceProvider serviceProvider = CuratorEntry.mustGetThing(entry, providerProjection.id, ServiceProvider.class); - try - { - return new DiscoveryInstance(serviceProvider.getInstance()); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public Collection getAllInstances(CuratorProjection projection, DiscoveryProviderProjection providerProjection) throws RpcException - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - @SuppressWarnings("unchecked") - ServiceProvider serviceProvider = CuratorEntry.mustGetThing(entry, providerProjection.id, ServiceProvider.class); - try - { - Collection> allInstances = serviceProvider.getAllInstances(); - Collection transformed = Collections2.transform - ( - allInstances, - new Function, DiscoveryInstance>() - { - @Override - public DiscoveryInstance apply(ServiceInstance instance) - { - return new DiscoveryInstance(instance); - } - } - ); - return Lists.newArrayList(transformed); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public void noteError(CuratorProjection projection, DiscoveryProviderProjection providerProjection, String instanceId) throws RpcException - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - @SuppressWarnings("unchecked") - ServiceProvider serviceProvider = CuratorEntry.mustGetThing(entry, providerProjection.id, ServiceProvider.class); - try - { - for ( ServiceInstance instance : serviceProvider.getAllInstances() ) - { - if ( instance.getId().equals(instanceId) ) - { - serviceProvider.noteError(instance); - break; - } - } - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryServiceLowLevel.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryServiceLowLevel.java deleted file mode 100644 index 42c90b9761..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/DiscoveryServiceLowLevel.java +++ /dev/null @@ -1,159 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.discovery; - -import com.facebook.swift.service.ThriftMethod; -import com.facebook.swift.service.ThriftService; -import com.google.common.base.Function; -import com.google.common.collect.Collections2; -import com.google.common.collect.Lists; -import org.apache.curator.utils.ThreadUtils; -import org.apache.curator.x.discovery.ServiceDiscovery; -import org.apache.curator.x.discovery.ServiceInstance; -import org.apache.curator.x.rpc.connections.ConnectionManager; -import org.apache.curator.x.rpc.connections.CuratorEntry; -import org.apache.curator.x.rpc.idl.exceptions.RpcException; -import org.apache.curator.x.rpc.idl.structs.CuratorProjection; -import java.util.Collection; - -@ThriftService -public class DiscoveryServiceLowLevel -{ - private final ConnectionManager connectionManager; - - public DiscoveryServiceLowLevel(ConnectionManager connectionManager) - { - this.connectionManager = connectionManager; - } - - @ThriftMethod - public void registerInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws RpcException - { - try - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - @SuppressWarnings("unchecked") - ServiceDiscovery serviceDiscovery = CuratorEntry.mustGetThing(entry, discoveryProjection.id, ServiceDiscovery.class); - serviceDiscovery.registerService(instance.toReal()); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public void updateInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws RpcException - { - try - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - @SuppressWarnings("unchecked") - ServiceDiscovery serviceDiscovery = CuratorEntry.mustGetThing(entry, discoveryProjection.id, ServiceDiscovery.class); - serviceDiscovery.updateService(instance.toReal()); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public void unregisterInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws RpcException - { - try - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - @SuppressWarnings("unchecked") - ServiceDiscovery serviceDiscovery = CuratorEntry.mustGetThing(entry, discoveryProjection.id, ServiceDiscovery.class); - serviceDiscovery.unregisterService(instance.toReal()); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public Collection queryForNames(CuratorProjection projection, DiscoveryProjection discoveryProjection) throws RpcException - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - @SuppressWarnings("unchecked") - ServiceDiscovery serviceDiscovery = CuratorEntry.mustGetThing(entry, discoveryProjection.id, ServiceDiscovery.class); - try - { - return serviceDiscovery.queryForNames(); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public DiscoveryInstance queryForInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, String id) throws RpcException - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - @SuppressWarnings("unchecked") - ServiceDiscovery serviceDiscovery = CuratorEntry.mustGetThing(entry, discoveryProjection.id, ServiceDiscovery.class); - try - { - return new DiscoveryInstance(serviceDiscovery.queryForInstance(name, id)); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public Collection queryForInstances(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name) throws RpcException - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - @SuppressWarnings("unchecked") - ServiceDiscovery serviceDiscovery = CuratorEntry.mustGetThing(entry, discoveryProjection.id, ServiceDiscovery.class); - try - { - Collection> instances = serviceDiscovery.queryForInstances(name); - Collection transformed = Collections2.transform - ( - instances, - new Function, DiscoveryInstance>() - { - @Override - public DiscoveryInstance apply(ServiceInstance instance) - { - return new DiscoveryInstance(instance); - } - } - ); - return Lists.newArrayList(transformed); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/ProviderStrategyType.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/ProviderStrategyType.java deleted file mode 100644 index 139e0be486..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/discovery/ProviderStrategyType.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.discovery; - -public enum ProviderStrategyType -{ - RANDOM, - STICKY_RANDOM, - STICKY_ROUND_ROBIN, - ROUND_ROBIN -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/exceptions/ExceptionType.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/exceptions/ExceptionType.java deleted file mode 100644 index adf1206d6d..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/exceptions/ExceptionType.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.exceptions; - -public enum ExceptionType -{ - GENERAL, - ZOOKEEPER, - NODE -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/exceptions/NodeExceptionType.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/exceptions/NodeExceptionType.java deleted file mode 100644 index f62756e601..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/exceptions/NodeExceptionType.java +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.exceptions; - -public enum NodeExceptionType -{ - NONODE, - BADVERSION, - NODEEXISTS, - NOTEMPTY -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/exceptions/RpcException.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/exceptions/RpcException.java deleted file mode 100644 index 9032c1c705..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/exceptions/RpcException.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.exceptions; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; -import com.facebook.swift.service.ThriftException; -import org.apache.zookeeper.KeeperException; -import java.io.PrintWriter; -import java.io.StringWriter; - -@ThriftException(id = 1, type = RpcException.class, name = "CuratorException") -@ThriftStruct("CuratorException") -public class RpcException extends Exception -{ - @ThriftField(1) - public ExceptionType type; - - @ThriftField(2) - public ZooKeeperExceptionType zooKeeperException; - - @ThriftField(3) - public NodeExceptionType nodeException; - - @ThriftField(4) - public String message; - - public RpcException() - { - } - - public RpcException(Exception e) - { - this.message = e.getLocalizedMessage(); - if ( this.message == null ) - { - StringWriter str = new StringWriter(); - e.printStackTrace(new PrintWriter(str)); - this.message = str.toString(); - } - - if ( KeeperException.class.isAssignableFrom(e.getClass()) ) - { - KeeperException keeperException = (KeeperException)e; - switch ( keeperException.code() ) - { - default: - { - type = ExceptionType.ZOOKEEPER; - zooKeeperException = ZooKeeperExceptionType.valueOf(keeperException.code().name()); - nodeException = null; - break; - } - - case NONODE: - case NODEEXISTS: - case NOTEMPTY: - case BADVERSION: - { - type = ExceptionType.NODE; - zooKeeperException = null; - nodeException = NodeExceptionType.valueOf(keeperException.code().name()); - break; - } - } - } - else - { - type = ExceptionType.GENERAL; - } - } - - public RpcException(ExceptionType type, ZooKeeperExceptionType zooKeeperException, NodeExceptionType nodeException, String message) - { - this.type = type; - this.zooKeeperException = zooKeeperException; - this.nodeException = nodeException; - this.message = message; - } - - -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/exceptions/ZooKeeperExceptionType.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/exceptions/ZooKeeperExceptionType.java deleted file mode 100644 index 0ce0c1f5c4..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/exceptions/ZooKeeperExceptionType.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.exceptions; - -public enum ZooKeeperExceptionType -{ - SYSTEMERROR, - RUNTIMEINCONSISTENCY, - DATAINCONSISTENCY, - CONNECTIONLOSS, - MARSHALLINGERROR, - UNIMPLEMENTED, - OPERATIONTIMEOUT, - BADARGUMENTS, - APIERROR, - NOAUTH, - NOCHILDRENFOREPHEMERALS, - INVALIDACL, - AUTHFAILED, - SESSIONEXPIRED, - INVALIDCALLBACK, - SESSIONMOVED, - NOTREADONLY -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/services/CuratorProjectionService.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/services/CuratorProjectionService.java deleted file mode 100644 index 794b467727..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/services/CuratorProjectionService.java +++ /dev/null @@ -1,765 +0,0 @@ - -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.services; - -import com.facebook.swift.service.ThriftMethod; -import com.facebook.swift.service.ThriftService; -import com.google.common.base.Function; -import com.google.common.collect.Collections2; -import com.google.common.collect.Lists; -import org.apache.curator.framework.CuratorFramework; -import org.apache.curator.framework.api.*; -import org.apache.curator.framework.recipes.cache.ChildData; -import org.apache.curator.framework.recipes.cache.NodeCache; -import org.apache.curator.framework.recipes.cache.NodeCacheListener; -import org.apache.curator.framework.recipes.cache.PathChildrenCache; -import org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent; -import org.apache.curator.framework.recipes.cache.PathChildrenCacheListener; -import org.apache.curator.framework.recipes.leader.LeaderLatch; -import org.apache.curator.framework.recipes.leader.LeaderLatchListener; -import org.apache.curator.framework.recipes.leader.Participant; -import org.apache.curator.framework.recipes.locks.InterProcessSemaphoreMutex; -import org.apache.curator.framework.recipes.locks.InterProcessSemaphoreV2; -import org.apache.curator.framework.recipes.locks.Lease; -import org.apache.curator.framework.recipes.nodes.PersistentEphemeralNode; -import org.apache.curator.framework.state.ConnectionState; -import org.apache.curator.framework.state.ConnectionStateListener; -import org.apache.curator.utils.ThreadUtils; -import org.apache.curator.x.rpc.connections.Closer; -import org.apache.curator.x.rpc.connections.ConnectionManager; -import org.apache.curator.x.rpc.connections.CuratorEntry; -import org.apache.curator.x.rpc.details.RpcBackgroundCallback; -import org.apache.curator.x.rpc.details.RpcWatcher; -import org.apache.curator.x.rpc.idl.exceptions.ExceptionType; -import org.apache.curator.x.rpc.idl.exceptions.RpcException; -import org.apache.curator.x.rpc.idl.structs.*; -import org.apache.zookeeper.CreateMode; -import org.apache.zookeeper.data.Stat; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import java.io.IOException; -import java.util.Collection; -import java.util.List; -import java.util.concurrent.TimeUnit; - -@ThriftService("CuratorService") -public class CuratorProjectionService -{ - private final Logger log = LoggerFactory.getLogger(getClass()); - private final ConnectionManager connectionManager; - - public CuratorProjectionService(ConnectionManager connectionManager) - { - this.connectionManager = connectionManager; - } - - @ThriftMethod - public CuratorProjection newCuratorProjection(String connectionName) throws RpcException - { - CuratorFramework client = connectionManager.newConnection(connectionName); - if ( client == null ) - { - throw new RpcException(ExceptionType.GENERAL, null, null, "No connection configuration was found with the name: " + connectionName); - } - - String id = CuratorEntry.newId(); - client.start(); - connectionManager.add(id, client); - final CuratorProjection projection = new CuratorProjection(id); - - ConnectionStateListener listener = new ConnectionStateListener() - { - @Override - public void stateChanged(CuratorFramework client, ConnectionState newState) - { - addEvent(projection, new RpcCuratorEvent(newState)); - } - }; - client.getConnectionStateListenable().addListener(listener); - - return projection; - } - - @ThriftMethod - public void closeCuratorProjection(CuratorProjection projection) - { - CuratorEntry entry = connectionManager.remove(projection.id); - if ( entry != null ) - { - entry.close(); - } - } - - @ThriftMethod(oneway = true) - public void pingCuratorProjection(CuratorProjection projection) - { - connectionManager.get(projection.id); - } - - @ThriftMethod - public OptionalPath createNode(CuratorProjection projection, CreateSpec spec) throws RpcException - { - try - { - CuratorFramework client = CuratorEntry.mustGetEntry(connectionManager, projection).getClient(); - - Object builder = client.create(); - if ( spec.creatingParentsIfNeeded ) - { - builder = castBuilder(builder, CreateBuilder.class).creatingParentsIfNeeded(); - } - if ( spec.creatingParentContainersIfNeeded ) - { - builder = castBuilder(builder, CreateBuilder.class).creatingParentContainersIfNeeded(); - } - if ( spec.compressed ) - { - builder = castBuilder(builder, Compressible.class).compressed(); - } - if ( spec.withProtection ) - { - builder = castBuilder(builder, CreateBuilder.class).withProtection(); - } - if ( spec.mode != null ) - { - builder = castBuilder(builder, CreateModable.class).withMode(CreateMode.valueOf(spec.mode.name())); - } - - if ( spec.asyncContext != null ) - { - BackgroundCallback backgroundCallback = new RpcBackgroundCallback(this, projection); - builder = castBuilder(builder, Backgroundable.class).inBackground(backgroundCallback, spec.asyncContext); - } - - Object path = castBuilder(builder, PathAndBytesable.class).forPath(spec.path, spec.data); - return new OptionalPath((path != null) ? String.valueOf(path) : null); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public void deleteNode(CuratorProjection projection, DeleteSpec spec) throws RpcException - { - try - { - CuratorFramework client = CuratorEntry.mustGetEntry(connectionManager, projection).getClient(); - - Object builder = client.delete(); - if ( spec.guaranteed ) - { - builder = castBuilder(builder, DeleteBuilder.class).guaranteed(); - } - if ( spec.version != null ) - { - builder = castBuilder(builder, Versionable.class).withVersion(spec.version.version); - } - - if ( spec.asyncContext != null ) - { - BackgroundCallback backgroundCallback = new RpcBackgroundCallback(this, projection); - builder = castBuilder(builder, Backgroundable.class).inBackground(backgroundCallback, spec.asyncContext); - } - - castBuilder(builder, Pathable.class).forPath(spec.path); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public OptionalData getData(CuratorProjection projection, GetDataSpec spec) throws RpcException - { - try - { - CuratorFramework client = CuratorEntry.mustGetEntry(connectionManager, projection).getClient(); - - Object builder = client.getData(); - if ( spec.watched ) - { - builder = castBuilder(builder, Watchable.class).usingWatcher(new RpcWatcher(this, projection)); - } - - if ( spec.decompressed ) - { - builder = castBuilder(builder, Decompressible.class).decompressed(); - } - - if ( spec.asyncContext != null ) - { - BackgroundCallback backgroundCallback = new RpcBackgroundCallback(this, projection); - builder = castBuilder(builder, Backgroundable.class).inBackground(backgroundCallback); - } - - Stat stat = new Stat(); - builder = castBuilder(builder, Statable.class).storingStatIn(stat); - - byte[] bytes = (byte[])castBuilder(builder, Pathable.class).forPath(spec.path); - return new OptionalData(bytes); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public OptionalRpcStat setData(CuratorProjection projection, SetDataSpec spec) throws RpcException - { - try - { - CuratorFramework client = CuratorEntry.mustGetEntry(connectionManager, projection).getClient(); - - Object builder = client.setData(); - if ( spec.watched ) - { - builder = castBuilder(builder, Watchable.class).usingWatcher(new RpcWatcher(this, projection)); - } - if ( spec.version != null ) - { - builder = castBuilder(builder, Versionable.class).withVersion(spec.version.version); - } - - if ( spec.compressed ) - { - builder = castBuilder(builder, Compressible.class).compressed(); - } - - if ( spec.asyncContext != null ) - { - BackgroundCallback backgroundCallback = new RpcBackgroundCallback(this, projection); - builder = castBuilder(builder, Backgroundable.class).inBackground(backgroundCallback); - } - - Stat stat = (Stat)castBuilder(builder, PathAndBytesable.class).forPath(spec.path, spec.data); - return new OptionalRpcStat(RpcCuratorEvent.toRpcStat(stat)); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public OptionalRpcStat exists(CuratorProjection projection, ExistsSpec spec) throws RpcException - { - try - { - CuratorFramework client = CuratorEntry.mustGetEntry(connectionManager, projection).getClient(); - - Object builder = client.checkExists(); - if ( spec.watched ) - { - builder = castBuilder(builder, Watchable.class).usingWatcher(new RpcWatcher(this, projection)); - } - - if ( spec.asyncContext != null ) - { - BackgroundCallback backgroundCallback = new RpcBackgroundCallback(this, projection); - castBuilder(builder, Backgroundable.class).inBackground(backgroundCallback); - } - - Stat stat = (Stat)castBuilder(builder, Pathable.class).forPath(spec.path); - return new OptionalRpcStat((stat != null) ? RpcCuratorEvent.toRpcStat(stat) : null); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public OptionalChildrenList getChildren(CuratorProjection projection, GetChildrenSpec spec) throws RpcException - { - try - { - CuratorFramework client = CuratorEntry.mustGetEntry(connectionManager, projection).getClient(); - - Object builder = client.getChildren(); - if ( spec.watched ) - { - builder = castBuilder(builder, Watchable.class).usingWatcher(new RpcWatcher(this, projection)); - } - - if ( spec.asyncContext != null ) - { - BackgroundCallback backgroundCallback = new RpcBackgroundCallback(this, projection); - builder = castBuilder(builder, Backgroundable.class).inBackground(backgroundCallback); - } - - @SuppressWarnings("unchecked") - List children = (List)castBuilder(builder, Pathable.class).forPath(spec.path); - return new OptionalChildrenList(children); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public void sync(CuratorProjection projection, String path, String asyncContext) throws RpcException - { - try - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - BackgroundCallback backgroundCallback = new RpcBackgroundCallback(this, projection); - entry.getClient().sync().inBackground(backgroundCallback, asyncContext).forPath(path); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public boolean closeGenericProjection(CuratorProjection projection, String id) throws RpcException - { - try - { - if ( id.equals(projection.id) ) - { - closeCuratorProjection(projection); - return true; - } - else - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - return entry.closeThing(id); - } - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public OptionalLockProjection acquireLock(CuratorProjection projection, final String path, int maxWaitMs) throws RpcException - { - try - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - final InterProcessSemaphoreMutex lock = new InterProcessSemaphoreMutex(entry.getClient(), path); - if ( !lock.acquire(maxWaitMs, TimeUnit.MILLISECONDS) ) - { - return new OptionalLockProjection(); - } - - Closer closer = new Closer() - { - @Override - public void close() - { - if ( lock.isAcquiredInThisProcess() ) - { - try - { - lock.release(); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - log.error("Could not release left-over lock for path: " + path, e); - } - } - } - }; - String id = entry.addThing(lock, closer); - return new OptionalLockProjection(new LockProjection(id)); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public LeaderResult startLeaderSelector(final CuratorProjection projection, final String path, final String participantId, int waitForLeadershipMs) throws RpcException - { - try - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - - final LeaderLatch leaderLatch = new LeaderLatch(entry.getClient(), path, participantId); - leaderLatch.start(); - - Closer closer = new Closer() - { - @Override - public void close() - { - try - { - leaderLatch.close(); - } - catch ( IOException e ) - { - ThreadUtils.checkInterrupted(e); - log.error("Could not close left-over leader latch for path: " + path, e); - } - } - }; - String id = entry.addThing(leaderLatch, closer); - - LeaderLatchListener listener = new LeaderLatchListener() - { - @Override - public void isLeader() - { - addEvent(projection, new RpcCuratorEvent(new LeaderEvent(path, participantId, true))); - } - - @Override - public void notLeader() - { - addEvent(projection, new RpcCuratorEvent(new LeaderEvent(path, participantId, false))); - } - }; - leaderLatch.addListener(listener); - - if ( waitForLeadershipMs > 0 ) - { - leaderLatch.await(waitForLeadershipMs, TimeUnit.MILLISECONDS); - } - - return new LeaderResult(new LeaderProjection(id), leaderLatch.hasLeadership()); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public Collection getLeaderParticipants(CuratorProjection projection, LeaderProjection leaderProjection) throws RpcException - { - try - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - - LeaderLatch leaderLatch = CuratorEntry.mustGetThing(entry, leaderProjection.id, LeaderLatch.class); - Collection participants = leaderLatch.getParticipants(); - Collection transformed = Collections2.transform - ( - participants, - new Function() - { - @Override - public RpcParticipant apply(Participant participant) - { - return new RpcParticipant(participant.getId(), participant.isLeader()); - } - } - ); - return Lists.newArrayList(transformed); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public boolean isLeader(CuratorProjection projection, LeaderProjection leaderProjection) throws RpcException - { - try - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - - LeaderLatch leaderLatch = CuratorEntry.mustGetThing(entry, leaderProjection.id, LeaderLatch.class); - return leaderLatch.hasLeadership(); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public PathChildrenCacheProjection startPathChildrenCache(final CuratorProjection projection, final String path, boolean cacheData, boolean dataIsCompressed, PathChildrenCacheStartMode startMode) throws RpcException - { - try - { - final CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - - final PathChildrenCache cache = new PathChildrenCache(entry.getClient(), path, cacheData, dataIsCompressed, ThreadUtils.newThreadFactory("PathChildrenCacheResource")); - cache.start(PathChildrenCache.StartMode.valueOf(startMode.name())); - - Closer closer = new Closer() - { - @Override - public void close() - { - try - { - cache.close(); - } - catch ( IOException e ) - { - ThreadUtils.checkInterrupted(e); - log.error("Could not close left-over PathChildrenCache for path: " + path, e); - } - } - }; - String id = entry.addThing(cache, closer); - - PathChildrenCacheListener listener = new PathChildrenCacheListener() - { - @Override - public void childEvent(CuratorFramework client, PathChildrenCacheEvent event) throws RpcException - { - entry.addEvent(new RpcCuratorEvent(new RpcPathChildrenCacheEvent(path, event))); - } - }; - cache.getListenable().addListener(listener); - - return new PathChildrenCacheProjection(id); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public List getPathChildrenCacheData(CuratorProjection projection, PathChildrenCacheProjection cacheProjection) throws RpcException - { - try - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - - PathChildrenCache pathChildrenCache = CuratorEntry.mustGetThing(entry, cacheProjection.id, PathChildrenCache.class); - return Lists.transform - ( - pathChildrenCache.getCurrentData(), - new Function() - { - @Override - public RpcChildData apply(ChildData childData) - { - return new RpcChildData(childData); - } - } - ); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public RpcChildData getPathChildrenCacheDataForPath(CuratorProjection projection, PathChildrenCacheProjection cacheProjection, String path) throws RpcException - { - try - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - - PathChildrenCache pathChildrenCache = CuratorEntry.mustGetThing(entry, cacheProjection.id, PathChildrenCache.class); - return new RpcChildData(pathChildrenCache.getCurrentData(path)); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public NodeCacheProjection startNodeCache(CuratorProjection projection, final String path, boolean dataIsCompressed, boolean buildInitial) throws RpcException - { - try - { - final CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - - final NodeCache cache = new NodeCache(entry.getClient(), path, dataIsCompressed); - cache.start(buildInitial); - - Closer closer = new Closer() - { - @Override - public void close() - { - try - { - cache.close(); - } - catch ( IOException e ) - { - ThreadUtils.checkInterrupted(e); - log.error("Could not close left-over NodeCache for path: " + path, e); - } - } - }; - String id = entry.addThing(cache, closer); - - NodeCacheListener listener = new NodeCacheListener() - { - @Override - public void nodeChanged() - { - entry.addEvent(new RpcCuratorEvent(RpcCuratorEventType.NODE_CACHE, path)); - } - }; - cache.getListenable().addListener(listener); - - return new NodeCacheProjection(id); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public RpcChildData getNodeCacheData(CuratorProjection projection, NodeCacheProjection cacheProjection) throws RpcException - { - try - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - - NodeCache nodeCache = CuratorEntry.mustGetThing(entry, cacheProjection.id, NodeCache.class); - return new RpcChildData(nodeCache.getCurrentData()); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public PersistentEphemeralNodeProjection startPersistentEphemeralNode(CuratorProjection projection, final String path, byte[] data, RpcPersistentEphemeralNodeMode mode) throws RpcException - { - try - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - - final PersistentEphemeralNode node = new PersistentEphemeralNode(entry.getClient(), PersistentEphemeralNode.Mode.valueOf(mode.name()), path, data); - node.start(); - - Closer closer = new Closer() - { - @Override - public void close() - { - try - { - node.close(); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - log.error("Could not release left-over persistent ephemeral node for path: " + path, e); - } - } - }; - String id = entry.addThing(node, closer); - return new PersistentEphemeralNodeProjection(id); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - @ThriftMethod - public List acquireSemaphore(CuratorProjection projection, final String path, int acquireQty, int maxWaitMs, int maxLeases) throws RpcException - { - try - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - - final InterProcessSemaphoreV2 semaphore = new InterProcessSemaphoreV2(entry.getClient(), path, maxLeases); - final Collection leases = semaphore.acquire(acquireQty, maxWaitMs, TimeUnit.MILLISECONDS); - if ( leases == null ) - { - return Lists.newArrayList(); - } - - List leaseProjections = Lists.newArrayList(); - for ( final Lease lease : leases ) - { - Closer closer = new Closer() - { - @Override - public void close() - { - try - { - semaphore.returnLease(lease); - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - log.error("Could not release semaphore leases for path: " + path, e); - } - } - }; - leaseProjections.add(new LeaseProjection(entry.addThing(lease, closer))); - } - return leaseProjections; - } - catch ( Exception e ) - { - ThreadUtils.checkInterrupted(e); - throw new RpcException(e); - } - } - - public void addEvent(CuratorProjection projection, RpcCuratorEvent event) - { - CuratorEntry entry = connectionManager.get(projection.id); - if ( entry != null ) - { - entry.addEvent(event); - } - } - - private static T castBuilder(Object createBuilder, Class clazz) throws Exception - { - if ( clazz.isAssignableFrom(createBuilder.getClass()) ) - { - return clazz.cast(createBuilder); - } - throw new Exception("That operation is not available"); - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/services/EventService.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/services/EventService.java deleted file mode 100644 index 74fb32019e..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/services/EventService.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.services; - -import com.facebook.swift.service.ThriftMethod; -import com.facebook.swift.service.ThriftService; -import org.apache.curator.x.rpc.connections.CuratorEntry; -import org.apache.curator.x.rpc.connections.ConnectionManager; -import org.apache.curator.x.rpc.idl.exceptions.RpcException; -import org.apache.curator.x.rpc.idl.structs.CuratorProjection; -import org.apache.curator.x.rpc.idl.structs.RpcCuratorEvent; - -@ThriftService("EventService") -public class EventService -{ - private final ConnectionManager connectionManager; - private final long pingTimeMs; - - public EventService(ConnectionManager connectionManager, long pingTimeMs) - { - this.connectionManager = connectionManager; - this.pingTimeMs = pingTimeMs; - } - - @ThriftMethod - public RpcCuratorEvent getNextEvent(CuratorProjection projection) throws RpcException - { - try - { - CuratorEntry entry = CuratorEntry.mustGetEntry(connectionManager, projection); - RpcCuratorEvent event = entry.pollForEvent(pingTimeMs); - return (event != null) ? event : new RpcCuratorEvent(); - } - catch ( InterruptedException e ) - { - throw new RpcException(e); - } - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/CreateSpec.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/CreateSpec.java deleted file mode 100644 index a15fe92084..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/CreateSpec.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class CreateSpec -{ - @ThriftField(1) - public String path; - - @ThriftField(2) - public byte[] data; - - @ThriftField(3) - public RpcCreateMode mode; - - @ThriftField(4) - public String asyncContext; - - @ThriftField(5) - public boolean compressed; - - @ThriftField(6) - public boolean creatingParentsIfNeeded; - - @ThriftField(7) - public boolean withProtection; - - @ThriftField(8) - public boolean creatingParentContainersIfNeeded; - - public CreateSpec() - { - } - - public CreateSpec(String path, byte[] data, RpcCreateMode mode, String asyncContext, boolean compressed, boolean creatingParentsIfNeeded, boolean withProtection, boolean creatingParentContainersIfNeeded) - { - this.path = path; - this.data = data; - this.mode = mode; - this.asyncContext = asyncContext; - this.compressed = compressed; - this.creatingParentsIfNeeded = creatingParentsIfNeeded; - this.withProtection = withProtection; - this.creatingParentContainersIfNeeded = creatingParentContainersIfNeeded; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/CuratorProjection.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/CuratorProjection.java deleted file mode 100644 index 82ea2a3299..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/CuratorProjection.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class CuratorProjection -{ - @ThriftField(1) - public String id; - - public CuratorProjection() - { - } - - public CuratorProjection(String id) - { - this.id = id; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/DeleteSpec.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/DeleteSpec.java deleted file mode 100644 index 18f8dd2f01..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/DeleteSpec.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class DeleteSpec -{ - @ThriftField(1) - public String path; - - @ThriftField(2) - public boolean guaranteed; - - @ThriftField(3) - public String asyncContext; - - @ThriftField(4) - public Version version; - - public DeleteSpec() - { - } - - public DeleteSpec(String path, boolean guaranteed, String asyncContext, Version version) - { - this.path = path; - this.guaranteed = guaranteed; - this.asyncContext = asyncContext; - this.version = version; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/ExistsSpec.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/ExistsSpec.java deleted file mode 100644 index f271f7eed2..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/ExistsSpec.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class ExistsSpec -{ - @ThriftField(1) - public String path; - - @ThriftField(2) - public boolean watched; - - @ThriftField(3) - public String asyncContext; - - public ExistsSpec() - { - } - - public ExistsSpec(String path, boolean watched, String asyncContext) - { - this.path = path; - this.watched = watched; - this.asyncContext = asyncContext; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/GetChildrenSpec.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/GetChildrenSpec.java deleted file mode 100644 index 37dea04f3f..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/GetChildrenSpec.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class GetChildrenSpec -{ - @ThriftField(1) - public String path; - - @ThriftField(2) - public boolean watched; - - @ThriftField(3) - public String asyncContext; - - public GetChildrenSpec() - { - } - - public GetChildrenSpec(String path, boolean watched, String asyncContext) - { - this.path = path; - this.watched = watched; - this.asyncContext = asyncContext; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/GetDataSpec.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/GetDataSpec.java deleted file mode 100644 index 9b741d0f9b..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/GetDataSpec.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class GetDataSpec -{ - @ThriftField(1) - public String path; - - @ThriftField(2) - public boolean watched; - - @ThriftField(3) - public String asyncContext; - - @ThriftField(4) - public boolean decompressed; - - public GetDataSpec() - { - } - - public GetDataSpec(String path, boolean watched, String asyncContext, boolean decompressed) - { - this.path = path; - this.watched = watched; - this.asyncContext = asyncContext; - this.decompressed = decompressed; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LeaderEvent.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LeaderEvent.java deleted file mode 100644 index ebeabab554..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LeaderEvent.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class LeaderEvent -{ - @ThriftField(1) - public String path; - - @ThriftField(2) - public String participantId; - - @ThriftField(3) - public boolean isLeader; - - public LeaderEvent() - { - } - - public LeaderEvent(String path, String participantId, boolean isLeader) - { - this.path = path; - this.participantId = participantId; - this.isLeader = isLeader; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LeaderProjection.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LeaderProjection.java deleted file mode 100644 index d9b3fac7bf..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LeaderProjection.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class LeaderProjection -{ - @ThriftField(1) - public String id; - - public LeaderProjection() - { - } - - public LeaderProjection(String id) - { - this.id = id; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LeaderResult.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LeaderResult.java deleted file mode 100644 index 429294bab2..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LeaderResult.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class LeaderResult -{ - @ThriftField(1) - public LeaderProjection projection; - - @ThriftField(2) - public boolean isLeader; - - public LeaderResult() - { - } - - public LeaderResult(LeaderProjection projection, boolean isLeader) - { - this.projection = projection; - this.isLeader = isLeader; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LeaseProjection.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LeaseProjection.java deleted file mode 100644 index 1ab1f188ce..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LeaseProjection.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class LeaseProjection -{ - @ThriftField(1) - public String id; - - public LeaseProjection() - { - } - - public LeaseProjection(String id) - { - this.id = id; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LockProjection.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LockProjection.java deleted file mode 100644 index 1f88d5ebf3..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/LockProjection.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class LockProjection -{ - @ThriftField(1) - public String id; - - public LockProjection() - { - } - - public LockProjection(String id) - { - this.id = id; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/NodeCacheProjection.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/NodeCacheProjection.java deleted file mode 100644 index 3cf3be0a01..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/NodeCacheProjection.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class NodeCacheProjection -{ - @ThriftField(1) - public String id; - - public NodeCacheProjection() - { - } - - public NodeCacheProjection(String id) - { - this.id = id; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalChildrenList.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalChildrenList.java deleted file mode 100644 index 44a96f2402..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalChildrenList.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; -import java.util.List; - -@ThriftStruct -public class OptionalChildrenList -{ - @ThriftField(1) - public List children; - - public OptionalChildrenList() - { - } - - public OptionalChildrenList(List children) - { - this.children = children; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalData.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalData.java deleted file mode 100644 index e46c577936..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalData.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class OptionalData -{ - @ThriftField(1) - public byte[] data; - - public OptionalData() - { - } - - public OptionalData(byte[] data) - { - this.data = data; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalLockProjection.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalLockProjection.java deleted file mode 100644 index cd8549471e..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalLockProjection.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class OptionalLockProjection -{ - @ThriftField(1) - public LockProjection lockProjection; - - public OptionalLockProjection() - { - } - - public OptionalLockProjection(LockProjection lockProjection) - { - this.lockProjection = lockProjection; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalPath.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalPath.java deleted file mode 100644 index f2d5f164cd..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalPath.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class OptionalPath -{ - @ThriftField(1) - public String path; - - public OptionalPath() - { - } - - public OptionalPath(String path) - { - this.path = path; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalRpcStat.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalRpcStat.java deleted file mode 100644 index df0c234ee8..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/OptionalRpcStat.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct("OptionalStat") -public class OptionalRpcStat -{ - @ThriftField(1) - public RpcStat stat; - - public OptionalRpcStat() - { - } - - public OptionalRpcStat(RpcStat stat) - { - this.stat = stat; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/PathChildrenCacheProjection.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/PathChildrenCacheProjection.java deleted file mode 100644 index 9dd4f02065..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/PathChildrenCacheProjection.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class PathChildrenCacheProjection -{ - @ThriftField(1) - public String id; - - public PathChildrenCacheProjection() - { - } - - public PathChildrenCacheProjection(String id) - { - this.id = id; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/PathChildrenCacheStartMode.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/PathChildrenCacheStartMode.java deleted file mode 100644 index 4989183fa5..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/PathChildrenCacheStartMode.java +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -public enum PathChildrenCacheStartMode -{ - NORMAL, - BUILD_INITIAL_CACHE, - POST_INITIALIZED_EVENT -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/PersistentEphemeralNodeProjection.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/PersistentEphemeralNodeProjection.java deleted file mode 100644 index 40fefff52a..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/PersistentEphemeralNodeProjection.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class PersistentEphemeralNodeProjection -{ - @ThriftField(1) - public String id; - - public PersistentEphemeralNodeProjection() - { - } - - public PersistentEphemeralNodeProjection(String id) - { - this.id = id; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcAcl.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcAcl.java deleted file mode 100644 index c4cb9acb15..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcAcl.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct("Acl") -public class RpcAcl -{ - @ThriftField(1) - public int perms; - - @ThriftField(2) - public RpcId id; - - public RpcAcl() - { - } - - public RpcAcl(int perms, RpcId id) - { - this.perms = perms; - this.id = id; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcChildData.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcChildData.java deleted file mode 100644 index 2cb44623fa..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcChildData.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; -import org.apache.curator.framework.recipes.cache.ChildData; - -@ThriftStruct("ChildData") -public class RpcChildData -{ - @ThriftField(1) - public String path; - - @ThriftField(2) - public RpcStat stat; - - @ThriftField(3) - public byte[] data; - - public RpcChildData() - { - } - - public RpcChildData(ChildData data) - { - if ( data != null ) - { - this.path = data.getPath(); - this.stat = RpcCuratorEvent.toRpcStat(data.getStat()); - this.data = data.getData(); - } - } - - public RpcChildData(String path, RpcStat stat, byte[] data) - { - this.path = path; - this.stat = stat; - this.data = data; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcCreateMode.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcCreateMode.java deleted file mode 100644 index 020f2830ee..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcCreateMode.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftEnum; - -@ThriftEnum("CreateMode") -public enum RpcCreateMode -{ - PERSISTENT, - PERSISTENT_SEQUENTIAL, - EPHEMERAL, - EPHEMERAL_SEQUENTIAL, - CONTAINER -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcCuratorEvent.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcCuratorEvent.java deleted file mode 100644 index 18591a580c..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcCuratorEvent.java +++ /dev/null @@ -1,224 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; -import com.google.common.base.Function; -import com.google.common.collect.Lists; -import org.apache.curator.framework.api.CuratorEvent; -import org.apache.curator.framework.state.ConnectionState; -import org.apache.zookeeper.WatchedEvent; -import org.apache.zookeeper.data.ACL; -import org.apache.zookeeper.data.Stat; -import javax.annotation.Nullable; -import java.util.List; - -@SuppressWarnings("deprecation") -@ThriftStruct("CuratorEvent") -public class RpcCuratorEvent -{ - @ThriftField(2) - public RpcCuratorEventType type; - - @ThriftField(3) - public int resultCode; - - @ThriftField(4) - public String path; - - @ThriftField(5) - public String context; - - @ThriftField(6) - public RpcStat stat; - - @ThriftField(7) - public byte[] data; - - @ThriftField(8) - public String name; - - @ThriftField(9) - public List children; - - @ThriftField(10) - public List aclList; - - @ThriftField(11) - public RpcWatchedEvent watchedEvent; - - @ThriftField(12) - public LeaderEvent leaderEvent; - - @ThriftField(13) - public RpcPathChildrenCacheEvent childrenCacheEvent; - - public RpcCuratorEvent() - { - this.type = RpcCuratorEventType.PING; - this.resultCode = 0; - this.path = null; - this.context = null; - this.stat = null; - this.data = null; - this.name = null; - this.children = null; - this.aclList = null; - this.watchedEvent = null; - this.leaderEvent = null; - this.childrenCacheEvent = null; - } - - public RpcCuratorEvent(RpcCuratorEventType type, String path) - { - this.type = type; - this.resultCode = 0; - this.path = path; - this.context = null; - this.stat = null; - this.data = null; - this.name = null; - this.children = null; - this.aclList = null; - this.watchedEvent = null; - this.leaderEvent = null; - this.childrenCacheEvent = null; - } - - public RpcCuratorEvent(RpcPathChildrenCacheEvent childrenCacheEvent) - { - this.type = RpcCuratorEventType.PATH_CHILDREN_CACHE; - this.resultCode = 0; - this.path = null; - this.context = null; - this.stat = null; - this.data = null; - this.name = null; - this.children = null; - this.aclList = null; - this.watchedEvent = null; - this.leaderEvent = null; - this.childrenCacheEvent = childrenCacheEvent; - } - - public RpcCuratorEvent(CuratorEvent event) - { - this.type = RpcCuratorEventType.valueOf(event.getType().name()); - this.resultCode = event.getResultCode(); - this.path = event.getPath(); - this.context = (event.getContext() != null) ? String.valueOf(event.getContext()) : null; - this.stat = toRpcStat(event.getStat()); - this.data = event.getData(); - this.name = event.getName(); - this.children = event.getChildren(); - this.aclList = toRpcAclList(event.getACLList()); - this.watchedEvent = toRpcWatchedEvent(event.getWatchedEvent()); - this.leaderEvent = null; - this.childrenCacheEvent = null; - } - - public RpcCuratorEvent(ConnectionState newState) - { - this.type = RpcCuratorEventType.valueOf("CONNECTION_" + newState.name()); - this.resultCode = 0; - this.path = null; - this.context = null; - this.stat = null; - this.data = null; - this.name = null; - this.children = null; - this.aclList = null; - this.watchedEvent = null; - this.leaderEvent = null; - this.childrenCacheEvent = null; - } - - public RpcCuratorEvent(WatchedEvent event) - { - this.type = RpcCuratorEventType.WATCHED; - this.resultCode = 0; - this.path = event.getPath(); - this.context = null; - this.stat = null; - this.data = null; - this.name = null; - this.children = null; - this.aclList = null; - this.watchedEvent = new RpcWatchedEvent(RpcKeeperState.valueOf(event.getState().name()), RpcEventType.valueOf(event.getType().name()), event.getPath()); - this.leaderEvent = null; - this.childrenCacheEvent = null; - } - - public RpcCuratorEvent(LeaderEvent event) - { - this.type = RpcCuratorEventType.LEADER; - this.resultCode = 0; - this.path = event.path; - this.context = null; - this.stat = null; - this.data = null; - this.name = null; - this.children = null; - this.aclList = null; - this.watchedEvent = null; - this.leaderEvent = event; - this.childrenCacheEvent = null; - } - - public static RpcStat toRpcStat(Stat stat) - { - if ( stat != null ) - { - return new RpcStat(stat); - } - return null; - } - - private List toRpcAclList(List aclList) - { - if ( aclList != null ) - { - return Lists.transform - ( - aclList, - new Function() - { - @Nullable - @Override - public RpcAcl apply(ACL acl) - { - RpcId id = new RpcId(acl.getId().getScheme(), acl.getId().getId()); - return new RpcAcl(acl.getPerms(), id); - } - } - ); - } - return null; - } - - private RpcWatchedEvent toRpcWatchedEvent(WatchedEvent watchedEvent) - { - if ( watchedEvent != null ) - { - return new RpcWatchedEvent(watchedEvent); - } - return null; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcCuratorEventType.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcCuratorEventType.java deleted file mode 100644 index 88b4a1ff32..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcCuratorEventType.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftEnum; - -@ThriftEnum("CuratorEventType") -public enum RpcCuratorEventType -{ - PING, - CREATE, - DELETE, - EXISTS, - GET_DATA, - SET_DATA, - CHILDREN, - SYNC, - GET_ACL, - SET_ACL, - WATCHED, - CLOSING, - CONNECTION_CONNECTED, - CONNECTION_SUSPENDED, - CONNECTION_RECONNECTED, - CONNECTION_LOST, - CONNECTION_READ_ONLY, - LEADER, - PATH_CHILDREN_CACHE, - NODE_CACHE -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcEventType.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcEventType.java deleted file mode 100644 index d20adb0ed1..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcEventType.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftEnum; - -@ThriftEnum("EventType") -public enum RpcEventType -{ - None, - NodeCreated, - NodeDeleted, - NodeDataChanged, - NodeChildrenChanged -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcId.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcId.java deleted file mode 100644 index 233736bcce..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcId.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct("Id") -public class RpcId -{ - @ThriftField(1) - public String scheme; - - @ThriftField(2) - public String id; - - public RpcId() - { - } - - public RpcId(String scheme, String id) - { - this.scheme = scheme; - this.id = id; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcKeeperState.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcKeeperState.java deleted file mode 100644 index 8839a1d004..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcKeeperState.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftEnum; - -@ThriftEnum("KeeperState") -public enum RpcKeeperState -{ - Unknown, - Disconnected, - NoSyncConnected, - SyncConnected, - AuthFailed, - ConnectedReadOnly, - SaslAuthenticated, - Expired -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcParticipant.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcParticipant.java deleted file mode 100644 index f573b21cdf..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcParticipant.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct("Participant") -public class RpcParticipant -{ - @ThriftField(1) - public String id; - - @ThriftField(2) - public boolean isLeader; - - public RpcParticipant() - { - } - - public RpcParticipant(String id, boolean isLeader) - { - this.id = id; - this.isLeader = isLeader; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcPathChildrenCacheEvent.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcPathChildrenCacheEvent.java deleted file mode 100644 index 7f243a7c2b..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcPathChildrenCacheEvent.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; -import org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent; - -@ThriftStruct("PathChildrenCacheEvent") -public class RpcPathChildrenCacheEvent -{ - @ThriftField(1) - public String cachedPath; - - @ThriftField(2) - public RpcPathChildrenCacheEventType type; - - @ThriftField(3) - public RpcChildData data; - - public RpcPathChildrenCacheEvent() - { - } - - public RpcPathChildrenCacheEvent(String cachedPath, PathChildrenCacheEvent event) - { - this.cachedPath = cachedPath; - type = RpcPathChildrenCacheEventType.valueOf(event.getType().name()); - data = (event.getData() != null) ? new RpcChildData(event.getData()) : null; - } - - public RpcPathChildrenCacheEvent(String cachedPath, RpcPathChildrenCacheEventType type, RpcChildData data) - { - this.cachedPath = cachedPath; - this.type = type; - this.data = data; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcPathChildrenCacheEventType.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcPathChildrenCacheEventType.java deleted file mode 100644 index 72da6d00e5..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcPathChildrenCacheEventType.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftEnum; - -@ThriftEnum("PathChildrenCacheEventType") -public enum RpcPathChildrenCacheEventType -{ - CHILD_ADDED, - CHILD_UPDATED, - CHILD_REMOVED, - CONNECTION_SUSPENDED, - CONNECTION_RECONNECTED, - CONNECTION_LOST, - INITIALIZED -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcPersistentEphemeralNodeMode.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcPersistentEphemeralNodeMode.java deleted file mode 100644 index 0e73dd3e9e..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcPersistentEphemeralNodeMode.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftEnum; - -@ThriftEnum("PersistentEphemeralNodeMode") -public enum RpcPersistentEphemeralNodeMode -{ - EPHEMERAL, - EPHEMERAL_SEQUENTIAL, - PROTECTED_EPHEMERAL, - PROTECTED_EPHEMERAL_SEQUENTIAL -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcStat.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcStat.java deleted file mode 100644 index 5e62f155dc..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcStat.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; -import org.apache.zookeeper.data.Stat; - -@ThriftStruct("Stat") -public class RpcStat -{ - @ThriftField(1) - public long czxid; - - @ThriftField(2) - public long mzxid; - - @ThriftField(3) - public long ctime; - - @ThriftField(4) - public long mtime; - - @ThriftField(5) - public int version; - - @ThriftField(6) - public int cversion; - - @ThriftField(7) - public int aversion; - - @ThriftField(8) - public long ephemeralOwner; - - @ThriftField(9) - public int dataLength; - - @ThriftField(10) - public int numChildren; - - @ThriftField(11) - public long pzxid; - - public RpcStat() - { - } - - public RpcStat(Stat stat) - { - czxid = stat.getCzxid(); - mzxid = stat.getMzxid(); - ctime = stat.getCtime(); - mtime = stat.getMtime(); - version = stat.getVersion(); - cversion = stat.getCversion(); - aversion = stat.getAversion(); - ephemeralOwner = stat.getEphemeralOwner(); - dataLength = stat.getDataLength(); - numChildren = stat.getNumChildren(); - pzxid = stat.getPzxid(); - } - - public RpcStat(long czxid, long mzxid, long ctime, long mtime, int version, int cversion, int aversion, long ephemeralOwner, int dataLength, int numChildren, long pzxid) - { - this.czxid = czxid; - this.mzxid = mzxid; - this.ctime = ctime; - this.mtime = mtime; - this.version = version; - this.cversion = cversion; - this.aversion = aversion; - this.ephemeralOwner = ephemeralOwner; - this.dataLength = dataLength; - this.numChildren = numChildren; - this.pzxid = pzxid; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcWatchedEvent.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcWatchedEvent.java deleted file mode 100644 index cc7e81865f..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/RpcWatchedEvent.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; -import org.apache.zookeeper.WatchedEvent; - -@ThriftStruct("WatchedEvent") -public class RpcWatchedEvent -{ - @ThriftField(1) - public RpcKeeperState keeperState; - - @ThriftField(2) - public RpcEventType eventType; - - @ThriftField(3) - public String path; - - public RpcWatchedEvent() - { - } - - public RpcWatchedEvent(WatchedEvent watchedEvent) - { - keeperState = RpcKeeperState.valueOf(watchedEvent.getState().name()); - eventType = RpcEventType.valueOf(watchedEvent.getType().name()); - path = watchedEvent.getPath(); - } - - public RpcWatchedEvent(RpcKeeperState keeperState, RpcEventType eventType, String path) - { - this.keeperState = keeperState; - this.eventType = eventType; - this.path = path; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/SetDataSpec.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/SetDataSpec.java deleted file mode 100644 index 081469901a..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/SetDataSpec.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class SetDataSpec -{ - @ThriftField(1) - public String path; - - @ThriftField(2) - public boolean watched; - - @ThriftField(3) - public String asyncContext; - - @ThriftField(4) - public boolean compressed; - - @ThriftField(5) - public Version version; - - @ThriftField(6) - public byte[] data; - - public SetDataSpec() - { - } - - public SetDataSpec(String path, boolean watched, String asyncContext, boolean compressed, Version version, byte[] data) - { - this.path = path; - this.watched = watched; - this.asyncContext = asyncContext; - this.compressed = compressed; - this.version = version; - this.data = data; - } -} diff --git a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/Version.java b/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/Version.java deleted file mode 100644 index 0812cdf2bb..0000000000 --- a/curator-x-rpc/src/main/java/org/apache/curator/x/rpc/idl/structs/Version.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc.idl.structs; - -import com.facebook.swift.codec.ThriftField; -import com.facebook.swift.codec.ThriftStruct; - -@ThriftStruct -public class Version -{ - @ThriftField(1) - public int version; - - public Version() - { - } - - public Version(int version) - { - this.version = version; - } -} diff --git a/curator-x-rpc/src/main/resources/curator/help.txt b/curator-x-rpc/src/main/resources/curator/help.txt deleted file mode 100644 index 7479e23544..0000000000 --- a/curator-x-rpc/src/main/resources/curator/help.txt +++ /dev/null @@ -1,72 +0,0 @@ -Curator RPC - an RPC server for using Apache Curator APIs and recipes from non JVM languages. - -Arguments: - show this help - either a path to a JSON or YAML configuration file or a JSON/YAML object for - configuration - -Curator RPC uses Dropwizard for configuration. The format is JSON or YAML (your choice). Here is -the model configuration shown in JSON with added comments. Required fields have "*" in the comment. - -{ - "thrift": { // * Thrift server configuration - "bindAddress": "string", // address to bind to. Default is "localhost" - "port": int, // * port to listen on - "acceptBacklog": int, // default is 1024 - "connectionLimit": int, // max concurrent connections. Default is unlimited. - "acceptorThreadCount": int, // default is 1 - "ioThreadCount": int, // default is 2 * number of processors - "idleConnectionTimeout": "Duration", // default is 60 seconds - "transportName": "string", // default is "framed" - "protocolName": "string" // default is "binary" - }, - - "projectionExpiration": "Duration", // time for projections to expire if unused. Default is 3 - // minutes. - - "pingTime": "Duration", // time that the EventService will return PING if no other events. - // Default is 5 seconds. - - "connections": [ // * list of ZooKeeper connections - "name": "string", // * unique name for the connection - "connectionString": "string", // * ZooKeeper connection string (e.g. "host1:2181,host2:2181") - "sessionLength": "Duration", // duration for the session. Default is 1 minute. - "connectionTimeout": "Duration", // duration for connecting. Default is 15 seconds. - "authorization": { // Authorization spec. Default is NULL. - "scheme": "string", // * the authorization scheme - "auth": "string" // * the authorization auth - }, - "namespace": "string", // Curator namespace. Default is NULL. - "retry": { // Retry policy. Default is an exponential-backoff policy. - "type": "string", // Policy type. Either "exponential-backoff", - // "bounded-exponential-backoff" or "ntimes" - -- Remaining values depending on type. See below -- - }, - ], - - "logging": { // logging config - Dropwizard's logging library is used - See http://dropwizard.readthedocs.org/en/latest/manual/configuration.html#logging - } -} - -"Duration" is a string. E.g. "1s" (1 second), "10m" (10 minutes) - -Retry Policy Specs: - For type: "exponential-backoff" - { - "baseSleepTime": "Duration", // default is 100 milliseconds - "maxRetries": int // default is 3 - } - - For type: "bounded-exponential-backoff" - { - "baseSleepTime": "Duration", // default is 100 milliseconds - "maxSleepTime": "Duration", // default is 30 seconds - "maxRetries": int // default is 3 - } - - For type: "ntimes" - { - "sleepBetweenRetries": "Duration", // default is 100 milliseconds - "n": int // default is 3 - } diff --git a/curator-x-rpc/src/main/scripts/apply-thrift.sh b/curator-x-rpc/src/main/scripts/apply-thrift.sh deleted file mode 100755 index 535765da62..0000000000 --- a/curator-x-rpc/src/main/scripts/apply-thrift.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - - -if (( $# == 0 )); then - echo -e "usage:\n\tapply-thrift.sh " - exit -fi - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -BASE_DIR="$( cd "$DIR/../../../.." && pwd )" - -if (( $# == 2 )); then - TARGET_DIR="$2" -else - TARGET_DIR="$BASE_DIR/curator-x-rpc/src/test/java" -fi - -thrift -gen $1 -out "$TARGET_DIR" "$BASE_DIR/curator-x-rpc/src/main/thrift/curator.thrift" diff --git a/curator-x-rpc/src/main/scripts/generate.sh b/curator-x-rpc/src/main/scripts/generate.sh deleted file mode 100755 index ddcbff4fcb..0000000000 --- a/curator-x-rpc/src/main/scripts/generate.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - - -if (( $# != 2 )); then - echo -e "usage:\n\tgenerate.sh " - exit -fi - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -BASE_DIR="$( cd "$DIR/../../../.." && pwd )" - -RPC_PATH="$BASE_DIR/curator-x-rpc/target/classes" - -CLASSES="" - -for p in services structs exceptions discovery; do - for f in `ls -m1 $RPC_PATH/org/apache/curator/x/rpc/idl/$p/*.class | xargs -n 1 basename | sed s/\.[^\.]*$//`; do - if [[ $f != *[\$]* ]]; then - CLASSES="$CLASSES org.apache.curator.x.rpc.idl.$p.$f"; - fi; - done; -done; - -THRIFT_DIR="$BASE_DIR/curator-x-rpc/src/main/thrift" - -PATHS="$1:$2" -PATHS="$PATHS:$BASE_DIR/curator-client/target/classes" -PATHS="$PATHS:$BASE_DIR/curator-framework/target/classes" -PATHS="$PATHS:$BASE_DIR/curator-recipes/target/classes" -PATHS="$PATHS:$BASE_DIR/curator-x-discovery/target/classes" -PATHS="$PATHS:$RPC_PATH" - -java -cp $PATHS com.facebook.swift.generator.swift2thrift.Main \ - -allow_multiple_packages org.apache.curator \ - -namespace cpp org.apache.curator.generated \ - -namespace java org.apache.curator.generated \ - -out "$THRIFT_DIR/curator.thrift" \ - $CLASSES diff --git a/curator-x-rpc/src/main/thrift/curator.thrift b/curator-x-rpc/src/main/thrift/curator.thrift deleted file mode 100644 index 41f23624a2..0000000000 --- a/curator-x-rpc/src/main/thrift/curator.thrift +++ /dev/null @@ -1,297 +0,0 @@ -namespace java.swift org.apache.curator -namespace cpp org.apache.curator.generated -namespace java org.apache.curator.generated - - -enum PathChildrenCacheStartMode { - NORMAL, BUILD_INITIAL_CACHE, POST_INITIALIZED_EVENT -} - -enum CreateMode { - PERSISTENT, PERSISTENT_SEQUENTIAL, EPHEMERAL, EPHEMERAL_SEQUENTIAL, CONTAINER -} - -enum CuratorEventType { - PING, CREATE, DELETE, EXISTS, GET_DATA, SET_DATA, CHILDREN, SYNC, GET_ACL, SET_ACL, WATCHED, CLOSING, CONNECTION_CONNECTED, CONNECTION_SUSPENDED, CONNECTION_RECONNECTED, CONNECTION_LOST, CONNECTION_READ_ONLY, LEADER, PATH_CHILDREN_CACHE, NODE_CACHE -} - -enum EventType { - None, NodeCreated, NodeDeleted, NodeDataChanged, NodeChildrenChanged -} - -enum KeeperState { - Unknown, Disconnected, NoSyncConnected, SyncConnected, AuthFailed, ConnectedReadOnly, SaslAuthenticated, Expired -} - -enum PathChildrenCacheEventType { - CHILD_ADDED, CHILD_UPDATED, CHILD_REMOVED, CONNECTION_SUSPENDED, CONNECTION_RECONNECTED, CONNECTION_LOST, INITIALIZED -} - -enum PersistentEphemeralNodeMode { - EPHEMERAL, EPHEMERAL_SEQUENTIAL, PROTECTED_EPHEMERAL, PROTECTED_EPHEMERAL_SEQUENTIAL -} - -enum ExceptionType { - GENERAL, ZOOKEEPER, NODE -} - -enum NodeExceptionType { - NONODE, BADVERSION, NODEEXISTS, NOTEMPTY -} - -enum ZooKeeperExceptionType { - SYSTEMERROR, RUNTIMEINCONSISTENCY, DATAINCONSISTENCY, CONNECTIONLOSS, MARSHALLINGERROR, UNIMPLEMENTED, OPERATIONTIMEOUT, BADARGUMENTS, APIERROR, NOAUTH, NOCHILDRENFOREPHEMERALS, INVALIDACL, AUTHFAILED, SESSIONEXPIRED, INVALIDCALLBACK, SESSIONMOVED, NOTREADONLY -} - -enum DiscoveryInstanceType { - DYNAMIC, STATIC, PERMANENT -} - -enum ProviderStrategyType { - RANDOM, STICKY_RANDOM, STICKY_ROUND_ROBIN, ROUND_ROBIN -} - -struct CuratorProjection { - 1: string id; -} - -struct ExistsSpec { - 1: string path; - 2: bool watched; - 3: string asyncContext; -} - -struct GetChildrenSpec { - 1: string path; - 2: bool watched; - 3: string asyncContext; -} - -struct GetDataSpec { - 1: string path; - 2: bool watched; - 3: string asyncContext; - 4: bool decompressed; -} - -struct LeaderEvent { - 1: string path; - 2: string participantId; - 3: bool isLeader; -} - -struct LeaderProjection { - 1: string id; -} - -struct LeaderResult { - 1: LeaderProjection projection; - 2: bool isLeader; -} - -struct LeaseProjection { - 1: string id; -} - -struct LockProjection { - 1: string id; -} - -struct NodeCacheProjection { - 1: string id; -} - -struct OptionalChildrenList { - 1: list children; -} - -struct OptionalData { - 1: binary data; -} - -struct OptionalLockProjection { - 1: LockProjection lockProjection; -} - -struct OptionalPath { - 1: string path; -} - -struct PathChildrenCacheProjection { - 1: string id; -} - -struct PersistentEphemeralNodeProjection { - 1: string id; -} - -struct Id { - 1: string scheme; - 2: string id; -} - -struct Participant { - 1: string id; - 2: bool isLeader; -} - -struct Stat { - 1: i64 czxid; - 2: i64 mzxid; - 3: i64 ctime; - 4: i64 mtime; - 5: i32 version; - 6: i32 cversion; - 7: i32 aversion; - 8: i64 ephemeralOwner; - 9: i32 dataLength; - 10: i32 numChildren; - 11: i64 pzxid; -} - -struct WatchedEvent { - 1: KeeperState keeperState; - 2: EventType eventType; - 3: string path; -} - -struct Version { - 1: i32 version; -} - -struct DiscoveryProjection { - 1: string id; -} - -struct DiscoveryProviderProjection { - 1: string id; -} - -struct CreateSpec { - 1: string path; - 2: binary data; - 3: CreateMode mode; - 4: string asyncContext; - 5: bool compressed; - 6: bool creatingParentsIfNeeded; - 7: bool withProtection; - 8: bool creatingParentContainersIfNeeded; -} - -struct DeleteSpec { - 1: string path; - 2: bool guaranteed; - 3: string asyncContext; - 4: Version version; -} - -struct OptionalStat { - 1: Stat stat; -} - -struct Acl { - 1: i32 perms; - 2: Id id; -} - -struct ChildData { - 1: string path; - 2: Stat stat; - 3: binary data; -} - -struct PathChildrenCacheEvent { - 1: string cachedPath; - 2: PathChildrenCacheEventType type; - 3: ChildData data; -} - -struct SetDataSpec { - 1: string path; - 2: bool watched; - 3: string asyncContext; - 4: bool compressed; - 5: Version version; - 6: binary data; -} - -exception CuratorException { - 1: ExceptionType type; - 2: ZooKeeperExceptionType zooKeeperException; - 3: NodeExceptionType nodeException; - 4: string message; -} - -struct DiscoveryInstance { - 1: string name; - 2: string id; - 3: string address; - 4: i32 port; - 5: i32 sslPort; - 6: binary payload; - 7: i64 registrationTimeUTC; - 8: DiscoveryInstanceType serviceType; - 9: string uriSpec; -} - -struct CuratorEvent { - 2: CuratorEventType type; - 3: i32 resultCode; - 4: string path; - 5: string context; - 6: Stat stat; - 7: binary data; - 8: string name; - 9: list children; - 10: list aclList; - 11: WatchedEvent watchedEvent; - 12: LeaderEvent leaderEvent; - 13: PathChildrenCacheEvent childrenCacheEvent; -} - -service CuratorService { - OptionalLockProjection acquireLock(1: CuratorProjection projection, 2: string path, 3: i32 maxWaitMs) throws (1: CuratorException ex1); - list acquireSemaphore(1: CuratorProjection projection, 2: string path, 3: i32 acquireQty, 4: i32 maxWaitMs, 5: i32 maxLeases) throws (1: CuratorException ex1); - void closeCuratorProjection(1: CuratorProjection projection); - bool closeGenericProjection(1: CuratorProjection projection, 2: string id) throws (1: CuratorException ex1); - OptionalPath createNode(1: CuratorProjection projection, 2: CreateSpec spec) throws (1: CuratorException ex1); - void deleteNode(1: CuratorProjection projection, 2: DeleteSpec spec) throws (1: CuratorException ex1); - OptionalStat exists(1: CuratorProjection projection, 2: ExistsSpec spec) throws (1: CuratorException ex1); - OptionalChildrenList getChildren(1: CuratorProjection projection, 2: GetChildrenSpec spec) throws (1: CuratorException ex1); - OptionalData getData(1: CuratorProjection projection, 2: GetDataSpec spec) throws (1: CuratorException ex1); - list getLeaderParticipants(1: CuratorProjection projection, 2: LeaderProjection leaderProjection) throws (1: CuratorException ex1); - ChildData getNodeCacheData(1: CuratorProjection projection, 2: NodeCacheProjection cacheProjection) throws (1: CuratorException ex1); - list getPathChildrenCacheData(1: CuratorProjection projection, 2: PathChildrenCacheProjection cacheProjection) throws (1: CuratorException ex1); - ChildData getPathChildrenCacheDataForPath(1: CuratorProjection projection, 2: PathChildrenCacheProjection cacheProjection, 3: string path) throws (1: CuratorException ex1); - bool isLeader(1: CuratorProjection projection, 2: LeaderProjection leaderProjection) throws (1: CuratorException ex1); - CuratorProjection newCuratorProjection(1: string connectionName) throws (1: CuratorException ex1); - oneway void pingCuratorProjection(1: CuratorProjection projection); - OptionalStat setData(1: CuratorProjection projection, 2: SetDataSpec spec) throws (1: CuratorException ex1); - LeaderResult startLeaderSelector(1: CuratorProjection projection, 2: string path, 3: string participantId, 4: i32 waitForLeadershipMs) throws (1: CuratorException ex1); - NodeCacheProjection startNodeCache(1: CuratorProjection projection, 2: string path, 3: bool dataIsCompressed, 4: bool buildInitial) throws (1: CuratorException ex1); - PathChildrenCacheProjection startPathChildrenCache(1: CuratorProjection projection, 2: string path, 3: bool cacheData, 4: bool dataIsCompressed, 5: PathChildrenCacheStartMode startMode) throws (1: CuratorException ex1); - PersistentEphemeralNodeProjection startPersistentEphemeralNode(1: CuratorProjection projection, 2: string path, 3: binary data, 4: PersistentEphemeralNodeMode mode) throws (1: CuratorException ex1); - void sync(1: CuratorProjection projection, 2: string path, 3: string asyncContext) throws (1: CuratorException ex1); -} - -service EventService { - CuratorEvent getNextEvent(1: CuratorProjection projection) throws (1: CuratorException ex1); -} - -service DiscoveryService { - list getAllInstances(1: CuratorProjection projection, 2: DiscoveryProviderProjection providerProjection) throws (1: CuratorException ex1); - DiscoveryInstance getInstance(1: CuratorProjection projection, 2: DiscoveryProviderProjection providerProjection) throws (1: CuratorException ex1); - DiscoveryInstance makeDiscoveryInstance(1: string name, 2: binary payload, 3: i32 port) throws (1: CuratorException ex1); - void noteError(1: CuratorProjection projection, 2: DiscoveryProviderProjection providerProjection, 3: string instanceId) throws (1: CuratorException ex1); - DiscoveryProjection startDiscovery(1: CuratorProjection projection, 2: string basePath, 3: DiscoveryInstance yourInstance) throws (1: CuratorException ex1); - DiscoveryProviderProjection startProvider(1: CuratorProjection projection, 2: DiscoveryProjection discoveryProjection, 3: string serviceName, 4: ProviderStrategyType providerStrategy, 5: i32 downTimeoutMs, 6: i32 downErrorThreshold) throws (1: CuratorException ex1); -} - -service DiscoveryServiceLowLevel { - DiscoveryInstance queryForInstance(1: CuratorProjection projection, 2: DiscoveryProjection discoveryProjection, 3: string name, 4: string id) throws (1: CuratorException ex1); - list queryForInstances(1: CuratorProjection projection, 2: DiscoveryProjection discoveryProjection, 3: string name) throws (1: CuratorException ex1); - list queryForNames(1: CuratorProjection projection, 2: DiscoveryProjection discoveryProjection) throws (1: CuratorException ex1); - void registerInstance(1: CuratorProjection projection, 2: DiscoveryProjection discoveryProjection, 3: DiscoveryInstance instance) throws (1: CuratorException ex1); - void unregisterInstance(1: CuratorProjection projection, 2: DiscoveryProjection discoveryProjection, 3: DiscoveryInstance instance) throws (1: CuratorException ex1); - void updateInstance(1: CuratorProjection projection, 2: DiscoveryProjection discoveryProjection, 3: DiscoveryInstance instance) throws (1: CuratorException ex1); -} diff --git a/curator-x-rpc/src/site/confluence/configuration.confluence b/curator-x-rpc/src/site/confluence/configuration.confluence deleted file mode 100644 index 56f6cfe92c..0000000000 --- a/curator-x-rpc/src/site/confluence/configuration.confluence +++ /dev/null @@ -1,143 +0,0 @@ -[[Curator RPC Proxy|index.html]] / Configuration - -h1. Configuration - -h2. Introduction - -Curator RPC uses [[Dropwizard|http://dropwizard.readthedocs.org/en/latest/]] for configuration. You can write the configuration in JSON or YAML. -It can be passed to Curator RPC via a file or directly on the command line. i.e. - -{noformat} -# via command line -java -jar curator-x-rpc-VERSION.jar '{"thrift":{"port": 8080}}' -{noformat} - -{noformat} -# via file -java -jar curator-x-rpc-VERSION.jar path/to/config.json -{noformat} - -h2. Example - -Here is an example JSON configuration file - -{noformat} -{ - "projectionExpiration": "15s", - - "thrift": { - "port": 1234 - }, - - "pingTime": "10s", - - "logging": { - "level": "INFO", - - "appenders": [ - { - "type": "file", - "currentLogFilename": "logs/curator-rpc.log", - "archivedLogFilenamePattern": "logs/curator-rpc-%d.log.gz", - "archivedFileCount": 10, - "timeZone": "UTC" - }, - - { - "type": "console" - } - ] - }, - - "connections": [ - { - "name": "main", - "connectionString": "one:1,two:2", - "sessionLength": "3m", - "connectionTimeout": "20s", - "retry": { - "type": "exponential-backoff", - "baseSleepTime": "1s", - "maxRetries": 10 - } - }, - - { - "name": "alt", - "connectionString": "three:3,four:4", - "sessionLength": "4m", - "connectionTimeout": "30s", - "retry": { - "type": "ntimes", - "sleepBetweenRetries": "1m", - "n": 10 - } - } - ] -} -{noformat} - - -h2. Main - -||Name||Type||Default Value||Description|| -|thrift|Thrift|n/a|Thrift server configuration| -|logging|Logging|n/a|log file configuration| -|projectionExpiration|Duration|3 minutes|Curator Projection instances will be automatically closed if not accessed within this amount of time| -|pingTime|Duration|5 seconds|The EventService will return a PING event if this time elapses without some other event being generated| -|connections|List of Connection|n/a|List of ZooKeeper connections| - -h2. Duration - -Durations are strings that specify a time duration. Examples: -* "10s" \- 10 seconds -* "100ms" \- 100 milliseconds -* "3h" \- 3 hours - -h2. Thrift - -||Name||Type||Default Value||Required||Description|| -|port|int|_none_|*Y*|port to listen on.| -|bindAddress|string|"localhost"|\-|Address for server to bind to| -|idleConnectionTimeout|int|60 seconds|\-|timeout period between receiving requests from a client connection. If the timeout is exceeded (no complete requests have arrived from the client within the timeout), the server will disconnect the idle client.| -|transportName|string|"framed"|\-|the name of the transport (frame codec) that this server will handle. The available options by default are 'unframed', 'buffered', and 'framed'. Additional modules may install other options.| -|protocolName|string|"binary"|\-|name of the protocol that this server will speak. The available options by default are 'binary' and 'compact'. Additional modules may install other options.| - -h2. Logging - -Dropwizard's logging module is used. See the [[Dropwizard Logging Doc|http://dropwizard.readthedocs.org/en/latest/manual/configuration.html#logging]] for details -on specifying the logging configuration. - -h2. Connection - -||Name||Type||Default Value||Required||Description|| -|name|string|_none_|*Y*|Unique name for the connection.| -|connectionString|string|_none_|*Y*|ZooKeeper connection string (e.g. "host1:2181,host2:2181").| -|sessionLength|Duration|1 minute|\-|duration for the ZooKeeper session| -|connectionTimeout|Duration|15 seconds|\-|duration for connecting| -|retry|Retry|an exponential\-backoff policy|\-|The Retry Policy to use| -|authorization|Authorization|null|\-|Authorization spec| - -h2. Retry - -The retry policy configuration depends on what type is used. There are three types supported: - -||Name||Type||Default Value||Description|| -|type|string|n/a|*exponential\-backoff*| -|baseSleepTime|Duration|100 milliseconds|The base sleep time| -|maxRetries|int|3|The max retries| -|\_|\_|\_|\_| -|type|string|n/a|*bounded\-exponential\-backoff*| -|baseSleepTime|Duration|100 milliseconds|The base sleep time| -|maxSleepTime|Duration|30 seconds|The max sleep time| -|maxRetries|int|3|The max retries| -|\_|\_|\_|\_| -|type|string|n/a|*ntimes*| -|sleepBetweenRetries|int|100 milliseconds|sleep time between retries| -|n|int|3|the number of retries| - -h2. Authorization - -||Name||Type||Description|| -|scheme|string|the authorization scheme| -|auth|string|the authorization auth| diff --git a/curator-x-rpc/src/site/confluence/deploy.confluence b/curator-x-rpc/src/site/confluence/deploy.confluence deleted file mode 100644 index 3f5053bd4d..0000000000 --- a/curator-x-rpc/src/site/confluence/deploy.confluence +++ /dev/null @@ -1,31 +0,0 @@ -[[Curator RPC Proxy|index.html]] / Deployment - -h1. Deployment - -h2. Running - -Curator RPC is built as an "uber" Java JAR and can be downloaded from Maven Central. Go to [[http://search.maven.org/|http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.apache.curator%22%20AND%20a%3A%22curator-x-rpc%22]] -and search for "curator\-x\-rpc" and download the JAR for the latest version. This JAR can be run directly ala: - -{noformat} -java -jar curator-x-rpc-VERSION.jar -{noformat} - -The argument is either a configuration file or a JSON or YAML string. Call without the argument for help text. See [[Configuration|configuration.html]] for details. - -h2. Deploying - -Curator RPC is designed to have an instance of its Thrift Server co\-located on each client instance that needs to connect to ZooKeeper -(see the figure below). Each Curator RPC instance is configured (see [[Configuration|configuration.html]]) to connect to one or more -ZooKeeper clusters. The Curator Framework instances are maintained inside of the Curator RPC instances and RPC clients reference these instances by name. - -How you configure your server to launch depends on your environment and other needs. Here are some suggestions: - -* [Airlift Launcher|https://github.com/airlift/airlift/tree/master/launcher] -* [Docker|https://www.docker.io/] -* [One-JAR|http://one-jar.sourceforge.net/] -* [Capsule|https://github.com/puniverse/capsule] - -h2. Topology - -!images/topology.png! diff --git a/curator-x-rpc/src/site/confluence/events.confluence b/curator-x-rpc/src/site/confluence/events.confluence deleted file mode 100644 index 6a3e29be48..0000000000 --- a/curator-x-rpc/src/site/confluence/events.confluence +++ /dev/null @@ -1,90 +0,0 @@ -[[Curator RPC Proxy|index.html]] / Events - -h1. Events - -h2. Event Loop - -In order to receive out\-of\-bounds messages (connection state changes, watcher triggers, etc.) you must have an event loop to recieve -messages from the EventService. Here is pseudo code: - -{code} -inThread => { - while isOpen { - event = eventService.getNextEvent(curatorProjection) - ... process event ... - } -} -{code} - -*IMPORTANT:* your event handling should operate as quickly as possible. You should return to calling getNextEvent() as soon as possible. - -h2. Schema - -h3. CuratorEvent - -||Field||Type||Description|| -|type|CuratorEventType|The event type| -|resultCode|int|some event types have a result code (i.e. async API calls)| -|path|string|if there is a path associated with the event| -|context|string|async context for async API calls| -|stat|Stat|some event types have a ZooKeeper Stat object| -|data|bytes|ZNode data if the event type has it| -|name|string|ZNode name if the event type has it| -|children|list of string|list of node names if the event type has it| -|aclList|list of Acl|list of ACL data if the event type has it| -|watchedEvent|WatchedEvent|if the event type is WATCHED| -|leaderEvent|LeaderEvent|if the event type is LEADER| -|childrenCacheEvent|PathChildrenCacheEvent|if the event type is PATH\_CHILDREN\_CACHE| - -h3. CuratorEventType - -||Value||Description|| -|PING|Returned if no events have been generated within the [[configured|configuration.html]] pingTime| -|CREATE|Async createNode() API completion| -|DELETE|Async deleteNode() API completion| -|EXISTS|Async exists() API completion| -|GET\_DATA|Async getData() API completion| -|SET\_DATA|Async setData() API completion| -|CHILDREN|Async getChildren() API completion| -|SYNC|Async sync() API completion| -|WATCHED|A watcher has triggered| -|CONNECTION\_CONNECTED|A Curator ConnectionStateListener is installed. This event is for the initial successful connection.| -|CONNECTION\_SUSPENDED|A Curator ConnectionStateListener is installed. This event means the connection has been suspended.| -|CONNECTION\_RECONNECTED|A Curator ConnectionStateListener is installed. This event means the connection has been reconnected.| -|CONNECTION\_LOST|A Curator ConnectionStateListener is installed. This event means the connection has been lost.| -|CONNECTION\_READ\_ONLY|A Curator ConnectionStateListener is installed. This event means the connection has changed to read only.| -|LEADER|A Leader recipe event| -|PATH\_CHILDREN\_CACHE|A path children cache event| -|NODE\_CACHE|The node for a node cache has changed| - -h3. LeaderEvent - -||Field||Type||Description|| -|path|string|The leader's path| -|participantId|string|The participant ID for the event being reported| -|isLeader|bool|if true, this participant is being made leader. If false, it is losing leadership.| - -h3. PathChildrenCacheEvent - -||Field||Type||Description|| -|cachedPath|name|The path being cached| -|type|PathChildrenCacheEventType|cache event type| -|data|ChildData|data for the child ZNode| - -h3. PathChildrenCacheEventType - -Values: CHILD\_ADDED, - CHILD\_UPDATED, - CHILD\_REMOVED, - CONNECTION\_SUSPENDED, - CONNECTION\_RECONNECTED, - CONNECTION\_LOST, - INITIALIZED - -h3. ChildData - -||Field||Type||Description|| -|path|string|The ZNode path| -|stat|Stat|ZooKeeper Stat object| -|data|bytes|ZNode data (if the cache is configured to cache data)| - diff --git a/curator-x-rpc/src/site/confluence/index.confluence b/curator-x-rpc/src/site/confluence/index.confluence deleted file mode 100644 index 70077ac196..0000000000 --- a/curator-x-rpc/src/site/confluence/index.confluence +++ /dev/null @@ -1,49 +0,0 @@ -h1. Curator RPC Proxy - -h2. Packaging - -Curator RPC Proxy is in its own package in Maven Central: curator\-x\-rpc - -h2. What Is a Curator RPC? - -The Curator RPC module implements a proxy that bridges non\-java environments with the Curator framework and recipes. It uses -[[Apache Thrift|http://thrift.apache.org]] which supports a large set of languages and environments. - -The benefits of Curator RPC are: - -* Gives access to Curator to non JVM languages/environments -** Curator has become the de\-facto JVM client library for ZooKeeper -** Curator makes using Apache ZooKeeper much easier -** Curator contains well\-tested recipes for many common ZooKeeper usages -* Organizations can unify their ZooKeeper usage across languages/environments (i.e. use Curator's Service Discovery recipe) -* The quality of ZooKeeper clients for some non\-JVM languages is lacking -* There are Thrift implementations for a large number of languages/environments - -h2. Thrift File - -The current Curator RPC Thrift File can be found here: [[https://raw.githubusercontent.com/apache/curator/master/curator-x-rpc/src/main/thrift/curator.thrift]]. Use -this to generate code for the language/environment you need. - -h2. Deployment - -See the [[Deployment Page|deploy.html]] for details on deploying the RPC proxy. - -h2. Usage - -See the [[Usage Page|usage.html]] for details on using the RPC proxy. - -h2. Configuration - -See [[Configuration|configuration.html]] for details on configuring the RPC proxy. - -h2. Events - -See [[Events|events.html]] for details on the Curator RPC event loop and its structure. - -h2. Reference - -See [[API Reference Page|reference.html]] for the API reference. - ----- - -Special thanks to the [[Facebook Swift|https://github.com/facebook/swift/]] project which makes writing a Java Thrift server much easier. diff --git a/curator-x-rpc/src/site/confluence/reference.confluence b/curator-x-rpc/src/site/confluence/reference.confluence deleted file mode 100644 index bb7ea46faa..0000000000 --- a/curator-x-rpc/src/site/confluence/reference.confluence +++ /dev/null @@ -1,120 +0,0 @@ -[[Curator RPC Proxy|index.html]] / Reference - -h1. API Reference - -h2. CuratorService - -||API||Arguments||Return Value||Description|| -|newCuratorProjection|connectionName|CuratorProjection|Allocates a projection to a configured CuratorFramework instance in the RPC server. "connectionName" is the name of a [[configured|configuration.html]] connection.| -|closeCuratorProjection|CuratorProjection|void|Close a CuratorProjection. Also closes any recipes, etc. created for the projection.| -|pingCuratorProjection|CuratorProjection|void|Keeps the CuratorProjection from timing out. NOTE: your [[EventService|events.html]] event loop will do this for you.| -|createNode|CreateSpec|Created path name|Create a ZNode| -|deleteNode|DeleteSpec|void|Delete a ZNode| -|getData|GetDataSpec|bytes|Return a ZNode's data| -|setData|SetDataSpec|Stat|Set a ZNode's data| -|exists|ExistsSpec|Stat|Check if a ZNode exists| -|getChildren|GetChildrenSpec|List of nodes|Get the child nodes for a ZNode| -|sync|path and async context|void|Do a ZooKeeper sync| -|closeGenericProjection|id|void|Closes any projection. All projections have an "id" field. This is the value to pass.| -|acquireLock|path, maxWaitMs|optional lock projection|Acquire a lock for the given path. Will wait at most maxWaitMs to acquire the lock. If the acquisition fails, result will be null.| -|startLeaderSelector|path, participantId, waitForLeadershipMs|LeaderResult|Start a leader selector on the given path. The instance will be assigned the specified participantId. If waitForLeadershipMs is non\-zero, the method will block for that amount of time waiting for leadership.| -|getLeaderParticipants|leaderProjection|List of Participant|Return the participants in a leader selector| -|isLeader|leaderProjection|bool|Return true if the specified projection is the current leader| -|startPathChildrenCache|path, cacheData, dataIsCompressed, startMode|cache projection|Start a PathChildrenCache for the given path. Can optionally cache data, use compressed data.| -|getPathChildrenCacheData|cacheProjection|List of ChildData|Get all the data for a path cache| -|getPathChildrenCacheDataForPath|cacheProjection, path|ChildData|Get the data for a single ZNode in a path cache| -|startNodeCache|path, dataIsCompressed, buildInitial|node cache projection|Start a node cache for the given path. Can optionally use compressed data and build the initial cache.| -|getNodeCacheData|node cache projection|ChildData|Return the data for the cached node. If the node doesn't exist, the fields of the ChildData object will be null.| -|startPersistentEphemeralNode|path, data, mode|projection|Start a PersistentEphemeralNode for the given path using the given data and mode.| -|acquireSemaphore|path, acquireQty, maxWaitMs, maxLeases|List of lease projections|Acquire one or more leases for a semaphore on the given path. acquireQty is the number of leases to acquire. maxWaitMs is the max time to wait to get the leases. maxLeases is the maximum leases to allow for the semaphore. If the number of leases cannot be acquired within the max time, an empty list is returned.| - -h2. EventService - -||API||Arguments||Return Value||Description|| -|getNextEvent|CuratorProjection|CuratorEvent|Returns the next queued event for the given CuratorProjection. If no events are queued within the [[configured|configuration.html]] ping time, a PING event is returned.| - -See the [[Events Page|events.html]] for the CuratorEvent schema reference. - -h2. DiscoveryService - -||API||Arguments||Return Value||Description|| -|makeDiscoveryInstance|name, payload, port|DiscoveryInstance|Return a completed DiscoveryInstance using the RPC server's address and the given name, payload and port.| -|startDiscovery|basePath, yourInstance|discovery projection|Start a Service Discovery instance on the given path. If yourInstance is not null it will be registered as the local service.| -|startProvider|discoveryProjection, serviceName, providerStrategy, downTimeoutMs, downErrorThreshold|provider projection|start a Service Discovery Provider to return instances for the given service name using the given provider strategy. Specify "down" instance characteristics with downTimeoutMs and downErrorThreshold.| -|getInstance|provider projection|DiscoveryInstance|Return a single instance for the given service| -|getAllInstances|provider projection|list of DiscoveryInstance|Return all instances for the given service| -|noteError|provider projection, service id|void|Note an error for the given service instance| - -h1. Struct Reference - -h2. CreateSpec - -||Field||Type||Required||Description|| -|path|string|*Y*|the ZNode path| -|data|bytes|\-|data for the node| -|mode|CreateMode|\-|PERSISTENT, PERSISTENT\_SEQUENTIAL, EPHEMERAL, or EPHEMERAL\_SEQUENTIAL| -|asyncContext|string|\-|if not null, createNode() is performed asynchronously and this is the context used in the async message| -|compressed|bool|\-|if true, compress the data| -|creatingParentsIfNeeded|bool|\-|if true, create any needed parent nodes| -|withProtection|bool|\-|if true, use Curator protection| -|creatingParentContainersIfNeeded|bool|\-|if true, create any needed parent nodes as CONTAINERs| - -h2. DeleteSpec - -||Field||Type||Required||Description|| -|path|string|*Y*|the ZNode path| -|guaranteed|bool|\-|if true, use guaranteed deletion| -|asyncContext|string|\-|if not null, createNode() is performed asynchronously and this is the context used in the async message| -|compressed|bool|\-|if true, compress the data| -|version|Version|\-|if not null, uses Version.version when deleting the node. Otherwise, \-1 is used.| - -h2. GetDataSpec - -||Field||Type||Required||Description|| -|path|string|*Y*|the ZNode path| -|watched|bool|\-|if true, trigger watch events for this node| -|asyncContext|string|\-|if not null, createNode() is performed asynchronously and this is the context used in the async message| -|decompressed|bool|\-|if true, decompress the data| - -h2. SetDataSpec - -||Field||Type||Required||Description|| -|path|string|*Y*|the ZNode path| -|data|bytes|*Y*|data for the node| -|watched|bool|\-|if true, trigger watch events for this node| -|asyncContext|string|\-|if not null, createNode() is performed asynchronously and this is the context used in the async message| -|compressed|bool|\-|if true, compress the data| -|version|Version|\-|if not null, uses Version.version when setting the node data. Otherwise, \-1 is used.| - -h2. ExistsSpec - -||Field||Type||Required||Description|| -|path|string|*Y*|the ZNode path| -|watched|bool|\-|if true, trigger watch events for this node| -|asyncContext|string|\-|if not null, createNode() is performed asynchronously and this is the context used in the async message| - -h2. GetChildrenSpec - -||Field||Type||Required||Description|| -|path|string|*Y*|the ZNode path| -|watched|bool|\-|if true, trigger watch events for this node| -|asyncContext|string|\-|if not null, createNode() is performed asynchronously and this is the context used in the async message| - -h2. LeaderResult - -||Field||Type||Description|| -|projection|LeaderProjection|the projection of the leader| -|isLeader|bool|true if this projection is the leader| - -h2. Participant - -||Field||Type||Description|| -|id|string|participant id| -|isLeader|bool|true if this participant is the leader| - -h2. ChildData - -||Field||Type||Description|| -|path|string|the ZNode path| -|stat|Stat|ZooKeeper stat for the node| -|data|bytes|node data or null| diff --git a/curator-x-rpc/src/site/confluence/usage.confluence b/curator-x-rpc/src/site/confluence/usage.confluence deleted file mode 100644 index 047ae5e4ac..0000000000 --- a/curator-x-rpc/src/site/confluence/usage.confluence +++ /dev/null @@ -1,115 +0,0 @@ -[[Curator RPC Proxy|index.html]] / Usage - -h1. Usage - -h2. Thrift File - -The first step in using the RPC Proxy is to process the Curator RPC Thrift file into your desired language/environment. -The current Curator RPC Thrift File can be found here: [[https://raw.githubusercontent.com/apache/curator/master/curator-x-rpc/src/main/thrift/curator.thrift]]. -Details on using Apache Thrift can be found here: [[http://thrift.apache.org]]. - -h2. Prerequisites - -It's assumed you are already familiar with ZooKeeper and Curator. Also, familiarity with writing Thrift applications is helpful. - -h2. Services - -Three Thrift Services are included with the Curator RPC: - -||Service||Description|| -|CuratorService|The main service for accessing the Curator APIs and recipes| -|EventService|Used to receive out\-of\-band messages for callbacks, watchers, etc. See [Events|events.html] for details.| -|DiscoveryService|Curator's ServiceDiscovery recipe| - -h2. Concepts - -h4. Projections - -Many of the Curator RPC APIs refer to "projections" (e.g. CuratorProjection). A projection is an id that refers -to a real object instance inside of the RPC server. The projection is a "handle" or "cookie" that directly refers to that instance. - -h4. Thrift Client Equals a Thread - -It's important to remember that each thrift client is the equivalent of a system thread. i.e. you cannot have multiple outstanding -calls in multiple threads with a given client. For each thread, you should allocate a separate client. A Thrift Client maps directly -to a single TCP/IP socket. - -h4. Event Loop - -You must dedicate a separate thread for getting events via the Curator RPC [EventService|events.html]. Curator will report async results, -connection state changes, watcher triggers, etc. via this event loop. - -h4. CuratorProjection Expiration - -If you don't make an API call using a CuratorProjection within the [configured timeout|configuration.html] the projection instance -will be closed and any open recipes, etc. associated with it will be closed. NOTE: calls to the EventService will cause the -CuratorProjection to be "touched". So, as long as your event loop is running your CuratorProjection instance will be kept open. - -h2. Initialization - -After setting up Thrift, create a connection to the CuratorService and the EventService. If you plan on using Curator Discovery, create a connection -to DiscoveryService. Allocate a CuratorProjection instance and then start a thread watching events for that instance. Here is pseudo code: - -{code} -CuratorService.Client curatorService = new CuratorService.Client() -EventService.Client eventService = new EventService.Client() - -curatorProjection = curatorService.newCuratorProjection(name) - -inThread => { - while isOpen { - event = eventService.getNextEvent(curatorProjection) - ... process event ... - } -} - -... in your application shutdown -client.closeCuratorProjection(curatorProjection) -{code} - -h2. Usage - -Once initialized, use recipes/APIs as needed. Here is an example of using the lock recipe: - -{code} -optionalLock = client.acquireLock(curatorProjection, "/mylock", 10000) -if optionalLock.lockProjection == null { - // lock attempt failed. Throw exception, etc. -} -lockProjection = optionalLock.lockProjection - -try - // you now own the lock -finally - client.closeGenericProjection(curatorProjection, lockProjection.id) -{code} - -Here is an example of using the path cache: - -{code} -cacheProjection = client.startPathChildrenCache(curatorProjection, "/path", true, false, BUILD_INITIAL_CACHE) - -... - -data = client.getPathChildrenCacheDataForPath(curatorProjection, cacheProjection, "/path/child") - -... - -// in your event loop, you will get events for the cache. e.g. -event = eventService.getNextEvent(curatorProjection) -if event.type == PATH_CHILDREN_CACHE { - if event.childrenCacheEvent.type == CHILD_UPDATED { - // node described by event.childrenCacheEvent.data has changed - // event.childrenCacheEvent.cachedPath is the path that was passed to startPathChildrenCache() - } -} - -... - -// when done with the cache, close it -client.closeGenericProjection(curatorProjection, cacheProjection.id) -{code} - -h2. Reference - -See [[API Reference Page|reference.html]] for the API reference. diff --git a/curator-x-rpc/src/site/resources/images/topology.png b/curator-x-rpc/src/site/resources/images/topology.png deleted file mode 100644 index cec7330ae012a97bcd8e82ffacf1577eb50a8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+3(If}2;nzUJG$3Oq*xc~7B##`Td%Xst6uh*ZM zyhs<|OMMZ(P=5=0Hrr`^@ba<89`nWc`0?Z81Hb)|@hi9gmvQmwhsV`_{Bm9N^MRfm z6Q`jrQGdDXIvH*?(HQ$KcdKXBp>DlE>gOD?W-SSJlcPv1L>{}%VmgsX{l4h=0$3=x zum@Vl$r_8ak=|lp=CIZy_iW!X_7LrFz`FIi+NRmIu6OAigkxx1?{TpbdKk;id*)ll zI%d<^;!7qeojNw(hwo?C(7?jy&&c#;xCe z%Xlqs^}g_hekRPbVLrIEw;gyP2E<8%yXTW9PmWWkPU+ujofwZk`q+5llvCUv zZ}Fc|vDg1u8kfIzyB(Rc#D69l9R86xJ5vz<7s{#GA5q(JwKF(}0rZ?Wvp-JEJb3x) zQhlQNiYu7sF$28VkQmpwtFCFZ&7udnt zvoBrNb(iv-htLlC7@qyC{@-QngLIBF+~;PW;2Z_ebK+osxxwL6+~?^np9{w2dgYjP z%?B>IspgsRK^I|yJ>!KKB@2`Hj9IiS;QXJ-FZd<3p041|M(fnz?f%)|J>)p7z;mfU z&&P8z-?egCv@A|us^Vp67A*a9aS`r1u#Q>NtnFUcPfNx#sB@8L*RcH`?hh;Qf3gDW zd^{KPowdsvKEKvAYnrva_vPrd2G4jQ2I$491v(e3@0!nc_-jaq{lg0U|5Abc4Wt(> z3-=sffY++BuDQ`>U9-=#;lp*k*66T*Sb=9#0WQScVE4M-`w8iTIKSkDcr}{uIXv_0 zSF6ck|F8mw6*yA`@>jz+nXrD{xqW!wMW$;M`T - - - - - - - - - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/Acl.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/Acl.java deleted file mode 100644 index a31e11e01e..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/Acl.java +++ /dev/null @@ -1,491 +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 Acl implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Acl"); - - private static final org.apache.thrift.protocol.TField PERMS_FIELD_DESC = new org.apache.thrift.protocol.TField("perms", org.apache.thrift.protocol.TType.I32, (short)1); - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRUCT, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new AclStandardSchemeFactory()); - schemes.put(TupleScheme.class, new AclTupleSchemeFactory()); - } - - public int perms; // required - public Id id; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PERMS((short)1, "perms"), - ID((short)2, "id"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PERMS - return PERMS; - case 2: // ID - return ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __PERMS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PERMS, new org.apache.thrift.meta_data.FieldMetaData("perms", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Id.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Acl.class, metaDataMap); - } - - public Acl() { - } - - public Acl( - int perms, - Id id) - { - this(); - this.perms = perms; - setPermsIsSet(true); - this.id = id; - } - - /** - * Performs a deep copy on other. - */ - public Acl(Acl other) { - __isset_bitfield = other.__isset_bitfield; - this.perms = other.perms; - if (other.isSetId()) { - this.id = new Id(other.id); - } - } - - public Acl deepCopy() { - return new Acl(this); - } - - @Override - public void clear() { - setPermsIsSet(false); - this.perms = 0; - this.id = null; - } - - public int getPerms() { - return this.perms; - } - - public Acl setPerms(int perms) { - this.perms = perms; - setPermsIsSet(true); - return this; - } - - public void unsetPerms() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PERMS_ISSET_ID); - } - - /** Returns true if field perms is set (has been assigned a value) and false otherwise */ - public boolean isSetPerms() { - return EncodingUtils.testBit(__isset_bitfield, __PERMS_ISSET_ID); - } - - public void setPermsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PERMS_ISSET_ID, value); - } - - public Id getId() { - return this.id; - } - - public Acl setId(Id id) { - this.id = id; - return this; - } - - public void unsetId() { - this.id = null; - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return this.id != null; - } - - public void setIdIsSet(boolean value) { - if (!value) { - this.id = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PERMS: - if (value == null) { - unsetPerms(); - } else { - setPerms((Integer)value); - } - break; - - case ID: - if (value == null) { - unsetId(); - } else { - setId((Id)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PERMS: - return Integer.valueOf(getPerms()); - - case ID: - return getId(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PERMS: - return isSetPerms(); - case ID: - return isSetId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Acl) - return this.equals((Acl)that); - return false; - } - - public boolean equals(Acl that) { - if (that == null) - return false; - - boolean this_present_perms = true; - boolean that_present_perms = true; - if (this_present_perms || that_present_perms) { - if (!(this_present_perms && that_present_perms)) - return false; - if (this.perms != that.perms) - return false; - } - - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (!this.id.equals(that.id)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(Acl other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPerms()).compareTo(other.isSetPerms()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPerms()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.perms, other.perms); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Acl("); - boolean first = true; - - sb.append("perms:"); - sb.append(this.perms); - first = false; - if (!first) sb.append(", "); - sb.append("id:"); - if (this.id == null) { - sb.append("null"); - } else { - sb.append(this.id); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (id != null) { - id.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class AclStandardSchemeFactory implements SchemeFactory { - public AclStandardScheme getScheme() { - return new AclStandardScheme(); - } - } - - private static class AclStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, Acl struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PERMS - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.perms = iprot.readI32(); - struct.setPermsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.id = new Id(); - struct.id.read(iprot); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, Acl struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(PERMS_FIELD_DESC); - oprot.writeI32(struct.perms); - oprot.writeFieldEnd(); - if (struct.id != null) { - oprot.writeFieldBegin(ID_FIELD_DESC); - struct.id.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class AclTupleSchemeFactory implements SchemeFactory { - public AclTupleScheme getScheme() { - return new AclTupleScheme(); - } - } - - private static class AclTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, Acl struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPerms()) { - optionals.set(0); - } - if (struct.isSetId()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetPerms()) { - oprot.writeI32(struct.perms); - } - if (struct.isSetId()) { - struct.id.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, Acl struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.perms = iprot.readI32(); - struct.setPermsIsSet(true); - } - if (incoming.get(1)) { - struct.id = new Id(); - struct.id.read(iprot); - struct.setIdIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/ChildData.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/ChildData.java deleted file mode 100644 index 368fda9d66..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/ChildData.java +++ /dev/null @@ -1,604 +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 ChildData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ChildData"); - - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField STAT_FIELD_DESC = new org.apache.thrift.protocol.TField("stat", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ChildDataStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ChildDataTupleSchemeFactory()); - } - - public String path; // required - public Stat stat; // required - public ByteBuffer data; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PATH((short)1, "path"), - STAT((short)2, "stat"), - DATA((short)3, "data"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PATH - return PATH; - case 2: // STAT - return STAT; - case 3: // DATA - return DATA; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.STAT, new org.apache.thrift.meta_data.FieldMetaData("stat", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Stat.class))); - tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ChildData.class, metaDataMap); - } - - public ChildData() { - } - - public ChildData( - String path, - Stat stat, - ByteBuffer data) - { - this(); - this.path = path; - this.stat = stat; - this.data = data; - } - - /** - * Performs a deep copy on other. - */ - public ChildData(ChildData other) { - if (other.isSetPath()) { - this.path = other.path; - } - if (other.isSetStat()) { - this.stat = new Stat(other.stat); - } - if (other.isSetData()) { - this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data); -; - } - } - - public ChildData deepCopy() { - return new ChildData(this); - } - - @Override - public void clear() { - this.path = null; - this.stat = null; - this.data = null; - } - - public String getPath() { - return this.path; - } - - public ChildData setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public Stat getStat() { - return this.stat; - } - - public ChildData setStat(Stat stat) { - this.stat = stat; - return this; - } - - public void unsetStat() { - this.stat = null; - } - - /** Returns true if field stat is set (has been assigned a value) and false otherwise */ - public boolean isSetStat() { - return this.stat != null; - } - - public void setStatIsSet(boolean value) { - if (!value) { - this.stat = null; - } - } - - public byte[] getData() { - setData(org.apache.thrift.TBaseHelper.rightSize(data)); - return data == null ? null : data.array(); - } - - public ByteBuffer bufferForData() { - return data; - } - - public ChildData setData(byte[] data) { - setData(data == null ? (ByteBuffer)null : ByteBuffer.wrap(data)); - return this; - } - - public ChildData setData(ByteBuffer data) { - this.data = data; - return this; - } - - public void unsetData() { - this.data = null; - } - - /** Returns true if field data is set (has been assigned a value) and false otherwise */ - public boolean isSetData() { - return this.data != null; - } - - public void setDataIsSet(boolean value) { - if (!value) { - this.data = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case STAT: - if (value == null) { - unsetStat(); - } else { - setStat((Stat)value); - } - break; - - case DATA: - if (value == null) { - unsetData(); - } else { - setData((ByteBuffer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PATH: - return getPath(); - - case STAT: - return getStat(); - - case DATA: - return getData(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PATH: - return isSetPath(); - case STAT: - return isSetStat(); - case DATA: - return isSetData(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ChildData) - return this.equals((ChildData)that); - return false; - } - - public boolean equals(ChildData that) { - if (that == null) - return false; - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_stat = true && this.isSetStat(); - boolean that_present_stat = true && that.isSetStat(); - if (this_present_stat || that_present_stat) { - if (!(this_present_stat && that_present_stat)) - return false; - if (!this.stat.equals(that.stat)) - return false; - } - - boolean this_present_data = true && this.isSetData(); - boolean that_present_data = true && that.isSetData(); - if (this_present_data || that_present_data) { - if (!(this_present_data && that_present_data)) - return false; - if (!this.data.equals(that.data)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(ChildData other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetStat()).compareTo(other.isSetStat()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStat()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stat, other.stat); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("ChildData("); - boolean first = true; - - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - if (!first) sb.append(", "); - sb.append("stat:"); - if (this.stat == null) { - sb.append("null"); - } else { - sb.append(this.stat); - } - first = false; - if (!first) sb.append(", "); - sb.append("data:"); - if (this.data == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.data, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (stat != null) { - stat.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class ChildDataStandardSchemeFactory implements SchemeFactory { - public ChildDataStandardScheme getScheme() { - return new ChildDataStandardScheme(); - } - } - - private static class ChildDataStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ChildData struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // STAT - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.stat = new Stat(); - struct.stat.read(iprot); - struct.setStatIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // DATA - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.data = iprot.readBinary(); - struct.setDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, ChildData struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - if (struct.stat != null) { - oprot.writeFieldBegin(STAT_FIELD_DESC); - struct.stat.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.data != null) { - oprot.writeFieldBegin(DATA_FIELD_DESC); - oprot.writeBinary(struct.data); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ChildDataTupleSchemeFactory implements SchemeFactory { - public ChildDataTupleScheme getScheme() { - return new ChildDataTupleScheme(); - } - } - - private static class ChildDataTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ChildData struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPath()) { - optionals.set(0); - } - if (struct.isSetStat()) { - optionals.set(1); - } - if (struct.isSetData()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetStat()) { - struct.stat.write(oprot); - } - if (struct.isSetData()) { - oprot.writeBinary(struct.data); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ChildData struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - if (incoming.get(1)) { - struct.stat = new Stat(); - struct.stat.read(iprot); - struct.setStatIsSet(true); - } - if (incoming.get(2)) { - struct.data = iprot.readBinary(); - struct.setDataIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/CreateMode.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/CreateMode.java deleted file mode 100644 index 1d19620210..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/CreateMode.java +++ /dev/null @@ -1,51 +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 java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum CreateMode implements org.apache.thrift.TEnum { - PERSISTENT(0), - PERSISTENT_SEQUENTIAL(1), - EPHEMERAL(2), - EPHEMERAL_SEQUENTIAL(3); - - private final int value; - - private CreateMode(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static CreateMode findByValue(int value) { - switch (value) { - case 0: - return PERSISTENT; - case 1: - return PERSISTENT_SEQUENTIAL; - case 2: - return EPHEMERAL; - case 3: - return EPHEMERAL_SEQUENTIAL; - default: - return null; - } - } -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/CreateSpec.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/CreateSpec.java deleted file mode 100644 index bd5537d920..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/CreateSpec.java +++ /dev/null @@ -1,1001 +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 CreateSpec implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CreateSpec"); - - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("mode", org.apache.thrift.protocol.TType.I32, (short)3); - private static final org.apache.thrift.protocol.TField ASYNC_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("asyncContext", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField COMPRESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("compressed", org.apache.thrift.protocol.TType.BOOL, (short)5); - private static final org.apache.thrift.protocol.TField CREATING_PARENTS_IF_NEEDED_FIELD_DESC = new org.apache.thrift.protocol.TField("creatingParentsIfNeeded", org.apache.thrift.protocol.TType.BOOL, (short)6); - private static final org.apache.thrift.protocol.TField WITH_PROTECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("withProtection", org.apache.thrift.protocol.TType.BOOL, (short)7); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new CreateSpecStandardSchemeFactory()); - schemes.put(TupleScheme.class, new CreateSpecTupleSchemeFactory()); - } - - public String path; // required - public ByteBuffer data; // required - /** - * - * @see CreateMode - */ - public CreateMode mode; // required - public String asyncContext; // required - public boolean compressed; // required - public boolean creatingParentsIfNeeded; // required - public boolean withProtection; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PATH((short)1, "path"), - DATA((short)2, "data"), - /** - * - * @see CreateMode - */ - MODE((short)3, "mode"), - ASYNC_CONTEXT((short)4, "asyncContext"), - COMPRESSED((short)5, "compressed"), - CREATING_PARENTS_IF_NEEDED((short)6, "creatingParentsIfNeeded"), - WITH_PROTECTION((short)7, "withProtection"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PATH - return PATH; - case 2: // DATA - return DATA; - case 3: // MODE - return MODE; - case 4: // ASYNC_CONTEXT - return ASYNC_CONTEXT; - case 5: // COMPRESSED - return COMPRESSED; - case 6: // CREATING_PARENTS_IF_NEEDED - return CREATING_PARENTS_IF_NEEDED; - case 7: // WITH_PROTECTION - return WITH_PROTECTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __COMPRESSED_ISSET_ID = 0; - private static final int __CREATINGPARENTSIFNEEDED_ISSET_ID = 1; - private static final int __WITHPROTECTION_ISSET_ID = 2; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.MODE, new org.apache.thrift.meta_data.FieldMetaData("mode", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CreateMode.class))); - tmpMap.put(_Fields.ASYNC_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("asyncContext", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COMPRESSED, new org.apache.thrift.meta_data.FieldMetaData("compressed", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.CREATING_PARENTS_IF_NEEDED, new org.apache.thrift.meta_data.FieldMetaData("creatingParentsIfNeeded", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.WITH_PROTECTION, new org.apache.thrift.meta_data.FieldMetaData("withProtection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CreateSpec.class, metaDataMap); - } - - public CreateSpec() { - } - - public CreateSpec( - String path, - ByteBuffer data, - CreateMode mode, - String asyncContext, - boolean compressed, - boolean creatingParentsIfNeeded, - boolean withProtection) - { - this(); - this.path = path; - this.data = data; - this.mode = mode; - this.asyncContext = asyncContext; - this.compressed = compressed; - setCompressedIsSet(true); - this.creatingParentsIfNeeded = creatingParentsIfNeeded; - setCreatingParentsIfNeededIsSet(true); - this.withProtection = withProtection; - setWithProtectionIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public CreateSpec(CreateSpec other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetPath()) { - this.path = other.path; - } - if (other.isSetData()) { - this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data); -; - } - if (other.isSetMode()) { - this.mode = other.mode; - } - if (other.isSetAsyncContext()) { - this.asyncContext = other.asyncContext; - } - this.compressed = other.compressed; - this.creatingParentsIfNeeded = other.creatingParentsIfNeeded; - this.withProtection = other.withProtection; - } - - public CreateSpec deepCopy() { - return new CreateSpec(this); - } - - @Override - public void clear() { - this.path = null; - this.data = null; - this.mode = null; - this.asyncContext = null; - setCompressedIsSet(false); - this.compressed = false; - setCreatingParentsIfNeededIsSet(false); - this.creatingParentsIfNeeded = false; - setWithProtectionIsSet(false); - this.withProtection = false; - } - - public String getPath() { - return this.path; - } - - public CreateSpec setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public byte[] getData() { - setData(org.apache.thrift.TBaseHelper.rightSize(data)); - return data == null ? null : data.array(); - } - - public ByteBuffer bufferForData() { - return data; - } - - public CreateSpec setData(byte[] data) { - setData(data == null ? (ByteBuffer)null : ByteBuffer.wrap(data)); - return this; - } - - public CreateSpec setData(ByteBuffer data) { - this.data = data; - return this; - } - - public void unsetData() { - this.data = null; - } - - /** Returns true if field data is set (has been assigned a value) and false otherwise */ - public boolean isSetData() { - return this.data != null; - } - - public void setDataIsSet(boolean value) { - if (!value) { - this.data = null; - } - } - - /** - * - * @see CreateMode - */ - public CreateMode getMode() { - return this.mode; - } - - /** - * - * @see CreateMode - */ - public CreateSpec setMode(CreateMode mode) { - this.mode = mode; - return this; - } - - public void unsetMode() { - this.mode = null; - } - - /** Returns true if field mode is set (has been assigned a value) and false otherwise */ - public boolean isSetMode() { - return this.mode != null; - } - - public void setModeIsSet(boolean value) { - if (!value) { - this.mode = null; - } - } - - public String getAsyncContext() { - return this.asyncContext; - } - - public CreateSpec setAsyncContext(String asyncContext) { - this.asyncContext = asyncContext; - return this; - } - - public void unsetAsyncContext() { - this.asyncContext = null; - } - - /** Returns true if field asyncContext is set (has been assigned a value) and false otherwise */ - public boolean isSetAsyncContext() { - return this.asyncContext != null; - } - - public void setAsyncContextIsSet(boolean value) { - if (!value) { - this.asyncContext = null; - } - } - - public boolean isCompressed() { - return this.compressed; - } - - public CreateSpec setCompressed(boolean compressed) { - this.compressed = compressed; - setCompressedIsSet(true); - return this; - } - - public void unsetCompressed() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COMPRESSED_ISSET_ID); - } - - /** Returns true if field compressed is set (has been assigned a value) and false otherwise */ - public boolean isSetCompressed() { - return EncodingUtils.testBit(__isset_bitfield, __COMPRESSED_ISSET_ID); - } - - public void setCompressedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COMPRESSED_ISSET_ID, value); - } - - public boolean isCreatingParentsIfNeeded() { - return this.creatingParentsIfNeeded; - } - - public CreateSpec setCreatingParentsIfNeeded(boolean creatingParentsIfNeeded) { - this.creatingParentsIfNeeded = creatingParentsIfNeeded; - setCreatingParentsIfNeededIsSet(true); - return this; - } - - public void unsetCreatingParentsIfNeeded() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATINGPARENTSIFNEEDED_ISSET_ID); - } - - /** Returns true if field creatingParentsIfNeeded is set (has been assigned a value) and false otherwise */ - public boolean isSetCreatingParentsIfNeeded() { - return EncodingUtils.testBit(__isset_bitfield, __CREATINGPARENTSIFNEEDED_ISSET_ID); - } - - public void setCreatingParentsIfNeededIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATINGPARENTSIFNEEDED_ISSET_ID, value); - } - - public boolean isWithProtection() { - return this.withProtection; - } - - public CreateSpec setWithProtection(boolean withProtection) { - this.withProtection = withProtection; - setWithProtectionIsSet(true); - return this; - } - - public void unsetWithProtection() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WITHPROTECTION_ISSET_ID); - } - - /** Returns true if field withProtection is set (has been assigned a value) and false otherwise */ - public boolean isSetWithProtection() { - return EncodingUtils.testBit(__isset_bitfield, __WITHPROTECTION_ISSET_ID); - } - - public void setWithProtectionIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WITHPROTECTION_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case DATA: - if (value == null) { - unsetData(); - } else { - setData((ByteBuffer)value); - } - break; - - case MODE: - if (value == null) { - unsetMode(); - } else { - setMode((CreateMode)value); - } - break; - - case ASYNC_CONTEXT: - if (value == null) { - unsetAsyncContext(); - } else { - setAsyncContext((String)value); - } - break; - - case COMPRESSED: - if (value == null) { - unsetCompressed(); - } else { - setCompressed((Boolean)value); - } - break; - - case CREATING_PARENTS_IF_NEEDED: - if (value == null) { - unsetCreatingParentsIfNeeded(); - } else { - setCreatingParentsIfNeeded((Boolean)value); - } - break; - - case WITH_PROTECTION: - if (value == null) { - unsetWithProtection(); - } else { - setWithProtection((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PATH: - return getPath(); - - case DATA: - return getData(); - - case MODE: - return getMode(); - - case ASYNC_CONTEXT: - return getAsyncContext(); - - case COMPRESSED: - return Boolean.valueOf(isCompressed()); - - case CREATING_PARENTS_IF_NEEDED: - return Boolean.valueOf(isCreatingParentsIfNeeded()); - - case WITH_PROTECTION: - return Boolean.valueOf(isWithProtection()); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PATH: - return isSetPath(); - case DATA: - return isSetData(); - case MODE: - return isSetMode(); - case ASYNC_CONTEXT: - return isSetAsyncContext(); - case COMPRESSED: - return isSetCompressed(); - case CREATING_PARENTS_IF_NEEDED: - return isSetCreatingParentsIfNeeded(); - case WITH_PROTECTION: - return isSetWithProtection(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof CreateSpec) - return this.equals((CreateSpec)that); - return false; - } - - public boolean equals(CreateSpec that) { - if (that == null) - return false; - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_data = true && this.isSetData(); - boolean that_present_data = true && that.isSetData(); - if (this_present_data || that_present_data) { - if (!(this_present_data && that_present_data)) - return false; - if (!this.data.equals(that.data)) - return false; - } - - boolean this_present_mode = true && this.isSetMode(); - boolean that_present_mode = true && that.isSetMode(); - if (this_present_mode || that_present_mode) { - if (!(this_present_mode && that_present_mode)) - return false; - if (!this.mode.equals(that.mode)) - return false; - } - - boolean this_present_asyncContext = true && this.isSetAsyncContext(); - boolean that_present_asyncContext = true && that.isSetAsyncContext(); - if (this_present_asyncContext || that_present_asyncContext) { - if (!(this_present_asyncContext && that_present_asyncContext)) - return false; - if (!this.asyncContext.equals(that.asyncContext)) - return false; - } - - boolean this_present_compressed = true; - boolean that_present_compressed = true; - if (this_present_compressed || that_present_compressed) { - if (!(this_present_compressed && that_present_compressed)) - return false; - if (this.compressed != that.compressed) - return false; - } - - boolean this_present_creatingParentsIfNeeded = true; - boolean that_present_creatingParentsIfNeeded = true; - if (this_present_creatingParentsIfNeeded || that_present_creatingParentsIfNeeded) { - if (!(this_present_creatingParentsIfNeeded && that_present_creatingParentsIfNeeded)) - return false; - if (this.creatingParentsIfNeeded != that.creatingParentsIfNeeded) - return false; - } - - boolean this_present_withProtection = true; - boolean that_present_withProtection = true; - if (this_present_withProtection || that_present_withProtection) { - if (!(this_present_withProtection && that_present_withProtection)) - return false; - if (this.withProtection != that.withProtection) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(CreateSpec other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMode()).compareTo(other.isSetMode()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMode()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mode, other.mode); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAsyncContext()).compareTo(other.isSetAsyncContext()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAsyncContext()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asyncContext, other.asyncContext); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCompressed()).compareTo(other.isSetCompressed()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCompressed()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressed, other.compressed); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCreatingParentsIfNeeded()).compareTo(other.isSetCreatingParentsIfNeeded()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCreatingParentsIfNeeded()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.creatingParentsIfNeeded, other.creatingParentsIfNeeded); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetWithProtection()).compareTo(other.isSetWithProtection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetWithProtection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.withProtection, other.withProtection); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("CreateSpec("); - boolean first = true; - - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - if (!first) sb.append(", "); - sb.append("data:"); - if (this.data == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.data, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("mode:"); - if (this.mode == null) { - sb.append("null"); - } else { - sb.append(this.mode); - } - first = false; - if (!first) sb.append(", "); - sb.append("asyncContext:"); - if (this.asyncContext == null) { - sb.append("null"); - } else { - sb.append(this.asyncContext); - } - first = false; - if (!first) sb.append(", "); - sb.append("compressed:"); - sb.append(this.compressed); - first = false; - if (!first) sb.append(", "); - sb.append("creatingParentsIfNeeded:"); - sb.append(this.creatingParentsIfNeeded); - first = false; - if (!first) sb.append(", "); - sb.append("withProtection:"); - sb.append(this.withProtection); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class CreateSpecStandardSchemeFactory implements SchemeFactory { - public CreateSpecStandardScheme getScheme() { - return new CreateSpecStandardScheme(); - } - } - - private static class CreateSpecStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, CreateSpec struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // DATA - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.data = iprot.readBinary(); - struct.setDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // MODE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.mode = CreateMode.findByValue(iprot.readI32()); - struct.setModeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // ASYNC_CONTEXT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.asyncContext = iprot.readString(); - struct.setAsyncContextIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // COMPRESSED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.compressed = iprot.readBool(); - struct.setCompressedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // CREATING_PARENTS_IF_NEEDED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.creatingParentsIfNeeded = iprot.readBool(); - struct.setCreatingParentsIfNeededIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // WITH_PROTECTION - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.withProtection = iprot.readBool(); - struct.setWithProtectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, CreateSpec struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - if (struct.data != null) { - oprot.writeFieldBegin(DATA_FIELD_DESC); - oprot.writeBinary(struct.data); - oprot.writeFieldEnd(); - } - if (struct.mode != null) { - oprot.writeFieldBegin(MODE_FIELD_DESC); - oprot.writeI32(struct.mode.getValue()); - oprot.writeFieldEnd(); - } - if (struct.asyncContext != null) { - oprot.writeFieldBegin(ASYNC_CONTEXT_FIELD_DESC); - oprot.writeString(struct.asyncContext); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(COMPRESSED_FIELD_DESC); - oprot.writeBool(struct.compressed); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(CREATING_PARENTS_IF_NEEDED_FIELD_DESC); - oprot.writeBool(struct.creatingParentsIfNeeded); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(WITH_PROTECTION_FIELD_DESC); - oprot.writeBool(struct.withProtection); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class CreateSpecTupleSchemeFactory implements SchemeFactory { - public CreateSpecTupleScheme getScheme() { - return new CreateSpecTupleScheme(); - } - } - - private static class CreateSpecTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, CreateSpec struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPath()) { - optionals.set(0); - } - if (struct.isSetData()) { - optionals.set(1); - } - if (struct.isSetMode()) { - optionals.set(2); - } - if (struct.isSetAsyncContext()) { - optionals.set(3); - } - if (struct.isSetCompressed()) { - optionals.set(4); - } - if (struct.isSetCreatingParentsIfNeeded()) { - optionals.set(5); - } - if (struct.isSetWithProtection()) { - optionals.set(6); - } - oprot.writeBitSet(optionals, 7); - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetData()) { - oprot.writeBinary(struct.data); - } - if (struct.isSetMode()) { - oprot.writeI32(struct.mode.getValue()); - } - if (struct.isSetAsyncContext()) { - oprot.writeString(struct.asyncContext); - } - if (struct.isSetCompressed()) { - oprot.writeBool(struct.compressed); - } - if (struct.isSetCreatingParentsIfNeeded()) { - oprot.writeBool(struct.creatingParentsIfNeeded); - } - if (struct.isSetWithProtection()) { - oprot.writeBool(struct.withProtection); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, CreateSpec struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(7); - if (incoming.get(0)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - if (incoming.get(1)) { - struct.data = iprot.readBinary(); - struct.setDataIsSet(true); - } - if (incoming.get(2)) { - struct.mode = CreateMode.findByValue(iprot.readI32()); - struct.setModeIsSet(true); - } - if (incoming.get(3)) { - struct.asyncContext = iprot.readString(); - struct.setAsyncContextIsSet(true); - } - if (incoming.get(4)) { - struct.compressed = iprot.readBool(); - struct.setCompressedIsSet(true); - } - if (incoming.get(5)) { - struct.creatingParentsIfNeeded = iprot.readBool(); - struct.setCreatingParentsIfNeededIsSet(true); - } - if (incoming.get(6)) { - struct.withProtection = iprot.readBool(); - struct.setWithProtectionIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorEvent.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorEvent.java deleted file mode 100644 index 23ecbf468b..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorEvent.java +++ /dev/null @@ -1,1636 +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 CuratorEvent implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CuratorEvent"); - - private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)2); - private static final org.apache.thrift.protocol.TField RESULT_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("resultCode", org.apache.thrift.protocol.TType.I32, (short)3); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("context", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField STAT_FIELD_DESC = new org.apache.thrift.protocol.TField("stat", org.apache.thrift.protocol.TType.STRUCT, (short)6); - private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)7); - private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)8); - private static final org.apache.thrift.protocol.TField CHILDREN_FIELD_DESC = new org.apache.thrift.protocol.TField("children", org.apache.thrift.protocol.TType.LIST, (short)9); - private static final org.apache.thrift.protocol.TField ACL_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("aclList", org.apache.thrift.protocol.TType.LIST, (short)10); - private static final org.apache.thrift.protocol.TField WATCHED_EVENT_FIELD_DESC = new org.apache.thrift.protocol.TField("watchedEvent", org.apache.thrift.protocol.TType.STRUCT, (short)11); - private static final org.apache.thrift.protocol.TField LEADER_EVENT_FIELD_DESC = new org.apache.thrift.protocol.TField("leaderEvent", org.apache.thrift.protocol.TType.STRUCT, (short)12); - private static final org.apache.thrift.protocol.TField CHILDREN_CACHE_EVENT_FIELD_DESC = new org.apache.thrift.protocol.TField("childrenCacheEvent", org.apache.thrift.protocol.TType.STRUCT, (short)13); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new CuratorEventStandardSchemeFactory()); - schemes.put(TupleScheme.class, new CuratorEventTupleSchemeFactory()); - } - - /** - * - * @see CuratorEventType - */ - public CuratorEventType type; // required - public int resultCode; // required - public String path; // required - public String context; // required - public Stat stat; // required - public ByteBuffer data; // required - public String name; // required - public List children; // required - public List aclList; // required - public WatchedEvent watchedEvent; // required - public LeaderEvent leaderEvent; // required - public PathChildrenCacheEvent childrenCacheEvent; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * - * @see CuratorEventType - */ - TYPE((short)2, "type"), - RESULT_CODE((short)3, "resultCode"), - PATH((short)4, "path"), - CONTEXT((short)5, "context"), - STAT((short)6, "stat"), - DATA((short)7, "data"), - NAME((short)8, "name"), - CHILDREN((short)9, "children"), - ACL_LIST((short)10, "aclList"), - WATCHED_EVENT((short)11, "watchedEvent"), - LEADER_EVENT((short)12, "leaderEvent"), - CHILDREN_CACHE_EVENT((short)13, "childrenCacheEvent"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 2: // TYPE - return TYPE; - case 3: // RESULT_CODE - return RESULT_CODE; - case 4: // PATH - return PATH; - case 5: // CONTEXT - return CONTEXT; - case 6: // STAT - return STAT; - case 7: // DATA - return DATA; - case 8: // NAME - return NAME; - case 9: // CHILDREN - return CHILDREN; - case 10: // ACL_LIST - return ACL_LIST; - case 11: // WATCHED_EVENT - return WATCHED_EVENT; - case 12: // LEADER_EVENT - return LEADER_EVENT; - case 13: // CHILDREN_CACHE_EVENT - return CHILDREN_CACHE_EVENT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __RESULTCODE_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, CuratorEventType.class))); - tmpMap.put(_Fields.RESULT_CODE, new org.apache.thrift.meta_data.FieldMetaData("resultCode", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("context", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.STAT, new org.apache.thrift.meta_data.FieldMetaData("stat", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Stat.class))); - tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CHILDREN, new org.apache.thrift.meta_data.FieldMetaData("children", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.ACL_LIST, new org.apache.thrift.meta_data.FieldMetaData("aclList", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Acl.class)))); - tmpMap.put(_Fields.WATCHED_EVENT, new org.apache.thrift.meta_data.FieldMetaData("watchedEvent", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WatchedEvent.class))); - tmpMap.put(_Fields.LEADER_EVENT, new org.apache.thrift.meta_data.FieldMetaData("leaderEvent", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LeaderEvent.class))); - tmpMap.put(_Fields.CHILDREN_CACHE_EVENT, new org.apache.thrift.meta_data.FieldMetaData("childrenCacheEvent", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PathChildrenCacheEvent.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CuratorEvent.class, metaDataMap); - } - - public CuratorEvent() { - } - - public CuratorEvent( - CuratorEventType type, - int resultCode, - String path, - String context, - Stat stat, - ByteBuffer data, - String name, - List children, - List aclList, - WatchedEvent watchedEvent, - LeaderEvent leaderEvent, - PathChildrenCacheEvent childrenCacheEvent) - { - this(); - this.type = type; - this.resultCode = resultCode; - setResultCodeIsSet(true); - this.path = path; - this.context = context; - this.stat = stat; - this.data = data; - this.name = name; - this.children = children; - this.aclList = aclList; - this.watchedEvent = watchedEvent; - this.leaderEvent = leaderEvent; - this.childrenCacheEvent = childrenCacheEvent; - } - - /** - * Performs a deep copy on other. - */ - public CuratorEvent(CuratorEvent other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetType()) { - this.type = other.type; - } - this.resultCode = other.resultCode; - if (other.isSetPath()) { - this.path = other.path; - } - if (other.isSetContext()) { - this.context = other.context; - } - if (other.isSetStat()) { - this.stat = new Stat(other.stat); - } - if (other.isSetData()) { - this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data); -; - } - if (other.isSetName()) { - this.name = other.name; - } - if (other.isSetChildren()) { - List __this__children = new ArrayList(other.children); - this.children = __this__children; - } - if (other.isSetAclList()) { - List __this__aclList = new ArrayList(other.aclList.size()); - for (Acl other_element : other.aclList) { - __this__aclList.add(new Acl(other_element)); - } - this.aclList = __this__aclList; - } - if (other.isSetWatchedEvent()) { - this.watchedEvent = new WatchedEvent(other.watchedEvent); - } - if (other.isSetLeaderEvent()) { - this.leaderEvent = new LeaderEvent(other.leaderEvent); - } - if (other.isSetChildrenCacheEvent()) { - this.childrenCacheEvent = new PathChildrenCacheEvent(other.childrenCacheEvent); - } - } - - public CuratorEvent deepCopy() { - return new CuratorEvent(this); - } - - @Override - public void clear() { - this.type = null; - setResultCodeIsSet(false); - this.resultCode = 0; - this.path = null; - this.context = null; - this.stat = null; - this.data = null; - this.name = null; - this.children = null; - this.aclList = null; - this.watchedEvent = null; - this.leaderEvent = null; - this.childrenCacheEvent = null; - } - - /** - * - * @see CuratorEventType - */ - public CuratorEventType getType() { - return this.type; - } - - /** - * - * @see CuratorEventType - */ - public CuratorEvent setType(CuratorEventType type) { - this.type = type; - return this; - } - - public void unsetType() { - this.type = null; - } - - /** Returns true if field type is set (has been assigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != null; - } - - public void setTypeIsSet(boolean value) { - if (!value) { - this.type = null; - } - } - - public int getResultCode() { - return this.resultCode; - } - - public CuratorEvent setResultCode(int resultCode) { - this.resultCode = resultCode; - setResultCodeIsSet(true); - return this; - } - - public void unsetResultCode() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESULTCODE_ISSET_ID); - } - - /** Returns true if field resultCode is set (has been assigned a value) and false otherwise */ - public boolean isSetResultCode() { - return EncodingUtils.testBit(__isset_bitfield, __RESULTCODE_ISSET_ID); - } - - public void setResultCodeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESULTCODE_ISSET_ID, value); - } - - public String getPath() { - return this.path; - } - - public CuratorEvent setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public String getContext() { - return this.context; - } - - public CuratorEvent setContext(String context) { - this.context = context; - return this; - } - - public void unsetContext() { - this.context = null; - } - - /** Returns true if field context is set (has been assigned a value) and false otherwise */ - public boolean isSetContext() { - return this.context != null; - } - - public void setContextIsSet(boolean value) { - if (!value) { - this.context = null; - } - } - - public Stat getStat() { - return this.stat; - } - - public CuratorEvent setStat(Stat stat) { - this.stat = stat; - return this; - } - - public void unsetStat() { - this.stat = null; - } - - /** Returns true if field stat is set (has been assigned a value) and false otherwise */ - public boolean isSetStat() { - return this.stat != null; - } - - public void setStatIsSet(boolean value) { - if (!value) { - this.stat = null; - } - } - - public byte[] getData() { - setData(org.apache.thrift.TBaseHelper.rightSize(data)); - return data == null ? null : data.array(); - } - - public ByteBuffer bufferForData() { - return data; - } - - public CuratorEvent setData(byte[] data) { - setData(data == null ? (ByteBuffer)null : ByteBuffer.wrap(data)); - return this; - } - - public CuratorEvent setData(ByteBuffer data) { - this.data = data; - return this; - } - - public void unsetData() { - this.data = null; - } - - /** Returns true if field data is set (has been assigned a value) and false otherwise */ - public boolean isSetData() { - return this.data != null; - } - - public void setDataIsSet(boolean value) { - if (!value) { - this.data = null; - } - } - - public String getName() { - return this.name; - } - - public CuratorEvent setName(String name) { - this.name = name; - return this; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public int getChildrenSize() { - return (this.children == null) ? 0 : this.children.size(); - } - - public java.util.Iterator getChildrenIterator() { - return (this.children == null) ? null : this.children.iterator(); - } - - public void addToChildren(String elem) { - if (this.children == null) { - this.children = new ArrayList(); - } - this.children.add(elem); - } - - public List getChildren() { - return this.children; - } - - public CuratorEvent setChildren(List children) { - this.children = children; - return this; - } - - public void unsetChildren() { - this.children = null; - } - - /** Returns true if field children is set (has been assigned a value) and false otherwise */ - public boolean isSetChildren() { - return this.children != null; - } - - public void setChildrenIsSet(boolean value) { - if (!value) { - this.children = null; - } - } - - public int getAclListSize() { - return (this.aclList == null) ? 0 : this.aclList.size(); - } - - public java.util.Iterator getAclListIterator() { - return (this.aclList == null) ? null : this.aclList.iterator(); - } - - public void addToAclList(Acl elem) { - if (this.aclList == null) { - this.aclList = new ArrayList(); - } - this.aclList.add(elem); - } - - public List getAclList() { - return this.aclList; - } - - public CuratorEvent setAclList(List aclList) { - this.aclList = aclList; - return this; - } - - public void unsetAclList() { - this.aclList = null; - } - - /** Returns true if field aclList is set (has been assigned a value) and false otherwise */ - public boolean isSetAclList() { - return this.aclList != null; - } - - public void setAclListIsSet(boolean value) { - if (!value) { - this.aclList = null; - } - } - - public WatchedEvent getWatchedEvent() { - return this.watchedEvent; - } - - public CuratorEvent setWatchedEvent(WatchedEvent watchedEvent) { - this.watchedEvent = watchedEvent; - return this; - } - - public void unsetWatchedEvent() { - this.watchedEvent = null; - } - - /** Returns true if field watchedEvent is set (has been assigned a value) and false otherwise */ - public boolean isSetWatchedEvent() { - return this.watchedEvent != null; - } - - public void setWatchedEventIsSet(boolean value) { - if (!value) { - this.watchedEvent = null; - } - } - - public LeaderEvent getLeaderEvent() { - return this.leaderEvent; - } - - public CuratorEvent setLeaderEvent(LeaderEvent leaderEvent) { - this.leaderEvent = leaderEvent; - return this; - } - - public void unsetLeaderEvent() { - this.leaderEvent = null; - } - - /** Returns true if field leaderEvent is set (has been assigned a value) and false otherwise */ - public boolean isSetLeaderEvent() { - return this.leaderEvent != null; - } - - public void setLeaderEventIsSet(boolean value) { - if (!value) { - this.leaderEvent = null; - } - } - - public PathChildrenCacheEvent getChildrenCacheEvent() { - return this.childrenCacheEvent; - } - - public CuratorEvent setChildrenCacheEvent(PathChildrenCacheEvent childrenCacheEvent) { - this.childrenCacheEvent = childrenCacheEvent; - return this; - } - - public void unsetChildrenCacheEvent() { - this.childrenCacheEvent = null; - } - - /** Returns true if field childrenCacheEvent is set (has been assigned a value) and false otherwise */ - public boolean isSetChildrenCacheEvent() { - return this.childrenCacheEvent != null; - } - - public void setChildrenCacheEventIsSet(boolean value) { - if (!value) { - this.childrenCacheEvent = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((CuratorEventType)value); - } - break; - - case RESULT_CODE: - if (value == null) { - unsetResultCode(); - } else { - setResultCode((Integer)value); - } - break; - - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case CONTEXT: - if (value == null) { - unsetContext(); - } else { - setContext((String)value); - } - break; - - case STAT: - if (value == null) { - unsetStat(); - } else { - setStat((Stat)value); - } - break; - - case DATA: - if (value == null) { - unsetData(); - } else { - setData((ByteBuffer)value); - } - break; - - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case CHILDREN: - if (value == null) { - unsetChildren(); - } else { - setChildren((List)value); - } - break; - - case ACL_LIST: - if (value == null) { - unsetAclList(); - } else { - setAclList((List)value); - } - break; - - case WATCHED_EVENT: - if (value == null) { - unsetWatchedEvent(); - } else { - setWatchedEvent((WatchedEvent)value); - } - break; - - case LEADER_EVENT: - if (value == null) { - unsetLeaderEvent(); - } else { - setLeaderEvent((LeaderEvent)value); - } - break; - - case CHILDREN_CACHE_EVENT: - if (value == null) { - unsetChildrenCacheEvent(); - } else { - setChildrenCacheEvent((PathChildrenCacheEvent)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TYPE: - return getType(); - - case RESULT_CODE: - return Integer.valueOf(getResultCode()); - - case PATH: - return getPath(); - - case CONTEXT: - return getContext(); - - case STAT: - return getStat(); - - case DATA: - return getData(); - - case NAME: - return getName(); - - case CHILDREN: - return getChildren(); - - case ACL_LIST: - return getAclList(); - - case WATCHED_EVENT: - return getWatchedEvent(); - - case LEADER_EVENT: - return getLeaderEvent(); - - case CHILDREN_CACHE_EVENT: - return getChildrenCacheEvent(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TYPE: - return isSetType(); - case RESULT_CODE: - return isSetResultCode(); - case PATH: - return isSetPath(); - case CONTEXT: - return isSetContext(); - case STAT: - return isSetStat(); - case DATA: - return isSetData(); - case NAME: - return isSetName(); - case CHILDREN: - return isSetChildren(); - case ACL_LIST: - return isSetAclList(); - case WATCHED_EVENT: - return isSetWatchedEvent(); - case LEADER_EVENT: - return isSetLeaderEvent(); - case CHILDREN_CACHE_EVENT: - return isSetChildrenCacheEvent(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof CuratorEvent) - return this.equals((CuratorEvent)that); - return false; - } - - public boolean equals(CuratorEvent that) { - if (that == null) - return false; - - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (!this.type.equals(that.type)) - return false; - } - - boolean this_present_resultCode = true; - boolean that_present_resultCode = true; - if (this_present_resultCode || that_present_resultCode) { - if (!(this_present_resultCode && that_present_resultCode)) - return false; - if (this.resultCode != that.resultCode) - return false; - } - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_context = true && this.isSetContext(); - boolean that_present_context = true && that.isSetContext(); - if (this_present_context || that_present_context) { - if (!(this_present_context && that_present_context)) - return false; - if (!this.context.equals(that.context)) - return false; - } - - boolean this_present_stat = true && this.isSetStat(); - boolean that_present_stat = true && that.isSetStat(); - if (this_present_stat || that_present_stat) { - if (!(this_present_stat && that_present_stat)) - return false; - if (!this.stat.equals(that.stat)) - return false; - } - - boolean this_present_data = true && this.isSetData(); - boolean that_present_data = true && that.isSetData(); - if (this_present_data || that_present_data) { - if (!(this_present_data && that_present_data)) - return false; - if (!this.data.equals(that.data)) - return false; - } - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_children = true && this.isSetChildren(); - boolean that_present_children = true && that.isSetChildren(); - if (this_present_children || that_present_children) { - if (!(this_present_children && that_present_children)) - return false; - if (!this.children.equals(that.children)) - return false; - } - - boolean this_present_aclList = true && this.isSetAclList(); - boolean that_present_aclList = true && that.isSetAclList(); - if (this_present_aclList || that_present_aclList) { - if (!(this_present_aclList && that_present_aclList)) - return false; - if (!this.aclList.equals(that.aclList)) - return false; - } - - boolean this_present_watchedEvent = true && this.isSetWatchedEvent(); - boolean that_present_watchedEvent = true && that.isSetWatchedEvent(); - if (this_present_watchedEvent || that_present_watchedEvent) { - if (!(this_present_watchedEvent && that_present_watchedEvent)) - return false; - if (!this.watchedEvent.equals(that.watchedEvent)) - return false; - } - - boolean this_present_leaderEvent = true && this.isSetLeaderEvent(); - boolean that_present_leaderEvent = true && that.isSetLeaderEvent(); - if (this_present_leaderEvent || that_present_leaderEvent) { - if (!(this_present_leaderEvent && that_present_leaderEvent)) - return false; - if (!this.leaderEvent.equals(that.leaderEvent)) - return false; - } - - boolean this_present_childrenCacheEvent = true && this.isSetChildrenCacheEvent(); - boolean that_present_childrenCacheEvent = true && that.isSetChildrenCacheEvent(); - if (this_present_childrenCacheEvent || that_present_childrenCacheEvent) { - if (!(this_present_childrenCacheEvent && that_present_childrenCacheEvent)) - return false; - if (!this.childrenCacheEvent.equals(that.childrenCacheEvent)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(CuratorEvent other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetResultCode()).compareTo(other.isSetResultCode()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetResultCode()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resultCode, other.resultCode); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetContext()).compareTo(other.isSetContext()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetContext()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.context, other.context); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetStat()).compareTo(other.isSetStat()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStat()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stat, other.stat); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetChildren()).compareTo(other.isSetChildren()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetChildren()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.children, other.children); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAclList()).compareTo(other.isSetAclList()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAclList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aclList, other.aclList); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetWatchedEvent()).compareTo(other.isSetWatchedEvent()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetWatchedEvent()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.watchedEvent, other.watchedEvent); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLeaderEvent()).compareTo(other.isSetLeaderEvent()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLeaderEvent()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.leaderEvent, other.leaderEvent); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetChildrenCacheEvent()).compareTo(other.isSetChildrenCacheEvent()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetChildrenCacheEvent()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.childrenCacheEvent, other.childrenCacheEvent); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("CuratorEvent("); - boolean first = true; - - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - if (!first) sb.append(", "); - sb.append("resultCode:"); - sb.append(this.resultCode); - first = false; - if (!first) sb.append(", "); - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - if (!first) sb.append(", "); - sb.append("context:"); - if (this.context == null) { - sb.append("null"); - } else { - sb.append(this.context); - } - first = false; - if (!first) sb.append(", "); - sb.append("stat:"); - if (this.stat == null) { - sb.append("null"); - } else { - sb.append(this.stat); - } - first = false; - if (!first) sb.append(", "); - sb.append("data:"); - if (this.data == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.data, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("children:"); - if (this.children == null) { - sb.append("null"); - } else { - sb.append(this.children); - } - first = false; - if (!first) sb.append(", "); - sb.append("aclList:"); - if (this.aclList == null) { - sb.append("null"); - } else { - sb.append(this.aclList); - } - first = false; - if (!first) sb.append(", "); - sb.append("watchedEvent:"); - if (this.watchedEvent == null) { - sb.append("null"); - } else { - sb.append(this.watchedEvent); - } - first = false; - if (!first) sb.append(", "); - sb.append("leaderEvent:"); - if (this.leaderEvent == null) { - sb.append("null"); - } else { - sb.append(this.leaderEvent); - } - first = false; - if (!first) sb.append(", "); - sb.append("childrenCacheEvent:"); - if (this.childrenCacheEvent == null) { - sb.append("null"); - } else { - sb.append(this.childrenCacheEvent); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (stat != null) { - stat.validate(); - } - if (watchedEvent != null) { - watchedEvent.validate(); - } - if (leaderEvent != null) { - leaderEvent.validate(); - } - if (childrenCacheEvent != null) { - childrenCacheEvent.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class CuratorEventStandardSchemeFactory implements SchemeFactory { - public CuratorEventStandardScheme getScheme() { - return new CuratorEventStandardScheme(); - } - } - - private static class CuratorEventStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, CuratorEvent struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 2: // TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.type = CuratorEventType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // RESULT_CODE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.resultCode = iprot.readI32(); - struct.setResultCodeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // CONTEXT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.context = iprot.readString(); - struct.setContextIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // STAT - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.stat = new Stat(); - struct.stat.read(iprot); - struct.setStatIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // DATA - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.data = iprot.readBinary(); - struct.setDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // CHILDREN - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); - struct.children = new ArrayList(_list8.size); - for (int _i9 = 0; _i9 < _list8.size; ++_i9) - { - String _elem10; - _elem10 = iprot.readString(); - struct.children.add(_elem10); - } - iprot.readListEnd(); - } - struct.setChildrenIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // ACL_LIST - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list11 = iprot.readListBegin(); - struct.aclList = new ArrayList(_list11.size); - for (int _i12 = 0; _i12 < _list11.size; ++_i12) - { - Acl _elem13; - _elem13 = new Acl(); - _elem13.read(iprot); - struct.aclList.add(_elem13); - } - iprot.readListEnd(); - } - struct.setAclListIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 11: // WATCHED_EVENT - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.watchedEvent = new WatchedEvent(); - struct.watchedEvent.read(iprot); - struct.setWatchedEventIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 12: // LEADER_EVENT - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.leaderEvent = new LeaderEvent(); - struct.leaderEvent.read(iprot); - struct.setLeaderEventIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 13: // CHILDREN_CACHE_EVENT - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.childrenCacheEvent = new PathChildrenCacheEvent(); - struct.childrenCacheEvent.read(iprot); - struct.setChildrenCacheEventIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, CuratorEvent struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeI32(struct.type.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(RESULT_CODE_FIELD_DESC); - oprot.writeI32(struct.resultCode); - oprot.writeFieldEnd(); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - if (struct.context != null) { - oprot.writeFieldBegin(CONTEXT_FIELD_DESC); - oprot.writeString(struct.context); - oprot.writeFieldEnd(); - } - if (struct.stat != null) { - oprot.writeFieldBegin(STAT_FIELD_DESC); - struct.stat.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.data != null) { - oprot.writeFieldBegin(DATA_FIELD_DESC); - oprot.writeBinary(struct.data); - oprot.writeFieldEnd(); - } - if (struct.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(struct.name); - oprot.writeFieldEnd(); - } - if (struct.children != null) { - oprot.writeFieldBegin(CHILDREN_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.children.size())); - for (String _iter14 : struct.children) - { - oprot.writeString(_iter14); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.aclList != null) { - oprot.writeFieldBegin(ACL_LIST_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.aclList.size())); - for (Acl _iter15 : struct.aclList) - { - _iter15.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.watchedEvent != null) { - oprot.writeFieldBegin(WATCHED_EVENT_FIELD_DESC); - struct.watchedEvent.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.leaderEvent != null) { - oprot.writeFieldBegin(LEADER_EVENT_FIELD_DESC); - struct.leaderEvent.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.childrenCacheEvent != null) { - oprot.writeFieldBegin(CHILDREN_CACHE_EVENT_FIELD_DESC); - struct.childrenCacheEvent.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class CuratorEventTupleSchemeFactory implements SchemeFactory { - public CuratorEventTupleScheme getScheme() { - return new CuratorEventTupleScheme(); - } - } - - private static class CuratorEventTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, CuratorEvent struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetType()) { - optionals.set(0); - } - if (struct.isSetResultCode()) { - optionals.set(1); - } - if (struct.isSetPath()) { - optionals.set(2); - } - if (struct.isSetContext()) { - optionals.set(3); - } - if (struct.isSetStat()) { - optionals.set(4); - } - if (struct.isSetData()) { - optionals.set(5); - } - if (struct.isSetName()) { - optionals.set(6); - } - if (struct.isSetChildren()) { - optionals.set(7); - } - if (struct.isSetAclList()) { - optionals.set(8); - } - if (struct.isSetWatchedEvent()) { - optionals.set(9); - } - if (struct.isSetLeaderEvent()) { - optionals.set(10); - } - if (struct.isSetChildrenCacheEvent()) { - optionals.set(11); - } - oprot.writeBitSet(optionals, 12); - if (struct.isSetType()) { - oprot.writeI32(struct.type.getValue()); - } - if (struct.isSetResultCode()) { - oprot.writeI32(struct.resultCode); - } - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetContext()) { - oprot.writeString(struct.context); - } - if (struct.isSetStat()) { - struct.stat.write(oprot); - } - if (struct.isSetData()) { - oprot.writeBinary(struct.data); - } - if (struct.isSetName()) { - oprot.writeString(struct.name); - } - if (struct.isSetChildren()) { - { - oprot.writeI32(struct.children.size()); - for (String _iter16 : struct.children) - { - oprot.writeString(_iter16); - } - } - } - if (struct.isSetAclList()) { - { - oprot.writeI32(struct.aclList.size()); - for (Acl _iter17 : struct.aclList) - { - _iter17.write(oprot); - } - } - } - if (struct.isSetWatchedEvent()) { - struct.watchedEvent.write(oprot); - } - if (struct.isSetLeaderEvent()) { - struct.leaderEvent.write(oprot); - } - if (struct.isSetChildrenCacheEvent()) { - struct.childrenCacheEvent.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, CuratorEvent struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(12); - if (incoming.get(0)) { - struct.type = CuratorEventType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - } - if (incoming.get(1)) { - struct.resultCode = iprot.readI32(); - struct.setResultCodeIsSet(true); - } - if (incoming.get(2)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - if (incoming.get(3)) { - struct.context = iprot.readString(); - struct.setContextIsSet(true); - } - if (incoming.get(4)) { - struct.stat = new Stat(); - struct.stat.read(iprot); - struct.setStatIsSet(true); - } - if (incoming.get(5)) { - struct.data = iprot.readBinary(); - struct.setDataIsSet(true); - } - if (incoming.get(6)) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } - if (incoming.get(7)) { - { - org.apache.thrift.protocol.TList _list18 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.children = new ArrayList(_list18.size); - for (int _i19 = 0; _i19 < _list18.size; ++_i19) - { - String _elem20; - _elem20 = iprot.readString(); - struct.children.add(_elem20); - } - } - struct.setChildrenIsSet(true); - } - if (incoming.get(8)) { - { - org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.aclList = new ArrayList(_list21.size); - for (int _i22 = 0; _i22 < _list21.size; ++_i22) - { - Acl _elem23; - _elem23 = new Acl(); - _elem23.read(iprot); - struct.aclList.add(_elem23); - } - } - struct.setAclListIsSet(true); - } - if (incoming.get(9)) { - struct.watchedEvent = new WatchedEvent(); - struct.watchedEvent.read(iprot); - struct.setWatchedEventIsSet(true); - } - if (incoming.get(10)) { - struct.leaderEvent = new LeaderEvent(); - struct.leaderEvent.read(iprot); - struct.setLeaderEventIsSet(true); - } - if (incoming.get(11)) { - struct.childrenCacheEvent = new PathChildrenCacheEvent(); - struct.childrenCacheEvent.read(iprot); - struct.setChildrenCacheEventIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorEventType.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorEventType.java deleted file mode 100644 index 08013ec70f..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorEventType.java +++ /dev/null @@ -1,99 +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 java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum CuratorEventType implements org.apache.thrift.TEnum { - PING(0), - CREATE(1), - DELETE(2), - EXISTS(3), - GET_DATA(4), - SET_DATA(5), - CHILDREN(6), - SYNC(7), - GET_ACL(8), - SET_ACL(9), - WATCHED(10), - CLOSING(11), - CONNECTION_CONNECTED(12), - CONNECTION_SUSPENDED(13), - CONNECTION_RECONNECTED(14), - CONNECTION_LOST(15), - CONNECTION_READ_ONLY(16), - LEADER(17), - PATH_CHILDREN_CACHE(18), - NODE_CACHE(19); - - private final int value; - - private CuratorEventType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static CuratorEventType findByValue(int value) { - switch (value) { - case 0: - return PING; - case 1: - return CREATE; - case 2: - return DELETE; - case 3: - return EXISTS; - case 4: - return GET_DATA; - case 5: - return SET_DATA; - case 6: - return CHILDREN; - case 7: - return SYNC; - case 8: - return GET_ACL; - case 9: - return SET_ACL; - case 10: - return WATCHED; - case 11: - return CLOSING; - case 12: - return CONNECTION_CONNECTED; - case 13: - return CONNECTION_SUSPENDED; - case 14: - return CONNECTION_RECONNECTED; - case 15: - return CONNECTION_LOST; - case 16: - return CONNECTION_READ_ONLY; - case 17: - return LEADER; - case 18: - return PATH_CHILDREN_CACHE; - case 19: - return NODE_CACHE; - default: - return null; - } - } -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorException.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorException.java deleted file mode 100644 index b397813b1b..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorException.java +++ /dev/null @@ -1,736 +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 CuratorException extends TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CuratorException"); - - private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1); - private static final org.apache.thrift.protocol.TField ZOO_KEEPER_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("zooKeeperException", org.apache.thrift.protocol.TType.I32, (short)2); - private static final org.apache.thrift.protocol.TField NODE_EXCEPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("nodeException", org.apache.thrift.protocol.TType.I32, (short)3); - private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new CuratorExceptionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new CuratorExceptionTupleSchemeFactory()); - } - - /** - * - * @see ExceptionType - */ - public ExceptionType type; // required - /** - * - * @see ZooKeeperExceptionType - */ - public ZooKeeperExceptionType zooKeeperException; // required - /** - * - * @see NodeExceptionType - */ - public NodeExceptionType nodeException; // required - public String message; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * - * @see ExceptionType - */ - TYPE((short)1, "type"), - /** - * - * @see ZooKeeperExceptionType - */ - ZOO_KEEPER_EXCEPTION((short)2, "zooKeeperException"), - /** - * - * @see NodeExceptionType - */ - NODE_EXCEPTION((short)3, "nodeException"), - MESSAGE((short)4, "message"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // TYPE - return TYPE; - case 2: // ZOO_KEEPER_EXCEPTION - return ZOO_KEEPER_EXCEPTION; - case 3: // NODE_EXCEPTION - return NODE_EXCEPTION; - case 4: // MESSAGE - return MESSAGE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ExceptionType.class))); - tmpMap.put(_Fields.ZOO_KEEPER_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("zooKeeperException", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ZooKeeperExceptionType.class))); - tmpMap.put(_Fields.NODE_EXCEPTION, new org.apache.thrift.meta_data.FieldMetaData("nodeException", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, NodeExceptionType.class))); - tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CuratorException.class, metaDataMap); - } - - public CuratorException() { - } - - public CuratorException( - ExceptionType type, - ZooKeeperExceptionType zooKeeperException, - NodeExceptionType nodeException, - String message) - { - this(); - this.type = type; - this.zooKeeperException = zooKeeperException; - this.nodeException = nodeException; - this.message = message; - } - - /** - * Performs a deep copy on other. - */ - public CuratorException(CuratorException other) { - if (other.isSetType()) { - this.type = other.type; - } - if (other.isSetZooKeeperException()) { - this.zooKeeperException = other.zooKeeperException; - } - if (other.isSetNodeException()) { - this.nodeException = other.nodeException; - } - if (other.isSetMessage()) { - this.message = other.message; - } - } - - public CuratorException deepCopy() { - return new CuratorException(this); - } - - @Override - public void clear() { - this.type = null; - this.zooKeeperException = null; - this.nodeException = null; - this.message = null; - } - - /** - * - * @see ExceptionType - */ - public ExceptionType getType() { - return this.type; - } - - /** - * - * @see ExceptionType - */ - public CuratorException setType(ExceptionType type) { - this.type = type; - return this; - } - - public void unsetType() { - this.type = null; - } - - /** Returns true if field type is set (has been assigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != null; - } - - public void setTypeIsSet(boolean value) { - if (!value) { - this.type = null; - } - } - - /** - * - * @see ZooKeeperExceptionType - */ - public ZooKeeperExceptionType getZooKeeperException() { - return this.zooKeeperException; - } - - /** - * - * @see ZooKeeperExceptionType - */ - public CuratorException setZooKeeperException(ZooKeeperExceptionType zooKeeperException) { - this.zooKeeperException = zooKeeperException; - return this; - } - - public void unsetZooKeeperException() { - this.zooKeeperException = null; - } - - /** Returns true if field zooKeeperException is set (has been assigned a value) and false otherwise */ - public boolean isSetZooKeeperException() { - return this.zooKeeperException != null; - } - - public void setZooKeeperExceptionIsSet(boolean value) { - if (!value) { - this.zooKeeperException = null; - } - } - - /** - * - * @see NodeExceptionType - */ - public NodeExceptionType getNodeException() { - return this.nodeException; - } - - /** - * - * @see NodeExceptionType - */ - public CuratorException setNodeException(NodeExceptionType nodeException) { - this.nodeException = nodeException; - return this; - } - - public void unsetNodeException() { - this.nodeException = null; - } - - /** Returns true if field nodeException is set (has been assigned a value) and false otherwise */ - public boolean isSetNodeException() { - return this.nodeException != null; - } - - public void setNodeExceptionIsSet(boolean value) { - if (!value) { - this.nodeException = null; - } - } - - public String getMessage() { - return this.message; - } - - public CuratorException setMessage(String message) { - this.message = message; - return this; - } - - public void unsetMessage() { - this.message = null; - } - - /** Returns true if field message is set (has been assigned a value) and false otherwise */ - public boolean isSetMessage() { - return this.message != null; - } - - public void setMessageIsSet(boolean value) { - if (!value) { - this.message = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((ExceptionType)value); - } - break; - - case ZOO_KEEPER_EXCEPTION: - if (value == null) { - unsetZooKeeperException(); - } else { - setZooKeeperException((ZooKeeperExceptionType)value); - } - break; - - case NODE_EXCEPTION: - if (value == null) { - unsetNodeException(); - } else { - setNodeException((NodeExceptionType)value); - } - break; - - case MESSAGE: - if (value == null) { - unsetMessage(); - } else { - setMessage((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case TYPE: - return getType(); - - case ZOO_KEEPER_EXCEPTION: - return getZooKeeperException(); - - case NODE_EXCEPTION: - return getNodeException(); - - case MESSAGE: - return getMessage(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case TYPE: - return isSetType(); - case ZOO_KEEPER_EXCEPTION: - return isSetZooKeeperException(); - case NODE_EXCEPTION: - return isSetNodeException(); - case MESSAGE: - return isSetMessage(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof CuratorException) - return this.equals((CuratorException)that); - return false; - } - - public boolean equals(CuratorException that) { - if (that == null) - return false; - - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (!this.type.equals(that.type)) - return false; - } - - boolean this_present_zooKeeperException = true && this.isSetZooKeeperException(); - boolean that_present_zooKeeperException = true && that.isSetZooKeeperException(); - if (this_present_zooKeeperException || that_present_zooKeeperException) { - if (!(this_present_zooKeeperException && that_present_zooKeeperException)) - return false; - if (!this.zooKeeperException.equals(that.zooKeeperException)) - return false; - } - - boolean this_present_nodeException = true && this.isSetNodeException(); - boolean that_present_nodeException = true && that.isSetNodeException(); - if (this_present_nodeException || that_present_nodeException) { - if (!(this_present_nodeException && that_present_nodeException)) - return false; - if (!this.nodeException.equals(that.nodeException)) - return false; - } - - boolean this_present_message = true && this.isSetMessage(); - boolean that_present_message = true && that.isSetMessage(); - if (this_present_message || that_present_message) { - if (!(this_present_message && that_present_message)) - return false; - if (!this.message.equals(that.message)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(CuratorException other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetZooKeeperException()).compareTo(other.isSetZooKeeperException()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetZooKeeperException()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.zooKeeperException, other.zooKeeperException); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNodeException()).compareTo(other.isSetNodeException()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNodeException()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeException, other.nodeException); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("CuratorException("); - boolean first = true; - - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - if (!first) sb.append(", "); - sb.append("zooKeeperException:"); - if (this.zooKeeperException == null) { - sb.append("null"); - } else { - sb.append(this.zooKeeperException); - } - first = false; - if (!first) sb.append(", "); - sb.append("nodeException:"); - if (this.nodeException == null) { - sb.append("null"); - } else { - sb.append(this.nodeException); - } - first = false; - if (!first) sb.append(", "); - sb.append("message:"); - if (this.message == null) { - sb.append("null"); - } else { - sb.append(this.message); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class CuratorExceptionStandardSchemeFactory implements SchemeFactory { - public CuratorExceptionStandardScheme getScheme() { - return new CuratorExceptionStandardScheme(); - } - } - - private static class CuratorExceptionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, CuratorException struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.type = ExceptionType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // ZOO_KEEPER_EXCEPTION - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.zooKeeperException = ZooKeeperExceptionType.findByValue(iprot.readI32()); - struct.setZooKeeperExceptionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // NODE_EXCEPTION - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.nodeException = NodeExceptionType.findByValue(iprot.readI32()); - struct.setNodeExceptionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // MESSAGE - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.message = iprot.readString(); - struct.setMessageIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, CuratorException struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeI32(struct.type.getValue()); - oprot.writeFieldEnd(); - } - if (struct.zooKeeperException != null) { - oprot.writeFieldBegin(ZOO_KEEPER_EXCEPTION_FIELD_DESC); - oprot.writeI32(struct.zooKeeperException.getValue()); - oprot.writeFieldEnd(); - } - if (struct.nodeException != null) { - oprot.writeFieldBegin(NODE_EXCEPTION_FIELD_DESC); - oprot.writeI32(struct.nodeException.getValue()); - oprot.writeFieldEnd(); - } - if (struct.message != null) { - oprot.writeFieldBegin(MESSAGE_FIELD_DESC); - oprot.writeString(struct.message); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class CuratorExceptionTupleSchemeFactory implements SchemeFactory { - public CuratorExceptionTupleScheme getScheme() { - return new CuratorExceptionTupleScheme(); - } - } - - private static class CuratorExceptionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, CuratorException struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetType()) { - optionals.set(0); - } - if (struct.isSetZooKeeperException()) { - optionals.set(1); - } - if (struct.isSetNodeException()) { - optionals.set(2); - } - if (struct.isSetMessage()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetType()) { - oprot.writeI32(struct.type.getValue()); - } - if (struct.isSetZooKeeperException()) { - oprot.writeI32(struct.zooKeeperException.getValue()); - } - if (struct.isSetNodeException()) { - oprot.writeI32(struct.nodeException.getValue()); - } - if (struct.isSetMessage()) { - oprot.writeString(struct.message); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, CuratorException struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - struct.type = ExceptionType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - } - if (incoming.get(1)) { - struct.zooKeeperException = ZooKeeperExceptionType.findByValue(iprot.readI32()); - struct.setZooKeeperExceptionIsSet(true); - } - if (incoming.get(2)) { - struct.nodeException = NodeExceptionType.findByValue(iprot.readI32()); - struct.setNodeExceptionIsSet(true); - } - if (incoming.get(3)) { - struct.message = iprot.readString(); - struct.setMessageIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorProjection.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorProjection.java deleted file mode 100644 index a2b18e3f8e..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/CuratorProjection.java +++ /dev/null @@ -1,388 +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 CuratorProjection implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CuratorProjection"); - - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new CuratorProjectionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new CuratorProjectionTupleSchemeFactory()); - } - - public String id; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ID((short)1, "id"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ID - return ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(CuratorProjection.class, metaDataMap); - } - - public CuratorProjection() { - } - - public CuratorProjection( - String id) - { - this(); - this.id = id; - } - - /** - * Performs a deep copy on other. - */ - public CuratorProjection(CuratorProjection other) { - if (other.isSetId()) { - this.id = other.id; - } - } - - public CuratorProjection deepCopy() { - return new CuratorProjection(this); - } - - @Override - public void clear() { - this.id = null; - } - - public String getId() { - return this.id; - } - - public CuratorProjection setId(String id) { - this.id = id; - return this; - } - - public void unsetId() { - this.id = null; - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return this.id != null; - } - - public void setIdIsSet(boolean value) { - if (!value) { - this.id = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ID: - if (value == null) { - unsetId(); - } else { - setId((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ID: - return getId(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ID: - return isSetId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof CuratorProjection) - return this.equals((CuratorProjection)that); - return false; - } - - public boolean equals(CuratorProjection that) { - if (that == null) - return false; - - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (!this.id.equals(that.id)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(CuratorProjection other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("CuratorProjection("); - boolean first = true; - - sb.append("id:"); - if (this.id == null) { - sb.append("null"); - } else { - sb.append(this.id); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class CuratorProjectionStandardSchemeFactory implements SchemeFactory { - public CuratorProjectionStandardScheme getScheme() { - return new CuratorProjectionStandardScheme(); - } - } - - private static class CuratorProjectionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, CuratorProjection struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, CuratorProjection struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.id != null) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeString(struct.id); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class CuratorProjectionTupleSchemeFactory implements SchemeFactory { - public CuratorProjectionTupleScheme getScheme() { - return new CuratorProjectionTupleScheme(); - } - } - - private static class CuratorProjectionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, CuratorProjection struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetId()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetId()) { - oprot.writeString(struct.id); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, CuratorProjection struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } - } - } - -} - 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 63d46eea13..0000000000 --- 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 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 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 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 { - 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 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 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 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 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 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 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 { - 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 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 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 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 extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); - public Processor(I iface) { - super(iface, getProcessMap(new HashMap>())); - } - - protected Processor(I iface, Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static Map> getProcessMap(Map> 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 extends org.apache.thrift.ProcessFunction { - 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); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class acquireSemaphore extends org.apache.thrift.ProcessFunction { - public acquireSemaphore() { - super("acquireSemaphore"); - } - - public acquireSemaphore_args getEmptyArgsInstance() { - return new acquireSemaphore_args(); - } - - protected boolean isOneway() { - return false; - } - - public acquireSemaphore_result getResult(I iface, acquireSemaphore_args args) throws org.apache.thrift.TException { - acquireSemaphore_result result = new acquireSemaphore_result(); - try { - result.success = iface.acquireSemaphore(args.projection, args.path, args.acquireQty, args.maxWaitMs, args.maxLeases); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class closeCuratorProjection extends org.apache.thrift.ProcessFunction { - public closeCuratorProjection() { - super("closeCuratorProjection"); - } - - public closeCuratorProjection_args getEmptyArgsInstance() { - return new closeCuratorProjection_args(); - } - - protected boolean isOneway() { - return false; - } - - public closeCuratorProjection_result getResult(I iface, closeCuratorProjection_args args) throws org.apache.thrift.TException { - closeCuratorProjection_result result = new closeCuratorProjection_result(); - iface.closeCuratorProjection(args.projection); - return result; - } - } - - public static class closeGenericProjection extends org.apache.thrift.ProcessFunction { - public closeGenericProjection() { - super("closeGenericProjection"); - } - - public closeGenericProjection_args getEmptyArgsInstance() { - return new closeGenericProjection_args(); - } - - protected boolean isOneway() { - return false; - } - - public closeGenericProjection_result getResult(I iface, closeGenericProjection_args args) throws org.apache.thrift.TException { - closeGenericProjection_result result = new closeGenericProjection_result(); - try { - result.success = iface.closeGenericProjection(args.projection, args.id); - result.setSuccessIsSet(true); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class createNode extends org.apache.thrift.ProcessFunction { - public createNode() { - super("createNode"); - } - - public createNode_args getEmptyArgsInstance() { - return new createNode_args(); - } - - protected boolean isOneway() { - return false; - } - - public createNode_result getResult(I iface, createNode_args args) throws org.apache.thrift.TException { - createNode_result result = new createNode_result(); - try { - result.success = iface.createNode(args.projection, args.spec); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class deleteNode extends org.apache.thrift.ProcessFunction { - public deleteNode() { - super("deleteNode"); - } - - public deleteNode_args getEmptyArgsInstance() { - return new deleteNode_args(); - } - - protected boolean isOneway() { - return false; - } - - public deleteNode_result getResult(I iface, deleteNode_args args) throws org.apache.thrift.TException { - deleteNode_result result = new deleteNode_result(); - try { - iface.deleteNode(args.projection, args.spec); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class exists extends org.apache.thrift.ProcessFunction { - public exists() { - super("exists"); - } - - public exists_args getEmptyArgsInstance() { - return new exists_args(); - } - - protected boolean isOneway() { - return false; - } - - public exists_result getResult(I iface, exists_args args) throws org.apache.thrift.TException { - exists_result result = new exists_result(); - try { - result.success = iface.exists(args.projection, args.spec); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class getChildren extends org.apache.thrift.ProcessFunction { - public getChildren() { - super("getChildren"); - } - - public getChildren_args getEmptyArgsInstance() { - return new getChildren_args(); - } - - protected boolean isOneway() { - return false; - } - - public getChildren_result getResult(I iface, getChildren_args args) throws org.apache.thrift.TException { - getChildren_result result = new getChildren_result(); - try { - result.success = iface.getChildren(args.projection, args.spec); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class getData extends org.apache.thrift.ProcessFunction { - public getData() { - super("getData"); - } - - public getData_args getEmptyArgsInstance() { - return new getData_args(); - } - - protected boolean isOneway() { - return false; - } - - public getData_result getResult(I iface, getData_args args) throws org.apache.thrift.TException { - getData_result result = new getData_result(); - try { - result.success = iface.getData(args.projection, args.spec); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class getLeaderParticipants extends org.apache.thrift.ProcessFunction { - public getLeaderParticipants() { - super("getLeaderParticipants"); - } - - public getLeaderParticipants_args getEmptyArgsInstance() { - return new getLeaderParticipants_args(); - } - - protected boolean isOneway() { - return false; - } - - public getLeaderParticipants_result getResult(I iface, getLeaderParticipants_args args) throws org.apache.thrift.TException { - getLeaderParticipants_result result = new getLeaderParticipants_result(); - try { - result.success = iface.getLeaderParticipants(args.projection, args.leaderProjection); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class getNodeCacheData extends org.apache.thrift.ProcessFunction { - public getNodeCacheData() { - super("getNodeCacheData"); - } - - public getNodeCacheData_args getEmptyArgsInstance() { - return new getNodeCacheData_args(); - } - - protected boolean isOneway() { - return false; - } - - public getNodeCacheData_result getResult(I iface, getNodeCacheData_args args) throws org.apache.thrift.TException { - getNodeCacheData_result result = new getNodeCacheData_result(); - try { - result.success = iface.getNodeCacheData(args.projection, args.cacheProjection); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class getPathChildrenCacheData extends org.apache.thrift.ProcessFunction { - public getPathChildrenCacheData() { - super("getPathChildrenCacheData"); - } - - public getPathChildrenCacheData_args getEmptyArgsInstance() { - return new getPathChildrenCacheData_args(); - } - - protected boolean isOneway() { - return false; - } - - public getPathChildrenCacheData_result getResult(I iface, getPathChildrenCacheData_args args) throws org.apache.thrift.TException { - getPathChildrenCacheData_result result = new getPathChildrenCacheData_result(); - try { - result.success = iface.getPathChildrenCacheData(args.projection, args.cacheProjection); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class getPathChildrenCacheDataForPath extends org.apache.thrift.ProcessFunction { - public getPathChildrenCacheDataForPath() { - super("getPathChildrenCacheDataForPath"); - } - - public getPathChildrenCacheDataForPath_args getEmptyArgsInstance() { - return new getPathChildrenCacheDataForPath_args(); - } - - protected boolean isOneway() { - return false; - } - - public getPathChildrenCacheDataForPath_result getResult(I iface, getPathChildrenCacheDataForPath_args args) throws org.apache.thrift.TException { - getPathChildrenCacheDataForPath_result result = new getPathChildrenCacheDataForPath_result(); - try { - result.success = iface.getPathChildrenCacheDataForPath(args.projection, args.cacheProjection, args.path); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class isLeader extends org.apache.thrift.ProcessFunction { - public isLeader() { - super("isLeader"); - } - - public isLeader_args getEmptyArgsInstance() { - return new isLeader_args(); - } - - protected boolean isOneway() { - return false; - } - - public isLeader_result getResult(I iface, isLeader_args args) throws org.apache.thrift.TException { - isLeader_result result = new isLeader_result(); - try { - result.success = iface.isLeader(args.projection, args.leaderProjection); - result.setSuccessIsSet(true); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class newCuratorProjection extends org.apache.thrift.ProcessFunction { - public newCuratorProjection() { - super("newCuratorProjection"); - } - - public newCuratorProjection_args getEmptyArgsInstance() { - return new newCuratorProjection_args(); - } - - protected boolean isOneway() { - return false; - } - - public newCuratorProjection_result getResult(I iface, newCuratorProjection_args args) throws org.apache.thrift.TException { - newCuratorProjection_result result = new newCuratorProjection_result(); - try { - result.success = iface.newCuratorProjection(args.connectionName); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class pingCuratorProjection extends org.apache.thrift.ProcessFunction { - public pingCuratorProjection() { - super("pingCuratorProjection"); - } - - public pingCuratorProjection_args getEmptyArgsInstance() { - return new pingCuratorProjection_args(); - } - - protected boolean isOneway() { - return true; - } - - public org.apache.thrift.TBase getResult(I iface, pingCuratorProjection_args args) throws org.apache.thrift.TException { - iface.pingCuratorProjection(args.projection); - return null; - } - } - - public static class setData extends org.apache.thrift.ProcessFunction { - public setData() { - super("setData"); - } - - public setData_args getEmptyArgsInstance() { - return new setData_args(); - } - - protected boolean isOneway() { - return false; - } - - public setData_result getResult(I iface, setData_args args) throws org.apache.thrift.TException { - setData_result result = new setData_result(); - try { - result.success = iface.setData(args.projection, args.spec); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class startLeaderSelector extends org.apache.thrift.ProcessFunction { - public startLeaderSelector() { - super("startLeaderSelector"); - } - - public startLeaderSelector_args getEmptyArgsInstance() { - return new startLeaderSelector_args(); - } - - protected boolean isOneway() { - return false; - } - - public startLeaderSelector_result getResult(I iface, startLeaderSelector_args args) throws org.apache.thrift.TException { - startLeaderSelector_result result = new startLeaderSelector_result(); - try { - result.success = iface.startLeaderSelector(args.projection, args.path, args.participantId, args.waitForLeadershipMs); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class startNodeCache extends org.apache.thrift.ProcessFunction { - public startNodeCache() { - super("startNodeCache"); - } - - public startNodeCache_args getEmptyArgsInstance() { - return new startNodeCache_args(); - } - - protected boolean isOneway() { - return false; - } - - public startNodeCache_result getResult(I iface, startNodeCache_args args) throws org.apache.thrift.TException { - startNodeCache_result result = new startNodeCache_result(); - try { - result.success = iface.startNodeCache(args.projection, args.path, args.dataIsCompressed, args.buildInitial); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class startPathChildrenCache extends org.apache.thrift.ProcessFunction { - public startPathChildrenCache() { - super("startPathChildrenCache"); - } - - public startPathChildrenCache_args getEmptyArgsInstance() { - return new startPathChildrenCache_args(); - } - - protected boolean isOneway() { - return false; - } - - public startPathChildrenCache_result getResult(I iface, startPathChildrenCache_args args) throws org.apache.thrift.TException { - startPathChildrenCache_result result = new startPathChildrenCache_result(); - try { - result.success = iface.startPathChildrenCache(args.projection, args.path, args.cacheData, args.dataIsCompressed, args.startMode); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class startPersistentEphemeralNode extends org.apache.thrift.ProcessFunction { - public startPersistentEphemeralNode() { - super("startPersistentEphemeralNode"); - } - - public startPersistentEphemeralNode_args getEmptyArgsInstance() { - return new startPersistentEphemeralNode_args(); - } - - protected boolean isOneway() { - return false; - } - - public startPersistentEphemeralNode_result getResult(I iface, startPersistentEphemeralNode_args args) throws org.apache.thrift.TException { - startPersistentEphemeralNode_result result = new startPersistentEphemeralNode_result(); - try { - result.success = iface.startPersistentEphemeralNode(args.projection, args.path, args.data, args.mode); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class sync extends org.apache.thrift.ProcessFunction { - public sync() { - super("sync"); - } - - public sync_args getEmptyArgsInstance() { - return new sync_args(); - } - - protected boolean isOneway() { - return false; - } - - public sync_result getResult(I iface, sync_args args) throws org.apache.thrift.TException { - sync_result result = new sync_result(); - try { - iface.sync(args.projection, args.path, args.asyncContext); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - } - - public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); - public AsyncProcessor(I iface) { - super(iface, getProcessMap(new HashMap>())); - } - - protected AsyncProcessor(I iface, Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static Map> getProcessMap(Map> 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 extends org.apache.thrift.AsyncProcessFunction { - public acquireLock() { - super("acquireLock"); - } - - public acquireLock_args getEmptyArgsInstance() { - return new acquireLock_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(OptionalLockProjection o) { - acquireLock_result result = new acquireLock_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - acquireLock_result result = new acquireLock_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, acquireLock_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.acquireLock(args.projection, args.path, args.maxWaitMs,resultHandler); - } - } - - public static class acquireSemaphore extends org.apache.thrift.AsyncProcessFunction> { - public acquireSemaphore() { - super("acquireSemaphore"); - } - - public acquireSemaphore_args getEmptyArgsInstance() { - return new acquireSemaphore_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - acquireSemaphore_result result = new acquireSemaphore_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - acquireSemaphore_result result = new acquireSemaphore_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, acquireSemaphore_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.acquireSemaphore(args.projection, args.path, args.acquireQty, args.maxWaitMs, args.maxLeases,resultHandler); - } - } - - public static class closeCuratorProjection extends org.apache.thrift.AsyncProcessFunction { - public closeCuratorProjection() { - super("closeCuratorProjection"); - } - - public closeCuratorProjection_args getEmptyArgsInstance() { - return new closeCuratorProjection_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - closeCuratorProjection_result result = new closeCuratorProjection_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - closeCuratorProjection_result result = new closeCuratorProjection_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, closeCuratorProjection_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.closeCuratorProjection(args.projection,resultHandler); - } - } - - public static class closeGenericProjection extends org.apache.thrift.AsyncProcessFunction { - public closeGenericProjection() { - super("closeGenericProjection"); - } - - public closeGenericProjection_args getEmptyArgsInstance() { - return new closeGenericProjection_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - closeGenericProjection_result result = new closeGenericProjection_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - closeGenericProjection_result result = new closeGenericProjection_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, closeGenericProjection_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.closeGenericProjection(args.projection, args.id,resultHandler); - } - } - - public static class createNode extends org.apache.thrift.AsyncProcessFunction { - public createNode() { - super("createNode"); - } - - public createNode_args getEmptyArgsInstance() { - return new createNode_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(OptionalPath o) { - createNode_result result = new createNode_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - createNode_result result = new createNode_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, createNode_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.createNode(args.projection, args.spec,resultHandler); - } - } - - public static class deleteNode extends org.apache.thrift.AsyncProcessFunction { - public deleteNode() { - super("deleteNode"); - } - - public deleteNode_args getEmptyArgsInstance() { - return new deleteNode_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - deleteNode_result result = new deleteNode_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - deleteNode_result result = new deleteNode_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, deleteNode_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.deleteNode(args.projection, args.spec,resultHandler); - } - } - - public static class exists extends org.apache.thrift.AsyncProcessFunction { - public exists() { - super("exists"); - } - - public exists_args getEmptyArgsInstance() { - return new exists_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(OptionalStat o) { - exists_result result = new exists_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - exists_result result = new exists_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, exists_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.exists(args.projection, args.spec,resultHandler); - } - } - - public static class getChildren extends org.apache.thrift.AsyncProcessFunction { - public getChildren() { - super("getChildren"); - } - - public getChildren_args getEmptyArgsInstance() { - return new getChildren_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(OptionalChildrenList o) { - getChildren_result result = new getChildren_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getChildren_result result = new getChildren_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getChildren_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getChildren(args.projection, args.spec,resultHandler); - } - } - - public static class getData extends org.apache.thrift.AsyncProcessFunction { - public getData() { - super("getData"); - } - - public getData_args getEmptyArgsInstance() { - return new getData_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(OptionalData o) { - getData_result result = new getData_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getData_result result = new getData_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getData_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getData(args.projection, args.spec,resultHandler); - } - } - - public static class getLeaderParticipants extends org.apache.thrift.AsyncProcessFunction> { - public getLeaderParticipants() { - super("getLeaderParticipants"); - } - - public getLeaderParticipants_args getEmptyArgsInstance() { - return new getLeaderParticipants_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - getLeaderParticipants_result result = new getLeaderParticipants_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getLeaderParticipants_result result = new getLeaderParticipants_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getLeaderParticipants_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.getLeaderParticipants(args.projection, args.leaderProjection,resultHandler); - } - } - - public static class getNodeCacheData extends org.apache.thrift.AsyncProcessFunction { - public getNodeCacheData() { - super("getNodeCacheData"); - } - - public getNodeCacheData_args getEmptyArgsInstance() { - return new getNodeCacheData_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(ChildData o) { - getNodeCacheData_result result = new getNodeCacheData_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getNodeCacheData_result result = new getNodeCacheData_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getNodeCacheData_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getNodeCacheData(args.projection, args.cacheProjection,resultHandler); - } - } - - public static class getPathChildrenCacheData extends org.apache.thrift.AsyncProcessFunction> { - public getPathChildrenCacheData() { - super("getPathChildrenCacheData"); - } - - public getPathChildrenCacheData_args getEmptyArgsInstance() { - return new getPathChildrenCacheData_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - getPathChildrenCacheData_result result = new getPathChildrenCacheData_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getPathChildrenCacheData_result result = new getPathChildrenCacheData_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getPathChildrenCacheData_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.getPathChildrenCacheData(args.projection, args.cacheProjection,resultHandler); - } - } - - public static class getPathChildrenCacheDataForPath extends org.apache.thrift.AsyncProcessFunction { - public getPathChildrenCacheDataForPath() { - super("getPathChildrenCacheDataForPath"); - } - - public getPathChildrenCacheDataForPath_args getEmptyArgsInstance() { - return new getPathChildrenCacheDataForPath_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(ChildData o) { - getPathChildrenCacheDataForPath_result result = new getPathChildrenCacheDataForPath_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getPathChildrenCacheDataForPath_result result = new getPathChildrenCacheDataForPath_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getPathChildrenCacheDataForPath_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getPathChildrenCacheDataForPath(args.projection, args.cacheProjection, args.path,resultHandler); - } - } - - public static class isLeader extends org.apache.thrift.AsyncProcessFunction { - public isLeader() { - super("isLeader"); - } - - public isLeader_args getEmptyArgsInstance() { - return new isLeader_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Boolean o) { - isLeader_result result = new isLeader_result(); - result.success = o; - result.setSuccessIsSet(true); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - isLeader_result result = new isLeader_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, isLeader_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.isLeader(args.projection, args.leaderProjection,resultHandler); - } - } - - public static class newCuratorProjection extends org.apache.thrift.AsyncProcessFunction { - public newCuratorProjection() { - super("newCuratorProjection"); - } - - public newCuratorProjection_args getEmptyArgsInstance() { - return new newCuratorProjection_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(CuratorProjection o) { - newCuratorProjection_result result = new newCuratorProjection_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - newCuratorProjection_result result = new newCuratorProjection_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, newCuratorProjection_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.newCuratorProjection(args.connectionName,resultHandler); - } - } - - public static class pingCuratorProjection extends org.apache.thrift.AsyncProcessFunction { - public pingCuratorProjection() { - super("pingCuratorProjection"); - } - - public pingCuratorProjection_args getEmptyArgsInstance() { - return new pingCuratorProjection_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - } - public void onError(Exception e) { - } - }; - } - - protected boolean isOneway() { - return true; - } - - public void start(I iface, pingCuratorProjection_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.pingCuratorProjection(args.projection,resultHandler); - } - } - - public static class setData extends org.apache.thrift.AsyncProcessFunction { - public setData() { - super("setData"); - } - - public setData_args getEmptyArgsInstance() { - return new setData_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(OptionalStat o) { - setData_result result = new setData_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - setData_result result = new setData_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, setData_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.setData(args.projection, args.spec,resultHandler); - } - } - - public static class startLeaderSelector extends org.apache.thrift.AsyncProcessFunction { - public startLeaderSelector() { - super("startLeaderSelector"); - } - - public startLeaderSelector_args getEmptyArgsInstance() { - return new startLeaderSelector_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(LeaderResult o) { - startLeaderSelector_result result = new startLeaderSelector_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - startLeaderSelector_result result = new startLeaderSelector_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, startLeaderSelector_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.startLeaderSelector(args.projection, args.path, args.participantId, args.waitForLeadershipMs,resultHandler); - } - } - - public static class startNodeCache extends org.apache.thrift.AsyncProcessFunction { - public startNodeCache() { - super("startNodeCache"); - } - - public startNodeCache_args getEmptyArgsInstance() { - return new startNodeCache_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(NodeCacheProjection o) { - startNodeCache_result result = new startNodeCache_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - startNodeCache_result result = new startNodeCache_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, startNodeCache_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.startNodeCache(args.projection, args.path, args.dataIsCompressed, args.buildInitial,resultHandler); - } - } - - public static class startPathChildrenCache extends org.apache.thrift.AsyncProcessFunction { - public startPathChildrenCache() { - super("startPathChildrenCache"); - } - - public startPathChildrenCache_args getEmptyArgsInstance() { - return new startPathChildrenCache_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(PathChildrenCacheProjection o) { - startPathChildrenCache_result result = new startPathChildrenCache_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - startPathChildrenCache_result result = new startPathChildrenCache_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, startPathChildrenCache_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.startPathChildrenCache(args.projection, args.path, args.cacheData, args.dataIsCompressed, args.startMode,resultHandler); - } - } - - public static class startPersistentEphemeralNode extends org.apache.thrift.AsyncProcessFunction { - public startPersistentEphemeralNode() { - super("startPersistentEphemeralNode"); - } - - public startPersistentEphemeralNode_args getEmptyArgsInstance() { - return new startPersistentEphemeralNode_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(PersistentEphemeralNodeProjection o) { - startPersistentEphemeralNode_result result = new startPersistentEphemeralNode_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - startPersistentEphemeralNode_result result = new startPersistentEphemeralNode_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, startPersistentEphemeralNode_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.startPersistentEphemeralNode(args.projection, args.path, args.data, args.mode,resultHandler); - } - } - - public static class sync extends org.apache.thrift.AsyncProcessFunction { - public sync() { - super("sync"); - } - - public sync_args getEmptyArgsInstance() { - return new sync_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - sync_result result = new sync_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - sync_result result = new sync_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, sync_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.sync(args.projection, args.path, args.asyncContext,resultHandler); - } - } - - } - - public static class acquireLock_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("acquireLock_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField MAX_WAIT_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxWaitMs", org.apache.thrift.protocol.TType.I32, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new acquireLock_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new acquireLock_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public String path; // required - public int maxWaitMs; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - PATH((short)2, "path"), - MAX_WAIT_MS((short)3, "maxWaitMs"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // PATH - return PATH; - case 3: // MAX_WAIT_MS - return MAX_WAIT_MS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __MAXWAITMS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.MAX_WAIT_MS, new org.apache.thrift.meta_data.FieldMetaData("maxWaitMs", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(acquireLock_args.class, metaDataMap); - } - - public acquireLock_args() { - } - - public acquireLock_args( - CuratorProjection projection, - String path, - int maxWaitMs) - { - this(); - this.projection = projection; - this.path = path; - this.maxWaitMs = maxWaitMs; - setMaxWaitMsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public acquireLock_args(acquireLock_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetPath()) { - this.path = other.path; - } - this.maxWaitMs = other.maxWaitMs; - } - - public acquireLock_args deepCopy() { - return new acquireLock_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.path = null; - setMaxWaitMsIsSet(false); - this.maxWaitMs = 0; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public acquireLock_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public String getPath() { - return this.path; - } - - public acquireLock_args setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public int getMaxWaitMs() { - return this.maxWaitMs; - } - - public acquireLock_args setMaxWaitMs(int maxWaitMs) { - this.maxWaitMs = maxWaitMs; - setMaxWaitMsIsSet(true); - return this; - } - - public void unsetMaxWaitMs() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXWAITMS_ISSET_ID); - } - - /** Returns true if field maxWaitMs is set (has been assigned a value) and false otherwise */ - public boolean isSetMaxWaitMs() { - return EncodingUtils.testBit(__isset_bitfield, __MAXWAITMS_ISSET_ID); - } - - public void setMaxWaitMsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXWAITMS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case MAX_WAIT_MS: - if (value == null) { - unsetMaxWaitMs(); - } else { - setMaxWaitMs((Integer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case PATH: - return getPath(); - - case MAX_WAIT_MS: - return Integer.valueOf(getMaxWaitMs()); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case PATH: - return isSetPath(); - case MAX_WAIT_MS: - return isSetMaxWaitMs(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof acquireLock_args) - return this.equals((acquireLock_args)that); - return false; - } - - public boolean equals(acquireLock_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_maxWaitMs = true; - boolean that_present_maxWaitMs = true; - if (this_present_maxWaitMs || that_present_maxWaitMs) { - if (!(this_present_maxWaitMs && that_present_maxWaitMs)) - return false; - if (this.maxWaitMs != that.maxWaitMs) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(acquireLock_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMaxWaitMs()).compareTo(other.isSetMaxWaitMs()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMaxWaitMs()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxWaitMs, other.maxWaitMs); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("acquireLock_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - if (!first) sb.append(", "); - sb.append("maxWaitMs:"); - sb.append(this.maxWaitMs); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class acquireLock_argsStandardSchemeFactory implements SchemeFactory { - public acquireLock_argsStandardScheme getScheme() { - return new acquireLock_argsStandardScheme(); - } - } - - private static class acquireLock_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, acquireLock_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // MAX_WAIT_MS - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.maxWaitMs = iprot.readI32(); - struct.setMaxWaitMsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, acquireLock_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(MAX_WAIT_MS_FIELD_DESC); - oprot.writeI32(struct.maxWaitMs); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class acquireLock_argsTupleSchemeFactory implements SchemeFactory { - public acquireLock_argsTupleScheme getScheme() { - return new acquireLock_argsTupleScheme(); - } - } - - private static class acquireLock_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, acquireLock_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetPath()) { - optionals.set(1); - } - if (struct.isSetMaxWaitMs()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetMaxWaitMs()) { - oprot.writeI32(struct.maxWaitMs); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, acquireLock_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - if (incoming.get(2)) { - struct.maxWaitMs = iprot.readI32(); - struct.setMaxWaitMsIsSet(true); - } - } - } - - } - - public static class acquireLock_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("acquireLock_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new acquireLock_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new acquireLock_resultTupleSchemeFactory()); - } - - public OptionalLockProjection success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalLockProjection.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(acquireLock_result.class, metaDataMap); - } - - public acquireLock_result() { - } - - public acquireLock_result( - OptionalLockProjection success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public acquireLock_result(acquireLock_result other) { - if (other.isSetSuccess()) { - this.success = new OptionalLockProjection(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public acquireLock_result deepCopy() { - return new acquireLock_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public OptionalLockProjection getSuccess() { - return this.success; - } - - public acquireLock_result setSuccess(OptionalLockProjection success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public acquireLock_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((OptionalLockProjection)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof acquireLock_result) - return this.equals((acquireLock_result)that); - return false; - } - - public boolean equals(acquireLock_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(acquireLock_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("acquireLock_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class acquireLock_resultStandardSchemeFactory implements SchemeFactory { - public acquireLock_resultStandardScheme getScheme() { - return new acquireLock_resultStandardScheme(); - } - } - - private static class acquireLock_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, acquireLock_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new OptionalLockProjection(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, acquireLock_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class acquireLock_resultTupleSchemeFactory implements SchemeFactory { - public acquireLock_resultTupleScheme getScheme() { - return new acquireLock_resultTupleScheme(); - } - } - - private static class acquireLock_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, acquireLock_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, acquireLock_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new OptionalLockProjection(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class acquireSemaphore_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("acquireSemaphore_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField ACQUIRE_QTY_FIELD_DESC = new org.apache.thrift.protocol.TField("acquireQty", org.apache.thrift.protocol.TType.I32, (short)3); - private static final org.apache.thrift.protocol.TField MAX_WAIT_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxWaitMs", org.apache.thrift.protocol.TType.I32, (short)4); - private static final org.apache.thrift.protocol.TField MAX_LEASES_FIELD_DESC = new org.apache.thrift.protocol.TField("maxLeases", org.apache.thrift.protocol.TType.I32, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new acquireSemaphore_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new acquireSemaphore_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public String path; // required - public int acquireQty; // required - public int maxWaitMs; // required - public int maxLeases; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - PATH((short)2, "path"), - ACQUIRE_QTY((short)3, "acquireQty"), - MAX_WAIT_MS((short)4, "maxWaitMs"), - MAX_LEASES((short)5, "maxLeases"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // PATH - return PATH; - case 3: // ACQUIRE_QTY - return ACQUIRE_QTY; - case 4: // MAX_WAIT_MS - return MAX_WAIT_MS; - case 5: // MAX_LEASES - return MAX_LEASES; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ACQUIREQTY_ISSET_ID = 0; - private static final int __MAXWAITMS_ISSET_ID = 1; - private static final int __MAXLEASES_ISSET_ID = 2; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ACQUIRE_QTY, new org.apache.thrift.meta_data.FieldMetaData("acquireQty", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.MAX_WAIT_MS, new org.apache.thrift.meta_data.FieldMetaData("maxWaitMs", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.MAX_LEASES, new org.apache.thrift.meta_data.FieldMetaData("maxLeases", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(acquireSemaphore_args.class, metaDataMap); - } - - public acquireSemaphore_args() { - } - - public acquireSemaphore_args( - CuratorProjection projection, - String path, - int acquireQty, - int maxWaitMs, - int maxLeases) - { - this(); - this.projection = projection; - this.path = path; - this.acquireQty = acquireQty; - setAcquireQtyIsSet(true); - this.maxWaitMs = maxWaitMs; - setMaxWaitMsIsSet(true); - this.maxLeases = maxLeases; - setMaxLeasesIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public acquireSemaphore_args(acquireSemaphore_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetPath()) { - this.path = other.path; - } - this.acquireQty = other.acquireQty; - this.maxWaitMs = other.maxWaitMs; - this.maxLeases = other.maxLeases; - } - - public acquireSemaphore_args deepCopy() { - return new acquireSemaphore_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.path = null; - setAcquireQtyIsSet(false); - this.acquireQty = 0; - setMaxWaitMsIsSet(false); - this.maxWaitMs = 0; - setMaxLeasesIsSet(false); - this.maxLeases = 0; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public acquireSemaphore_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public String getPath() { - return this.path; - } - - public acquireSemaphore_args setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public int getAcquireQty() { - return this.acquireQty; - } - - public acquireSemaphore_args setAcquireQty(int acquireQty) { - this.acquireQty = acquireQty; - setAcquireQtyIsSet(true); - return this; - } - - public void unsetAcquireQty() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ACQUIREQTY_ISSET_ID); - } - - /** Returns true if field acquireQty is set (has been assigned a value) and false otherwise */ - public boolean isSetAcquireQty() { - return EncodingUtils.testBit(__isset_bitfield, __ACQUIREQTY_ISSET_ID); - } - - public void setAcquireQtyIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ACQUIREQTY_ISSET_ID, value); - } - - public int getMaxWaitMs() { - return this.maxWaitMs; - } - - public acquireSemaphore_args setMaxWaitMs(int maxWaitMs) { - this.maxWaitMs = maxWaitMs; - setMaxWaitMsIsSet(true); - return this; - } - - public void unsetMaxWaitMs() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXWAITMS_ISSET_ID); - } - - /** Returns true if field maxWaitMs is set (has been assigned a value) and false otherwise */ - public boolean isSetMaxWaitMs() { - return EncodingUtils.testBit(__isset_bitfield, __MAXWAITMS_ISSET_ID); - } - - public void setMaxWaitMsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXWAITMS_ISSET_ID, value); - } - - public int getMaxLeases() { - return this.maxLeases; - } - - public acquireSemaphore_args setMaxLeases(int maxLeases) { - this.maxLeases = maxLeases; - setMaxLeasesIsSet(true); - return this; - } - - public void unsetMaxLeases() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXLEASES_ISSET_ID); - } - - /** Returns true if field maxLeases is set (has been assigned a value) and false otherwise */ - public boolean isSetMaxLeases() { - return EncodingUtils.testBit(__isset_bitfield, __MAXLEASES_ISSET_ID); - } - - public void setMaxLeasesIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXLEASES_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case ACQUIRE_QTY: - if (value == null) { - unsetAcquireQty(); - } else { - setAcquireQty((Integer)value); - } - break; - - case MAX_WAIT_MS: - if (value == null) { - unsetMaxWaitMs(); - } else { - setMaxWaitMs((Integer)value); - } - break; - - case MAX_LEASES: - if (value == null) { - unsetMaxLeases(); - } else { - setMaxLeases((Integer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case PATH: - return getPath(); - - case ACQUIRE_QTY: - return Integer.valueOf(getAcquireQty()); - - case MAX_WAIT_MS: - return Integer.valueOf(getMaxWaitMs()); - - case MAX_LEASES: - return Integer.valueOf(getMaxLeases()); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case PATH: - return isSetPath(); - case ACQUIRE_QTY: - return isSetAcquireQty(); - case MAX_WAIT_MS: - return isSetMaxWaitMs(); - case MAX_LEASES: - return isSetMaxLeases(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof acquireSemaphore_args) - return this.equals((acquireSemaphore_args)that); - return false; - } - - public boolean equals(acquireSemaphore_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_acquireQty = true; - boolean that_present_acquireQty = true; - if (this_present_acquireQty || that_present_acquireQty) { - if (!(this_present_acquireQty && that_present_acquireQty)) - return false; - if (this.acquireQty != that.acquireQty) - return false; - } - - boolean this_present_maxWaitMs = true; - boolean that_present_maxWaitMs = true; - if (this_present_maxWaitMs || that_present_maxWaitMs) { - if (!(this_present_maxWaitMs && that_present_maxWaitMs)) - return false; - if (this.maxWaitMs != that.maxWaitMs) - return false; - } - - boolean this_present_maxLeases = true; - boolean that_present_maxLeases = true; - if (this_present_maxLeases || that_present_maxLeases) { - if (!(this_present_maxLeases && that_present_maxLeases)) - return false; - if (this.maxLeases != that.maxLeases) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(acquireSemaphore_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAcquireQty()).compareTo(other.isSetAcquireQty()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAcquireQty()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.acquireQty, other.acquireQty); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMaxWaitMs()).compareTo(other.isSetMaxWaitMs()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMaxWaitMs()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxWaitMs, other.maxWaitMs); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMaxLeases()).compareTo(other.isSetMaxLeases()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMaxLeases()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxLeases, other.maxLeases); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("acquireSemaphore_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - if (!first) sb.append(", "); - sb.append("acquireQty:"); - sb.append(this.acquireQty); - first = false; - if (!first) sb.append(", "); - sb.append("maxWaitMs:"); - sb.append(this.maxWaitMs); - first = false; - if (!first) sb.append(", "); - sb.append("maxLeases:"); - sb.append(this.maxLeases); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class acquireSemaphore_argsStandardSchemeFactory implements SchemeFactory { - public acquireSemaphore_argsStandardScheme getScheme() { - return new acquireSemaphore_argsStandardScheme(); - } - } - - private static class acquireSemaphore_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, acquireSemaphore_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // ACQUIRE_QTY - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.acquireQty = iprot.readI32(); - struct.setAcquireQtyIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // MAX_WAIT_MS - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.maxWaitMs = iprot.readI32(); - struct.setMaxWaitMsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // MAX_LEASES - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.maxLeases = iprot.readI32(); - struct.setMaxLeasesIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, acquireSemaphore_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(ACQUIRE_QTY_FIELD_DESC); - oprot.writeI32(struct.acquireQty); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(MAX_WAIT_MS_FIELD_DESC); - oprot.writeI32(struct.maxWaitMs); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(MAX_LEASES_FIELD_DESC); - oprot.writeI32(struct.maxLeases); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class acquireSemaphore_argsTupleSchemeFactory implements SchemeFactory { - public acquireSemaphore_argsTupleScheme getScheme() { - return new acquireSemaphore_argsTupleScheme(); - } - } - - private static class acquireSemaphore_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, acquireSemaphore_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetPath()) { - optionals.set(1); - } - if (struct.isSetAcquireQty()) { - optionals.set(2); - } - if (struct.isSetMaxWaitMs()) { - optionals.set(3); - } - if (struct.isSetMaxLeases()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetAcquireQty()) { - oprot.writeI32(struct.acquireQty); - } - if (struct.isSetMaxWaitMs()) { - oprot.writeI32(struct.maxWaitMs); - } - if (struct.isSetMaxLeases()) { - oprot.writeI32(struct.maxLeases); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, acquireSemaphore_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - if (incoming.get(2)) { - struct.acquireQty = iprot.readI32(); - struct.setAcquireQtyIsSet(true); - } - if (incoming.get(3)) { - struct.maxWaitMs = iprot.readI32(); - struct.setMaxWaitMsIsSet(true); - } - if (incoming.get(4)) { - struct.maxLeases = iprot.readI32(); - struct.setMaxLeasesIsSet(true); - } - } - } - - } - - public static class acquireSemaphore_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("acquireSemaphore_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new acquireSemaphore_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new acquireSemaphore_resultTupleSchemeFactory()); - } - - public List success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LeaseProjection.class)))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(acquireSemaphore_result.class, metaDataMap); - } - - public acquireSemaphore_result() { - } - - public acquireSemaphore_result( - List success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public acquireSemaphore_result(acquireSemaphore_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (LeaseProjection other_element : other.success) { - __this__success.add(new LeaseProjection(other_element)); - } - this.success = __this__success; - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public acquireSemaphore_result deepCopy() { - return new acquireSemaphore_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(LeaseProjection elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public acquireSemaphore_result setSuccess(List success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public acquireSemaphore_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof acquireSemaphore_result) - return this.equals((acquireSemaphore_result)that); - return false; - } - - public boolean equals(acquireSemaphore_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(acquireSemaphore_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("acquireSemaphore_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class acquireSemaphore_resultStandardSchemeFactory implements SchemeFactory { - public acquireSemaphore_resultStandardScheme getScheme() { - return new acquireSemaphore_resultStandardScheme(); - } - } - - private static class acquireSemaphore_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, acquireSemaphore_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list24 = iprot.readListBegin(); - struct.success = new ArrayList(_list24.size); - for (int _i25 = 0; _i25 < _list24.size; ++_i25) - { - LeaseProjection _elem26; - _elem26 = new LeaseProjection(); - _elem26.read(iprot); - struct.success.add(_elem26); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, acquireSemaphore_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (LeaseProjection _iter27 : struct.success) - { - _iter27.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class acquireSemaphore_resultTupleSchemeFactory implements SchemeFactory { - public acquireSemaphore_resultTupleScheme getScheme() { - return new acquireSemaphore_resultTupleScheme(); - } - } - - private static class acquireSemaphore_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, acquireSemaphore_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (LeaseProjection _iter28 : struct.success) - { - _iter28.write(oprot); - } - } - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, acquireSemaphore_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list29.size); - for (int _i30 = 0; _i30 < _list29.size; ++_i30) - { - LeaseProjection _elem31; - _elem31 = new LeaseProjection(); - _elem31.read(iprot); - struct.success.add(_elem31); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class closeCuratorProjection_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeCuratorProjection_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new closeCuratorProjection_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new closeCuratorProjection_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeCuratorProjection_args.class, metaDataMap); - } - - public closeCuratorProjection_args() { - } - - public closeCuratorProjection_args( - CuratorProjection projection) - { - this(); - this.projection = projection; - } - - /** - * Performs a deep copy on other. - */ - public closeCuratorProjection_args(closeCuratorProjection_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - } - - public closeCuratorProjection_args deepCopy() { - return new closeCuratorProjection_args(this); - } - - @Override - public void clear() { - this.projection = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public closeCuratorProjection_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof closeCuratorProjection_args) - return this.equals((closeCuratorProjection_args)that); - return false; - } - - public boolean equals(closeCuratorProjection_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(closeCuratorProjection_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("closeCuratorProjection_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class closeCuratorProjection_argsStandardSchemeFactory implements SchemeFactory { - public closeCuratorProjection_argsStandardScheme getScheme() { - return new closeCuratorProjection_argsStandardScheme(); - } - } - - private static class closeCuratorProjection_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, closeCuratorProjection_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, closeCuratorProjection_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class closeCuratorProjection_argsTupleSchemeFactory implements SchemeFactory { - public closeCuratorProjection_argsTupleScheme getScheme() { - return new closeCuratorProjection_argsTupleScheme(); - } - } - - private static class closeCuratorProjection_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, closeCuratorProjection_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, closeCuratorProjection_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - } - } - - } - - public static class closeCuratorProjection_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeCuratorProjection_result"); - - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new closeCuratorProjection_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new closeCuratorProjection_resultTupleSchemeFactory()); - } - - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { -; - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeCuratorProjection_result.class, metaDataMap); - } - - public closeCuratorProjection_result() { - } - - /** - * Performs a deep copy on other. - */ - public closeCuratorProjection_result(closeCuratorProjection_result other) { - } - - public closeCuratorProjection_result deepCopy() { - return new closeCuratorProjection_result(this); - } - - @Override - public void clear() { - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof closeCuratorProjection_result) - return this.equals((closeCuratorProjection_result)that); - return false; - } - - public boolean equals(closeCuratorProjection_result that) { - if (that == null) - return false; - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(closeCuratorProjection_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("closeCuratorProjection_result("); - boolean first = true; - - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class closeCuratorProjection_resultStandardSchemeFactory implements SchemeFactory { - public closeCuratorProjection_resultStandardScheme getScheme() { - return new closeCuratorProjection_resultStandardScheme(); - } - } - - private static class closeCuratorProjection_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, closeCuratorProjection_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, closeCuratorProjection_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class closeCuratorProjection_resultTupleSchemeFactory implements SchemeFactory { - public closeCuratorProjection_resultTupleScheme getScheme() { - return new closeCuratorProjection_resultTupleScheme(); - } - } - - private static class closeCuratorProjection_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, closeCuratorProjection_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, closeCuratorProjection_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - } - } - - } - - public static class closeGenericProjection_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeGenericProjection_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new closeGenericProjection_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new closeGenericProjection_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public String id; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - ID((short)2, "id"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // ID - return ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeGenericProjection_args.class, metaDataMap); - } - - public closeGenericProjection_args() { - } - - public closeGenericProjection_args( - CuratorProjection projection, - String id) - { - this(); - this.projection = projection; - this.id = id; - } - - /** - * Performs a deep copy on other. - */ - public closeGenericProjection_args(closeGenericProjection_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetId()) { - this.id = other.id; - } - } - - public closeGenericProjection_args deepCopy() { - return new closeGenericProjection_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.id = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public closeGenericProjection_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public String getId() { - return this.id; - } - - public closeGenericProjection_args setId(String id) { - this.id = id; - return this; - } - - public void unsetId() { - this.id = null; - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return this.id != null; - } - - public void setIdIsSet(boolean value) { - if (!value) { - this.id = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case ID: - if (value == null) { - unsetId(); - } else { - setId((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case ID: - return getId(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case ID: - return isSetId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof closeGenericProjection_args) - return this.equals((closeGenericProjection_args)that); - return false; - } - - public boolean equals(closeGenericProjection_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (!this.id.equals(that.id)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(closeGenericProjection_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("closeGenericProjection_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("id:"); - if (this.id == null) { - sb.append("null"); - } else { - sb.append(this.id); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class closeGenericProjection_argsStandardSchemeFactory implements SchemeFactory { - public closeGenericProjection_argsStandardScheme getScheme() { - return new closeGenericProjection_argsStandardScheme(); - } - } - - private static class closeGenericProjection_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, closeGenericProjection_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, closeGenericProjection_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.id != null) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeString(struct.id); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class closeGenericProjection_argsTupleSchemeFactory implements SchemeFactory { - public closeGenericProjection_argsTupleScheme getScheme() { - return new closeGenericProjection_argsTupleScheme(); - } - } - - private static class closeGenericProjection_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, closeGenericProjection_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetId()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetId()) { - oprot.writeString(struct.id); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, closeGenericProjection_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } - } - } - - } - - public static class closeGenericProjection_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("closeGenericProjection_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new closeGenericProjection_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new closeGenericProjection_resultTupleSchemeFactory()); - } - - public boolean success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(closeGenericProjection_result.class, metaDataMap); - } - - public closeGenericProjection_result() { - } - - public closeGenericProjection_result( - boolean success, - CuratorException ex1) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public closeGenericProjection_result(closeGenericProjection_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public closeGenericProjection_result deepCopy() { - return new closeGenericProjection_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.ex1 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public closeGenericProjection_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public CuratorException getEx1() { - return this.ex1; - } - - public closeGenericProjection_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return Boolean.valueOf(isSuccess()); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof closeGenericProjection_result) - return this.equals((closeGenericProjection_result)that); - return false; - } - - public boolean equals(closeGenericProjection_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(closeGenericProjection_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("closeGenericProjection_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class closeGenericProjection_resultStandardSchemeFactory implements SchemeFactory { - public closeGenericProjection_resultStandardScheme getScheme() { - return new closeGenericProjection_resultStandardScheme(); - } - } - - private static class closeGenericProjection_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, closeGenericProjection_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, closeGenericProjection_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class closeGenericProjection_resultTupleSchemeFactory implements SchemeFactory { - public closeGenericProjection_resultTupleScheme getScheme() { - return new closeGenericProjection_resultTupleScheme(); - } - } - - private static class closeGenericProjection_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, closeGenericProjection_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, closeGenericProjection_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class createNode_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createNode_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("spec", org.apache.thrift.protocol.TType.STRUCT, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new createNode_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new createNode_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public CreateSpec spec; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - SPEC((short)2, "spec"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // SPEC - return SPEC; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.SPEC, new org.apache.thrift.meta_data.FieldMetaData("spec", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CreateSpec.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createNode_args.class, metaDataMap); - } - - public createNode_args() { - } - - public createNode_args( - CuratorProjection projection, - CreateSpec spec) - { - this(); - this.projection = projection; - this.spec = spec; - } - - /** - * Performs a deep copy on other. - */ - public createNode_args(createNode_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetSpec()) { - this.spec = new CreateSpec(other.spec); - } - } - - public createNode_args deepCopy() { - return new createNode_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.spec = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public createNode_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public CreateSpec getSpec() { - return this.spec; - } - - public createNode_args setSpec(CreateSpec spec) { - this.spec = spec; - return this; - } - - public void unsetSpec() { - this.spec = null; - } - - /** Returns true if field spec is set (has been assigned a value) and false otherwise */ - public boolean isSetSpec() { - return this.spec != null; - } - - public void setSpecIsSet(boolean value) { - if (!value) { - this.spec = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case SPEC: - if (value == null) { - unsetSpec(); - } else { - setSpec((CreateSpec)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case SPEC: - return getSpec(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case SPEC: - return isSetSpec(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof createNode_args) - return this.equals((createNode_args)that); - return false; - } - - public boolean equals(createNode_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_spec = true && this.isSetSpec(); - boolean that_present_spec = true && that.isSetSpec(); - if (this_present_spec || that_present_spec) { - if (!(this_present_spec && that_present_spec)) - return false; - if (!this.spec.equals(that.spec)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(createNode_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSpec()).compareTo(other.isSetSpec()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSpec()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spec, other.spec); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("createNode_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("spec:"); - if (this.spec == null) { - sb.append("null"); - } else { - sb.append(this.spec); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (spec != null) { - spec.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class createNode_argsStandardSchemeFactory implements SchemeFactory { - public createNode_argsStandardScheme getScheme() { - return new createNode_argsStandardScheme(); - } - } - - private static class createNode_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, createNode_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // SPEC - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.spec = new CreateSpec(); - struct.spec.read(iprot); - struct.setSpecIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, createNode_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.spec != null) { - oprot.writeFieldBegin(SPEC_FIELD_DESC); - struct.spec.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class createNode_argsTupleSchemeFactory implements SchemeFactory { - public createNode_argsTupleScheme getScheme() { - return new createNode_argsTupleScheme(); - } - } - - private static class createNode_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createNode_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetSpec()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetSpec()) { - struct.spec.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createNode_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.spec = new CreateSpec(); - struct.spec.read(iprot); - struct.setSpecIsSet(true); - } - } - } - - } - - public static class createNode_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createNode_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new createNode_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new createNode_resultTupleSchemeFactory()); - } - - public OptionalPath success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalPath.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createNode_result.class, metaDataMap); - } - - public createNode_result() { - } - - public createNode_result( - OptionalPath success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public createNode_result(createNode_result other) { - if (other.isSetSuccess()) { - this.success = new OptionalPath(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public createNode_result deepCopy() { - return new createNode_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public OptionalPath getSuccess() { - return this.success; - } - - public createNode_result setSuccess(OptionalPath success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public createNode_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((OptionalPath)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof createNode_result) - return this.equals((createNode_result)that); - return false; - } - - public boolean equals(createNode_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(createNode_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("createNode_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class createNode_resultStandardSchemeFactory implements SchemeFactory { - public createNode_resultStandardScheme getScheme() { - return new createNode_resultStandardScheme(); - } - } - - private static class createNode_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, createNode_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new OptionalPath(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, createNode_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class createNode_resultTupleSchemeFactory implements SchemeFactory { - public createNode_resultTupleScheme getScheme() { - return new createNode_resultTupleScheme(); - } - } - - private static class createNode_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, createNode_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, createNode_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new OptionalPath(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class deleteNode_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteNode_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("spec", org.apache.thrift.protocol.TType.STRUCT, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new deleteNode_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new deleteNode_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public DeleteSpec spec; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - SPEC((short)2, "spec"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // SPEC - return SPEC; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.SPEC, new org.apache.thrift.meta_data.FieldMetaData("spec", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DeleteSpec.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteNode_args.class, metaDataMap); - } - - public deleteNode_args() { - } - - public deleteNode_args( - CuratorProjection projection, - DeleteSpec spec) - { - this(); - this.projection = projection; - this.spec = spec; - } - - /** - * Performs a deep copy on other. - */ - public deleteNode_args(deleteNode_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetSpec()) { - this.spec = new DeleteSpec(other.spec); - } - } - - public deleteNode_args deepCopy() { - return new deleteNode_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.spec = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public deleteNode_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public DeleteSpec getSpec() { - return this.spec; - } - - public deleteNode_args setSpec(DeleteSpec spec) { - this.spec = spec; - return this; - } - - public void unsetSpec() { - this.spec = null; - } - - /** Returns true if field spec is set (has been assigned a value) and false otherwise */ - public boolean isSetSpec() { - return this.spec != null; - } - - public void setSpecIsSet(boolean value) { - if (!value) { - this.spec = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case SPEC: - if (value == null) { - unsetSpec(); - } else { - setSpec((DeleteSpec)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case SPEC: - return getSpec(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case SPEC: - return isSetSpec(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof deleteNode_args) - return this.equals((deleteNode_args)that); - return false; - } - - public boolean equals(deleteNode_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_spec = true && this.isSetSpec(); - boolean that_present_spec = true && that.isSetSpec(); - if (this_present_spec || that_present_spec) { - if (!(this_present_spec && that_present_spec)) - return false; - if (!this.spec.equals(that.spec)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(deleteNode_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSpec()).compareTo(other.isSetSpec()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSpec()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spec, other.spec); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("deleteNode_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("spec:"); - if (this.spec == null) { - sb.append("null"); - } else { - sb.append(this.spec); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (spec != null) { - spec.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class deleteNode_argsStandardSchemeFactory implements SchemeFactory { - public deleteNode_argsStandardScheme getScheme() { - return new deleteNode_argsStandardScheme(); - } - } - - private static class deleteNode_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteNode_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // SPEC - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.spec = new DeleteSpec(); - struct.spec.read(iprot); - struct.setSpecIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteNode_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.spec != null) { - oprot.writeFieldBegin(SPEC_FIELD_DESC); - struct.spec.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class deleteNode_argsTupleSchemeFactory implements SchemeFactory { - public deleteNode_argsTupleScheme getScheme() { - return new deleteNode_argsTupleScheme(); - } - } - - private static class deleteNode_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteNode_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetSpec()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetSpec()) { - struct.spec.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteNode_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.spec = new DeleteSpec(); - struct.spec.read(iprot); - struct.setSpecIsSet(true); - } - } - } - - } - - public static class deleteNode_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteNode_result"); - - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new deleteNode_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new deleteNode_resultTupleSchemeFactory()); - } - - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteNode_result.class, metaDataMap); - } - - public deleteNode_result() { - } - - public deleteNode_result( - CuratorException ex1) - { - this(); - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public deleteNode_result(deleteNode_result other) { - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public deleteNode_result deepCopy() { - return new deleteNode_result(this); - } - - @Override - public void clear() { - this.ex1 = null; - } - - public CuratorException getEx1() { - return this.ex1; - } - - public deleteNode_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof deleteNode_result) - return this.equals((deleteNode_result)that); - return false; - } - - public boolean equals(deleteNode_result that) { - if (that == null) - return false; - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(deleteNode_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("deleteNode_result("); - boolean first = true; - - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class deleteNode_resultStandardSchemeFactory implements SchemeFactory { - public deleteNode_resultStandardScheme getScheme() { - return new deleteNode_resultStandardScheme(); - } - } - - private static class deleteNode_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, deleteNode_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, deleteNode_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class deleteNode_resultTupleSchemeFactory implements SchemeFactory { - public deleteNode_resultTupleScheme getScheme() { - return new deleteNode_resultTupleScheme(); - } - } - - private static class deleteNode_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, deleteNode_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetEx1()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, deleteNode_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class exists_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exists_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("spec", org.apache.thrift.protocol.TType.STRUCT, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new exists_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new exists_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public ExistsSpec spec; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - SPEC((short)2, "spec"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // SPEC - return SPEC; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.SPEC, new org.apache.thrift.meta_data.FieldMetaData("spec", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ExistsSpec.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exists_args.class, metaDataMap); - } - - public exists_args() { - } - - public exists_args( - CuratorProjection projection, - ExistsSpec spec) - { - this(); - this.projection = projection; - this.spec = spec; - } - - /** - * Performs a deep copy on other. - */ - public exists_args(exists_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetSpec()) { - this.spec = new ExistsSpec(other.spec); - } - } - - public exists_args deepCopy() { - return new exists_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.spec = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public exists_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public ExistsSpec getSpec() { - return this.spec; - } - - public exists_args setSpec(ExistsSpec spec) { - this.spec = spec; - return this; - } - - public void unsetSpec() { - this.spec = null; - } - - /** Returns true if field spec is set (has been assigned a value) and false otherwise */ - public boolean isSetSpec() { - return this.spec != null; - } - - public void setSpecIsSet(boolean value) { - if (!value) { - this.spec = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case SPEC: - if (value == null) { - unsetSpec(); - } else { - setSpec((ExistsSpec)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case SPEC: - return getSpec(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case SPEC: - return isSetSpec(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof exists_args) - return this.equals((exists_args)that); - return false; - } - - public boolean equals(exists_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_spec = true && this.isSetSpec(); - boolean that_present_spec = true && that.isSetSpec(); - if (this_present_spec || that_present_spec) { - if (!(this_present_spec && that_present_spec)) - return false; - if (!this.spec.equals(that.spec)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(exists_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSpec()).compareTo(other.isSetSpec()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSpec()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spec, other.spec); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("exists_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("spec:"); - if (this.spec == null) { - sb.append("null"); - } else { - sb.append(this.spec); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (spec != null) { - spec.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class exists_argsStandardSchemeFactory implements SchemeFactory { - public exists_argsStandardScheme getScheme() { - return new exists_argsStandardScheme(); - } - } - - private static class exists_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, exists_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // SPEC - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.spec = new ExistsSpec(); - struct.spec.read(iprot); - struct.setSpecIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, exists_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.spec != null) { - oprot.writeFieldBegin(SPEC_FIELD_DESC); - struct.spec.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class exists_argsTupleSchemeFactory implements SchemeFactory { - public exists_argsTupleScheme getScheme() { - return new exists_argsTupleScheme(); - } - } - - private static class exists_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, exists_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetSpec()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetSpec()) { - struct.spec.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, exists_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.spec = new ExistsSpec(); - struct.spec.read(iprot); - struct.setSpecIsSet(true); - } - } - } - - } - - public static class exists_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("exists_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new exists_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new exists_resultTupleSchemeFactory()); - } - - public OptionalStat success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalStat.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exists_result.class, metaDataMap); - } - - public exists_result() { - } - - public exists_result( - OptionalStat success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public exists_result(exists_result other) { - if (other.isSetSuccess()) { - this.success = new OptionalStat(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public exists_result deepCopy() { - return new exists_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public OptionalStat getSuccess() { - return this.success; - } - - public exists_result setSuccess(OptionalStat success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public exists_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((OptionalStat)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof exists_result) - return this.equals((exists_result)that); - return false; - } - - public boolean equals(exists_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(exists_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("exists_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class exists_resultStandardSchemeFactory implements SchemeFactory { - public exists_resultStandardScheme getScheme() { - return new exists_resultStandardScheme(); - } - } - - private static class exists_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, exists_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new OptionalStat(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, exists_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class exists_resultTupleSchemeFactory implements SchemeFactory { - public exists_resultTupleScheme getScheme() { - return new exists_resultTupleScheme(); - } - } - - private static class exists_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, exists_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, exists_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new OptionalStat(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class getChildren_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getChildren_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("spec", org.apache.thrift.protocol.TType.STRUCT, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getChildren_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getChildren_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public GetChildrenSpec spec; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - SPEC((short)2, "spec"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // SPEC - return SPEC; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.SPEC, new org.apache.thrift.meta_data.FieldMetaData("spec", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetChildrenSpec.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getChildren_args.class, metaDataMap); - } - - public getChildren_args() { - } - - public getChildren_args( - CuratorProjection projection, - GetChildrenSpec spec) - { - this(); - this.projection = projection; - this.spec = spec; - } - - /** - * Performs a deep copy on other. - */ - public getChildren_args(getChildren_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetSpec()) { - this.spec = new GetChildrenSpec(other.spec); - } - } - - public getChildren_args deepCopy() { - return new getChildren_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.spec = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public getChildren_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public GetChildrenSpec getSpec() { - return this.spec; - } - - public getChildren_args setSpec(GetChildrenSpec spec) { - this.spec = spec; - return this; - } - - public void unsetSpec() { - this.spec = null; - } - - /** Returns true if field spec is set (has been assigned a value) and false otherwise */ - public boolean isSetSpec() { - return this.spec != null; - } - - public void setSpecIsSet(boolean value) { - if (!value) { - this.spec = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case SPEC: - if (value == null) { - unsetSpec(); - } else { - setSpec((GetChildrenSpec)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case SPEC: - return getSpec(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case SPEC: - return isSetSpec(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getChildren_args) - return this.equals((getChildren_args)that); - return false; - } - - public boolean equals(getChildren_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_spec = true && this.isSetSpec(); - boolean that_present_spec = true && that.isSetSpec(); - if (this_present_spec || that_present_spec) { - if (!(this_present_spec && that_present_spec)) - return false; - if (!this.spec.equals(that.spec)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getChildren_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSpec()).compareTo(other.isSetSpec()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSpec()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spec, other.spec); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getChildren_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("spec:"); - if (this.spec == null) { - sb.append("null"); - } else { - sb.append(this.spec); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (spec != null) { - spec.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getChildren_argsStandardSchemeFactory implements SchemeFactory { - public getChildren_argsStandardScheme getScheme() { - return new getChildren_argsStandardScheme(); - } - } - - private static class getChildren_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getChildren_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // SPEC - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.spec = new GetChildrenSpec(); - struct.spec.read(iprot); - struct.setSpecIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getChildren_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.spec != null) { - oprot.writeFieldBegin(SPEC_FIELD_DESC); - struct.spec.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getChildren_argsTupleSchemeFactory implements SchemeFactory { - public getChildren_argsTupleScheme getScheme() { - return new getChildren_argsTupleScheme(); - } - } - - private static class getChildren_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getChildren_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetSpec()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetSpec()) { - struct.spec.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getChildren_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.spec = new GetChildrenSpec(); - struct.spec.read(iprot); - struct.setSpecIsSet(true); - } - } - } - - } - - public static class getChildren_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getChildren_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getChildren_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getChildren_resultTupleSchemeFactory()); - } - - public OptionalChildrenList success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalChildrenList.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getChildren_result.class, metaDataMap); - } - - public getChildren_result() { - } - - public getChildren_result( - OptionalChildrenList success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public getChildren_result(getChildren_result other) { - if (other.isSetSuccess()) { - this.success = new OptionalChildrenList(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public getChildren_result deepCopy() { - return new getChildren_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public OptionalChildrenList getSuccess() { - return this.success; - } - - public getChildren_result setSuccess(OptionalChildrenList success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public getChildren_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((OptionalChildrenList)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getChildren_result) - return this.equals((getChildren_result)that); - return false; - } - - public boolean equals(getChildren_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getChildren_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getChildren_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getChildren_resultStandardSchemeFactory implements SchemeFactory { - public getChildren_resultStandardScheme getScheme() { - return new getChildren_resultStandardScheme(); - } - } - - private static class getChildren_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getChildren_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new OptionalChildrenList(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getChildren_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getChildren_resultTupleSchemeFactory implements SchemeFactory { - public getChildren_resultTupleScheme getScheme() { - return new getChildren_resultTupleScheme(); - } - } - - private static class getChildren_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getChildren_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getChildren_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new OptionalChildrenList(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class getData_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getData_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("spec", org.apache.thrift.protocol.TType.STRUCT, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getData_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getData_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public GetDataSpec spec; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - SPEC((short)2, "spec"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // SPEC - return SPEC; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.SPEC, new org.apache.thrift.meta_data.FieldMetaData("spec", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetDataSpec.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getData_args.class, metaDataMap); - } - - public getData_args() { - } - - public getData_args( - CuratorProjection projection, - GetDataSpec spec) - { - this(); - this.projection = projection; - this.spec = spec; - } - - /** - * Performs a deep copy on other. - */ - public getData_args(getData_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetSpec()) { - this.spec = new GetDataSpec(other.spec); - } - } - - public getData_args deepCopy() { - return new getData_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.spec = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public getData_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public GetDataSpec getSpec() { - return this.spec; - } - - public getData_args setSpec(GetDataSpec spec) { - this.spec = spec; - return this; - } - - public void unsetSpec() { - this.spec = null; - } - - /** Returns true if field spec is set (has been assigned a value) and false otherwise */ - public boolean isSetSpec() { - return this.spec != null; - } - - public void setSpecIsSet(boolean value) { - if (!value) { - this.spec = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case SPEC: - if (value == null) { - unsetSpec(); - } else { - setSpec((GetDataSpec)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case SPEC: - return getSpec(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case SPEC: - return isSetSpec(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getData_args) - return this.equals((getData_args)that); - return false; - } - - public boolean equals(getData_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_spec = true && this.isSetSpec(); - boolean that_present_spec = true && that.isSetSpec(); - if (this_present_spec || that_present_spec) { - if (!(this_present_spec && that_present_spec)) - return false; - if (!this.spec.equals(that.spec)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getData_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSpec()).compareTo(other.isSetSpec()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSpec()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spec, other.spec); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getData_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("spec:"); - if (this.spec == null) { - sb.append("null"); - } else { - sb.append(this.spec); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (spec != null) { - spec.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getData_argsStandardSchemeFactory implements SchemeFactory { - public getData_argsStandardScheme getScheme() { - return new getData_argsStandardScheme(); - } - } - - private static class getData_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getData_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // SPEC - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.spec = new GetDataSpec(); - struct.spec.read(iprot); - struct.setSpecIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getData_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.spec != null) { - oprot.writeFieldBegin(SPEC_FIELD_DESC); - struct.spec.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getData_argsTupleSchemeFactory implements SchemeFactory { - public getData_argsTupleScheme getScheme() { - return new getData_argsTupleScheme(); - } - } - - private static class getData_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getData_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetSpec()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetSpec()) { - struct.spec.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getData_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.spec = new GetDataSpec(); - struct.spec.read(iprot); - struct.setSpecIsSet(true); - } - } - } - - } - - public static class getData_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getData_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getData_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getData_resultTupleSchemeFactory()); - } - - public OptionalData success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalData.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getData_result.class, metaDataMap); - } - - public getData_result() { - } - - public getData_result( - OptionalData success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public getData_result(getData_result other) { - if (other.isSetSuccess()) { - this.success = new OptionalData(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public getData_result deepCopy() { - return new getData_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public OptionalData getSuccess() { - return this.success; - } - - public getData_result setSuccess(OptionalData success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public getData_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((OptionalData)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getData_result) - return this.equals((getData_result)that); - return false; - } - - public boolean equals(getData_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getData_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getData_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getData_resultStandardSchemeFactory implements SchemeFactory { - public getData_resultStandardScheme getScheme() { - return new getData_resultStandardScheme(); - } - } - - private static class getData_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getData_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new OptionalData(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getData_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getData_resultTupleSchemeFactory implements SchemeFactory { - public getData_resultTupleScheme getScheme() { - return new getData_resultTupleScheme(); - } - } - - private static class getData_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getData_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getData_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new OptionalData(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class getLeaderParticipants_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLeaderParticipants_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField LEADER_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("leaderProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getLeaderParticipants_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLeaderParticipants_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public LeaderProjection leaderProjection; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - LEADER_PROJECTION((short)2, "leaderProjection"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // LEADER_PROJECTION - return LEADER_PROJECTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.LEADER_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("leaderProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LeaderProjection.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLeaderParticipants_args.class, metaDataMap); - } - - public getLeaderParticipants_args() { - } - - public getLeaderParticipants_args( - CuratorProjection projection, - LeaderProjection leaderProjection) - { - this(); - this.projection = projection; - this.leaderProjection = leaderProjection; - } - - /** - * Performs a deep copy on other. - */ - public getLeaderParticipants_args(getLeaderParticipants_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetLeaderProjection()) { - this.leaderProjection = new LeaderProjection(other.leaderProjection); - } - } - - public getLeaderParticipants_args deepCopy() { - return new getLeaderParticipants_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.leaderProjection = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public getLeaderParticipants_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public LeaderProjection getLeaderProjection() { - return this.leaderProjection; - } - - public getLeaderParticipants_args setLeaderProjection(LeaderProjection leaderProjection) { - this.leaderProjection = leaderProjection; - return this; - } - - public void unsetLeaderProjection() { - this.leaderProjection = null; - } - - /** Returns true if field leaderProjection is set (has been assigned a value) and false otherwise */ - public boolean isSetLeaderProjection() { - return this.leaderProjection != null; - } - - public void setLeaderProjectionIsSet(boolean value) { - if (!value) { - this.leaderProjection = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case LEADER_PROJECTION: - if (value == null) { - unsetLeaderProjection(); - } else { - setLeaderProjection((LeaderProjection)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case LEADER_PROJECTION: - return getLeaderProjection(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case LEADER_PROJECTION: - return isSetLeaderProjection(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getLeaderParticipants_args) - return this.equals((getLeaderParticipants_args)that); - return false; - } - - public boolean equals(getLeaderParticipants_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_leaderProjection = true && this.isSetLeaderProjection(); - boolean that_present_leaderProjection = true && that.isSetLeaderProjection(); - if (this_present_leaderProjection || that_present_leaderProjection) { - if (!(this_present_leaderProjection && that_present_leaderProjection)) - return false; - if (!this.leaderProjection.equals(that.leaderProjection)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getLeaderParticipants_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLeaderProjection()).compareTo(other.isSetLeaderProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLeaderProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.leaderProjection, other.leaderProjection); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getLeaderParticipants_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("leaderProjection:"); - if (this.leaderProjection == null) { - sb.append("null"); - } else { - sb.append(this.leaderProjection); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (leaderProjection != null) { - leaderProjection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getLeaderParticipants_argsStandardSchemeFactory implements SchemeFactory { - public getLeaderParticipants_argsStandardScheme getScheme() { - return new getLeaderParticipants_argsStandardScheme(); - } - } - - private static class getLeaderParticipants_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getLeaderParticipants_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // LEADER_PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.leaderProjection = new LeaderProjection(); - struct.leaderProjection.read(iprot); - struct.setLeaderProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getLeaderParticipants_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.leaderProjection != null) { - oprot.writeFieldBegin(LEADER_PROJECTION_FIELD_DESC); - struct.leaderProjection.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getLeaderParticipants_argsTupleSchemeFactory implements SchemeFactory { - public getLeaderParticipants_argsTupleScheme getScheme() { - return new getLeaderParticipants_argsTupleScheme(); - } - } - - private static class getLeaderParticipants_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLeaderParticipants_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetLeaderProjection()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetLeaderProjection()) { - struct.leaderProjection.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLeaderParticipants_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.leaderProjection = new LeaderProjection(); - struct.leaderProjection.read(iprot); - struct.setLeaderProjectionIsSet(true); - } - } - } - - } - - public static class getLeaderParticipants_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLeaderParticipants_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getLeaderParticipants_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getLeaderParticipants_resultTupleSchemeFactory()); - } - - public List success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Participant.class)))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLeaderParticipants_result.class, metaDataMap); - } - - public getLeaderParticipants_result() { - } - - public getLeaderParticipants_result( - List success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public getLeaderParticipants_result(getLeaderParticipants_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (Participant other_element : other.success) { - __this__success.add(new Participant(other_element)); - } - this.success = __this__success; - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public getLeaderParticipants_result deepCopy() { - return new getLeaderParticipants_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(Participant elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public getLeaderParticipants_result setSuccess(List success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public getLeaderParticipants_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getLeaderParticipants_result) - return this.equals((getLeaderParticipants_result)that); - return false; - } - - public boolean equals(getLeaderParticipants_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getLeaderParticipants_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getLeaderParticipants_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getLeaderParticipants_resultStandardSchemeFactory implements SchemeFactory { - public getLeaderParticipants_resultStandardScheme getScheme() { - return new getLeaderParticipants_resultStandardScheme(); - } - } - - private static class getLeaderParticipants_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getLeaderParticipants_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list32 = iprot.readListBegin(); - struct.success = new ArrayList(_list32.size); - for (int _i33 = 0; _i33 < _list32.size; ++_i33) - { - Participant _elem34; - _elem34 = new Participant(); - _elem34.read(iprot); - struct.success.add(_elem34); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getLeaderParticipants_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (Participant _iter35 : struct.success) - { - _iter35.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getLeaderParticipants_resultTupleSchemeFactory implements SchemeFactory { - public getLeaderParticipants_resultTupleScheme getScheme() { - return new getLeaderParticipants_resultTupleScheme(); - } - } - - private static class getLeaderParticipants_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getLeaderParticipants_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (Participant _iter36 : struct.success) - { - _iter36.write(oprot); - } - } - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getLeaderParticipants_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list37.size); - for (int _i38 = 0; _i38 < _list37.size; ++_i38) - { - Participant _elem39; - _elem39 = new Participant(); - _elem39.read(iprot); - struct.success.add(_elem39); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class getNodeCacheData_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNodeCacheData_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField CACHE_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("cacheProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getNodeCacheData_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getNodeCacheData_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public NodeCacheProjection cacheProjection; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - CACHE_PROJECTION((short)2, "cacheProjection"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // CACHE_PROJECTION - return CACHE_PROJECTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.CACHE_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("cacheProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NodeCacheProjection.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNodeCacheData_args.class, metaDataMap); - } - - public getNodeCacheData_args() { - } - - public getNodeCacheData_args( - CuratorProjection projection, - NodeCacheProjection cacheProjection) - { - this(); - this.projection = projection; - this.cacheProjection = cacheProjection; - } - - /** - * Performs a deep copy on other. - */ - public getNodeCacheData_args(getNodeCacheData_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetCacheProjection()) { - this.cacheProjection = new NodeCacheProjection(other.cacheProjection); - } - } - - public getNodeCacheData_args deepCopy() { - return new getNodeCacheData_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.cacheProjection = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public getNodeCacheData_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public NodeCacheProjection getCacheProjection() { - return this.cacheProjection; - } - - public getNodeCacheData_args setCacheProjection(NodeCacheProjection cacheProjection) { - this.cacheProjection = cacheProjection; - return this; - } - - public void unsetCacheProjection() { - this.cacheProjection = null; - } - - /** Returns true if field cacheProjection is set (has been assigned a value) and false otherwise */ - public boolean isSetCacheProjection() { - return this.cacheProjection != null; - } - - public void setCacheProjectionIsSet(boolean value) { - if (!value) { - this.cacheProjection = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case CACHE_PROJECTION: - if (value == null) { - unsetCacheProjection(); - } else { - setCacheProjection((NodeCacheProjection)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case CACHE_PROJECTION: - return getCacheProjection(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case CACHE_PROJECTION: - return isSetCacheProjection(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getNodeCacheData_args) - return this.equals((getNodeCacheData_args)that); - return false; - } - - public boolean equals(getNodeCacheData_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_cacheProjection = true && this.isSetCacheProjection(); - boolean that_present_cacheProjection = true && that.isSetCacheProjection(); - if (this_present_cacheProjection || that_present_cacheProjection) { - if (!(this_present_cacheProjection && that_present_cacheProjection)) - return false; - if (!this.cacheProjection.equals(that.cacheProjection)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getNodeCacheData_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCacheProjection()).compareTo(other.isSetCacheProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCacheProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cacheProjection, other.cacheProjection); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getNodeCacheData_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("cacheProjection:"); - if (this.cacheProjection == null) { - sb.append("null"); - } else { - sb.append(this.cacheProjection); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (cacheProjection != null) { - cacheProjection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getNodeCacheData_argsStandardSchemeFactory implements SchemeFactory { - public getNodeCacheData_argsStandardScheme getScheme() { - return new getNodeCacheData_argsStandardScheme(); - } - } - - private static class getNodeCacheData_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getNodeCacheData_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // CACHE_PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.cacheProjection = new NodeCacheProjection(); - struct.cacheProjection.read(iprot); - struct.setCacheProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getNodeCacheData_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.cacheProjection != null) { - oprot.writeFieldBegin(CACHE_PROJECTION_FIELD_DESC); - struct.cacheProjection.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getNodeCacheData_argsTupleSchemeFactory implements SchemeFactory { - public getNodeCacheData_argsTupleScheme getScheme() { - return new getNodeCacheData_argsTupleScheme(); - } - } - - private static class getNodeCacheData_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getNodeCacheData_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetCacheProjection()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetCacheProjection()) { - struct.cacheProjection.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getNodeCacheData_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.cacheProjection = new NodeCacheProjection(); - struct.cacheProjection.read(iprot); - struct.setCacheProjectionIsSet(true); - } - } - } - - } - - public static class getNodeCacheData_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNodeCacheData_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getNodeCacheData_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getNodeCacheData_resultTupleSchemeFactory()); - } - - public ChildData success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ChildData.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNodeCacheData_result.class, metaDataMap); - } - - public getNodeCacheData_result() { - } - - public getNodeCacheData_result( - ChildData success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public getNodeCacheData_result(getNodeCacheData_result other) { - if (other.isSetSuccess()) { - this.success = new ChildData(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public getNodeCacheData_result deepCopy() { - return new getNodeCacheData_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public ChildData getSuccess() { - return this.success; - } - - public getNodeCacheData_result setSuccess(ChildData success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public getNodeCacheData_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((ChildData)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getNodeCacheData_result) - return this.equals((getNodeCacheData_result)that); - return false; - } - - public boolean equals(getNodeCacheData_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getNodeCacheData_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getNodeCacheData_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getNodeCacheData_resultStandardSchemeFactory implements SchemeFactory { - public getNodeCacheData_resultStandardScheme getScheme() { - return new getNodeCacheData_resultStandardScheme(); - } - } - - private static class getNodeCacheData_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getNodeCacheData_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new ChildData(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getNodeCacheData_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getNodeCacheData_resultTupleSchemeFactory implements SchemeFactory { - public getNodeCacheData_resultTupleScheme getScheme() { - return new getNodeCacheData_resultTupleScheme(); - } - } - - private static class getNodeCacheData_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getNodeCacheData_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getNodeCacheData_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new ChildData(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class getPathChildrenCacheData_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPathChildrenCacheData_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField CACHE_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("cacheProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getPathChildrenCacheData_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getPathChildrenCacheData_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public PathChildrenCacheProjection cacheProjection; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - CACHE_PROJECTION((short)2, "cacheProjection"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // CACHE_PROJECTION - return CACHE_PROJECTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.CACHE_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("cacheProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PathChildrenCacheProjection.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPathChildrenCacheData_args.class, metaDataMap); - } - - public getPathChildrenCacheData_args() { - } - - public getPathChildrenCacheData_args( - CuratorProjection projection, - PathChildrenCacheProjection cacheProjection) - { - this(); - this.projection = projection; - this.cacheProjection = cacheProjection; - } - - /** - * Performs a deep copy on other. - */ - public getPathChildrenCacheData_args(getPathChildrenCacheData_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetCacheProjection()) { - this.cacheProjection = new PathChildrenCacheProjection(other.cacheProjection); - } - } - - public getPathChildrenCacheData_args deepCopy() { - return new getPathChildrenCacheData_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.cacheProjection = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public getPathChildrenCacheData_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public PathChildrenCacheProjection getCacheProjection() { - return this.cacheProjection; - } - - public getPathChildrenCacheData_args setCacheProjection(PathChildrenCacheProjection cacheProjection) { - this.cacheProjection = cacheProjection; - return this; - } - - public void unsetCacheProjection() { - this.cacheProjection = null; - } - - /** Returns true if field cacheProjection is set (has been assigned a value) and false otherwise */ - public boolean isSetCacheProjection() { - return this.cacheProjection != null; - } - - public void setCacheProjectionIsSet(boolean value) { - if (!value) { - this.cacheProjection = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case CACHE_PROJECTION: - if (value == null) { - unsetCacheProjection(); - } else { - setCacheProjection((PathChildrenCacheProjection)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case CACHE_PROJECTION: - return getCacheProjection(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case CACHE_PROJECTION: - return isSetCacheProjection(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getPathChildrenCacheData_args) - return this.equals((getPathChildrenCacheData_args)that); - return false; - } - - public boolean equals(getPathChildrenCacheData_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_cacheProjection = true && this.isSetCacheProjection(); - boolean that_present_cacheProjection = true && that.isSetCacheProjection(); - if (this_present_cacheProjection || that_present_cacheProjection) { - if (!(this_present_cacheProjection && that_present_cacheProjection)) - return false; - if (!this.cacheProjection.equals(that.cacheProjection)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getPathChildrenCacheData_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCacheProjection()).compareTo(other.isSetCacheProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCacheProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cacheProjection, other.cacheProjection); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getPathChildrenCacheData_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("cacheProjection:"); - if (this.cacheProjection == null) { - sb.append("null"); - } else { - sb.append(this.cacheProjection); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (cacheProjection != null) { - cacheProjection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getPathChildrenCacheData_argsStandardSchemeFactory implements SchemeFactory { - public getPathChildrenCacheData_argsStandardScheme getScheme() { - return new getPathChildrenCacheData_argsStandardScheme(); - } - } - - private static class getPathChildrenCacheData_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getPathChildrenCacheData_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // CACHE_PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.cacheProjection = new PathChildrenCacheProjection(); - struct.cacheProjection.read(iprot); - struct.setCacheProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getPathChildrenCacheData_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.cacheProjection != null) { - oprot.writeFieldBegin(CACHE_PROJECTION_FIELD_DESC); - struct.cacheProjection.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getPathChildrenCacheData_argsTupleSchemeFactory implements SchemeFactory { - public getPathChildrenCacheData_argsTupleScheme getScheme() { - return new getPathChildrenCacheData_argsTupleScheme(); - } - } - - private static class getPathChildrenCacheData_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getPathChildrenCacheData_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetCacheProjection()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetCacheProjection()) { - struct.cacheProjection.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getPathChildrenCacheData_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.cacheProjection = new PathChildrenCacheProjection(); - struct.cacheProjection.read(iprot); - struct.setCacheProjectionIsSet(true); - } - } - } - - } - - public static class getPathChildrenCacheData_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPathChildrenCacheData_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getPathChildrenCacheData_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getPathChildrenCacheData_resultTupleSchemeFactory()); - } - - public List success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ChildData.class)))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPathChildrenCacheData_result.class, metaDataMap); - } - - public getPathChildrenCacheData_result() { - } - - public getPathChildrenCacheData_result( - List success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public getPathChildrenCacheData_result(getPathChildrenCacheData_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (ChildData other_element : other.success) { - __this__success.add(new ChildData(other_element)); - } - this.success = __this__success; - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public getPathChildrenCacheData_result deepCopy() { - return new getPathChildrenCacheData_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(ChildData elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public getPathChildrenCacheData_result setSuccess(List success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public getPathChildrenCacheData_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getPathChildrenCacheData_result) - return this.equals((getPathChildrenCacheData_result)that); - return false; - } - - public boolean equals(getPathChildrenCacheData_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getPathChildrenCacheData_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getPathChildrenCacheData_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getPathChildrenCacheData_resultStandardSchemeFactory implements SchemeFactory { - public getPathChildrenCacheData_resultStandardScheme getScheme() { - return new getPathChildrenCacheData_resultStandardScheme(); - } - } - - private static class getPathChildrenCacheData_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getPathChildrenCacheData_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list40 = iprot.readListBegin(); - struct.success = new ArrayList(_list40.size); - for (int _i41 = 0; _i41 < _list40.size; ++_i41) - { - ChildData _elem42; - _elem42 = new ChildData(); - _elem42.read(iprot); - struct.success.add(_elem42); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getPathChildrenCacheData_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (ChildData _iter43 : struct.success) - { - _iter43.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getPathChildrenCacheData_resultTupleSchemeFactory implements SchemeFactory { - public getPathChildrenCacheData_resultTupleScheme getScheme() { - return new getPathChildrenCacheData_resultTupleScheme(); - } - } - - private static class getPathChildrenCacheData_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getPathChildrenCacheData_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (ChildData _iter44 : struct.success) - { - _iter44.write(oprot); - } - } - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getPathChildrenCacheData_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list45 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list45.size); - for (int _i46 = 0; _i46 < _list45.size; ++_i46) - { - ChildData _elem47; - _elem47 = new ChildData(); - _elem47.read(iprot); - struct.success.add(_elem47); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class getPathChildrenCacheDataForPath_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPathChildrenCacheDataForPath_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField CACHE_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("cacheProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getPathChildrenCacheDataForPath_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getPathChildrenCacheDataForPath_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public PathChildrenCacheProjection cacheProjection; // required - public String path; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - CACHE_PROJECTION((short)2, "cacheProjection"), - PATH((short)3, "path"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // CACHE_PROJECTION - return CACHE_PROJECTION; - case 3: // PATH - return PATH; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.CACHE_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("cacheProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PathChildrenCacheProjection.class))); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPathChildrenCacheDataForPath_args.class, metaDataMap); - } - - public getPathChildrenCacheDataForPath_args() { - } - - public getPathChildrenCacheDataForPath_args( - CuratorProjection projection, - PathChildrenCacheProjection cacheProjection, - String path) - { - this(); - this.projection = projection; - this.cacheProjection = cacheProjection; - this.path = path; - } - - /** - * Performs a deep copy on other. - */ - public getPathChildrenCacheDataForPath_args(getPathChildrenCacheDataForPath_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetCacheProjection()) { - this.cacheProjection = new PathChildrenCacheProjection(other.cacheProjection); - } - if (other.isSetPath()) { - this.path = other.path; - } - } - - public getPathChildrenCacheDataForPath_args deepCopy() { - return new getPathChildrenCacheDataForPath_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.cacheProjection = null; - this.path = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public getPathChildrenCacheDataForPath_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public PathChildrenCacheProjection getCacheProjection() { - return this.cacheProjection; - } - - public getPathChildrenCacheDataForPath_args setCacheProjection(PathChildrenCacheProjection cacheProjection) { - this.cacheProjection = cacheProjection; - return this; - } - - public void unsetCacheProjection() { - this.cacheProjection = null; - } - - /** Returns true if field cacheProjection is set (has been assigned a value) and false otherwise */ - public boolean isSetCacheProjection() { - return this.cacheProjection != null; - } - - public void setCacheProjectionIsSet(boolean value) { - if (!value) { - this.cacheProjection = null; - } - } - - public String getPath() { - return this.path; - } - - public getPathChildrenCacheDataForPath_args setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case CACHE_PROJECTION: - if (value == null) { - unsetCacheProjection(); - } else { - setCacheProjection((PathChildrenCacheProjection)value); - } - break; - - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case CACHE_PROJECTION: - return getCacheProjection(); - - case PATH: - return getPath(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case CACHE_PROJECTION: - return isSetCacheProjection(); - case PATH: - return isSetPath(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getPathChildrenCacheDataForPath_args) - return this.equals((getPathChildrenCacheDataForPath_args)that); - return false; - } - - public boolean equals(getPathChildrenCacheDataForPath_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_cacheProjection = true && this.isSetCacheProjection(); - boolean that_present_cacheProjection = true && that.isSetCacheProjection(); - if (this_present_cacheProjection || that_present_cacheProjection) { - if (!(this_present_cacheProjection && that_present_cacheProjection)) - return false; - if (!this.cacheProjection.equals(that.cacheProjection)) - return false; - } - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getPathChildrenCacheDataForPath_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCacheProjection()).compareTo(other.isSetCacheProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCacheProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cacheProjection, other.cacheProjection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getPathChildrenCacheDataForPath_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("cacheProjection:"); - if (this.cacheProjection == null) { - sb.append("null"); - } else { - sb.append(this.cacheProjection); - } - first = false; - if (!first) sb.append(", "); - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (cacheProjection != null) { - cacheProjection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getPathChildrenCacheDataForPath_argsStandardSchemeFactory implements SchemeFactory { - public getPathChildrenCacheDataForPath_argsStandardScheme getScheme() { - return new getPathChildrenCacheDataForPath_argsStandardScheme(); - } - } - - private static class getPathChildrenCacheDataForPath_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getPathChildrenCacheDataForPath_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // CACHE_PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.cacheProjection = new PathChildrenCacheProjection(); - struct.cacheProjection.read(iprot); - struct.setCacheProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getPathChildrenCacheDataForPath_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.cacheProjection != null) { - oprot.writeFieldBegin(CACHE_PROJECTION_FIELD_DESC); - struct.cacheProjection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getPathChildrenCacheDataForPath_argsTupleSchemeFactory implements SchemeFactory { - public getPathChildrenCacheDataForPath_argsTupleScheme getScheme() { - return new getPathChildrenCacheDataForPath_argsTupleScheme(); - } - } - - private static class getPathChildrenCacheDataForPath_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getPathChildrenCacheDataForPath_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetCacheProjection()) { - optionals.set(1); - } - if (struct.isSetPath()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetCacheProjection()) { - struct.cacheProjection.write(oprot); - } - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getPathChildrenCacheDataForPath_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.cacheProjection = new PathChildrenCacheProjection(); - struct.cacheProjection.read(iprot); - struct.setCacheProjectionIsSet(true); - } - if (incoming.get(2)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - } - } - - } - - public static class getPathChildrenCacheDataForPath_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPathChildrenCacheDataForPath_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getPathChildrenCacheDataForPath_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getPathChildrenCacheDataForPath_resultTupleSchemeFactory()); - } - - public ChildData success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ChildData.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPathChildrenCacheDataForPath_result.class, metaDataMap); - } - - public getPathChildrenCacheDataForPath_result() { - } - - public getPathChildrenCacheDataForPath_result( - ChildData success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public getPathChildrenCacheDataForPath_result(getPathChildrenCacheDataForPath_result other) { - if (other.isSetSuccess()) { - this.success = new ChildData(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public getPathChildrenCacheDataForPath_result deepCopy() { - return new getPathChildrenCacheDataForPath_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public ChildData getSuccess() { - return this.success; - } - - public getPathChildrenCacheDataForPath_result setSuccess(ChildData success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public getPathChildrenCacheDataForPath_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((ChildData)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getPathChildrenCacheDataForPath_result) - return this.equals((getPathChildrenCacheDataForPath_result)that); - return false; - } - - public boolean equals(getPathChildrenCacheDataForPath_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getPathChildrenCacheDataForPath_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getPathChildrenCacheDataForPath_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getPathChildrenCacheDataForPath_resultStandardSchemeFactory implements SchemeFactory { - public getPathChildrenCacheDataForPath_resultStandardScheme getScheme() { - return new getPathChildrenCacheDataForPath_resultStandardScheme(); - } - } - - private static class getPathChildrenCacheDataForPath_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getPathChildrenCacheDataForPath_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new ChildData(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getPathChildrenCacheDataForPath_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getPathChildrenCacheDataForPath_resultTupleSchemeFactory implements SchemeFactory { - public getPathChildrenCacheDataForPath_resultTupleScheme getScheme() { - return new getPathChildrenCacheDataForPath_resultTupleScheme(); - } - } - - private static class getPathChildrenCacheDataForPath_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getPathChildrenCacheDataForPath_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getPathChildrenCacheDataForPath_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new ChildData(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class isLeader_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isLeader_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField LEADER_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("leaderProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new isLeader_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new isLeader_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public LeaderProjection leaderProjection; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - LEADER_PROJECTION((short)2, "leaderProjection"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // LEADER_PROJECTION - return LEADER_PROJECTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.LEADER_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("leaderProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LeaderProjection.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isLeader_args.class, metaDataMap); - } - - public isLeader_args() { - } - - public isLeader_args( - CuratorProjection projection, - LeaderProjection leaderProjection) - { - this(); - this.projection = projection; - this.leaderProjection = leaderProjection; - } - - /** - * Performs a deep copy on other. - */ - public isLeader_args(isLeader_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetLeaderProjection()) { - this.leaderProjection = new LeaderProjection(other.leaderProjection); - } - } - - public isLeader_args deepCopy() { - return new isLeader_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.leaderProjection = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public isLeader_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public LeaderProjection getLeaderProjection() { - return this.leaderProjection; - } - - public isLeader_args setLeaderProjection(LeaderProjection leaderProjection) { - this.leaderProjection = leaderProjection; - return this; - } - - public void unsetLeaderProjection() { - this.leaderProjection = null; - } - - /** Returns true if field leaderProjection is set (has been assigned a value) and false otherwise */ - public boolean isSetLeaderProjection() { - return this.leaderProjection != null; - } - - public void setLeaderProjectionIsSet(boolean value) { - if (!value) { - this.leaderProjection = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case LEADER_PROJECTION: - if (value == null) { - unsetLeaderProjection(); - } else { - setLeaderProjection((LeaderProjection)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case LEADER_PROJECTION: - return getLeaderProjection(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case LEADER_PROJECTION: - return isSetLeaderProjection(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof isLeader_args) - return this.equals((isLeader_args)that); - return false; - } - - public boolean equals(isLeader_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_leaderProjection = true && this.isSetLeaderProjection(); - boolean that_present_leaderProjection = true && that.isSetLeaderProjection(); - if (this_present_leaderProjection || that_present_leaderProjection) { - if (!(this_present_leaderProjection && that_present_leaderProjection)) - return false; - if (!this.leaderProjection.equals(that.leaderProjection)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(isLeader_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetLeaderProjection()).compareTo(other.isSetLeaderProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLeaderProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.leaderProjection, other.leaderProjection); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("isLeader_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("leaderProjection:"); - if (this.leaderProjection == null) { - sb.append("null"); - } else { - sb.append(this.leaderProjection); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (leaderProjection != null) { - leaderProjection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class isLeader_argsStandardSchemeFactory implements SchemeFactory { - public isLeader_argsStandardScheme getScheme() { - return new isLeader_argsStandardScheme(); - } - } - - private static class isLeader_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, isLeader_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // LEADER_PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.leaderProjection = new LeaderProjection(); - struct.leaderProjection.read(iprot); - struct.setLeaderProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, isLeader_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.leaderProjection != null) { - oprot.writeFieldBegin(LEADER_PROJECTION_FIELD_DESC); - struct.leaderProjection.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class isLeader_argsTupleSchemeFactory implements SchemeFactory { - public isLeader_argsTupleScheme getScheme() { - return new isLeader_argsTupleScheme(); - } - } - - private static class isLeader_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, isLeader_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetLeaderProjection()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetLeaderProjection()) { - struct.leaderProjection.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, isLeader_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.leaderProjection = new LeaderProjection(); - struct.leaderProjection.read(iprot); - struct.setLeaderProjectionIsSet(true); - } - } - } - - } - - public static class isLeader_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isLeader_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new isLeader_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new isLeader_resultTupleSchemeFactory()); - } - - public boolean success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __SUCCESS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isLeader_result.class, metaDataMap); - } - - public isLeader_result() { - } - - public isLeader_result( - boolean success, - CuratorException ex1) - { - this(); - this.success = success; - setSuccessIsSet(true); - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public isLeader_result(isLeader_result other) { - __isset_bitfield = other.__isset_bitfield; - this.success = other.success; - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public isLeader_result deepCopy() { - return new isLeader_result(this); - } - - @Override - public void clear() { - setSuccessIsSet(false); - this.success = false; - this.ex1 = null; - } - - public boolean isSuccess() { - return this.success; - } - - public isLeader_result setSuccess(boolean success) { - this.success = success; - setSuccessIsSet(true); - return this; - } - - public void unsetSuccess() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID); - } - - public void setSuccessIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value); - } - - public CuratorException getEx1() { - return this.ex1; - } - - public isLeader_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Boolean)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return Boolean.valueOf(isSuccess()); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof isLeader_result) - return this.equals((isLeader_result)that); - return false; - } - - public boolean equals(isLeader_result that) { - if (that == null) - return false; - - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (this.success != that.success) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(isLeader_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("isLeader_result("); - boolean first = true; - - sb.append("success:"); - sb.append(this.success); - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class isLeader_resultStandardSchemeFactory implements SchemeFactory { - public isLeader_resultStandardScheme getScheme() { - return new isLeader_resultStandardScheme(); - } - } - - private static class isLeader_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, isLeader_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, isLeader_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(struct.success); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class isLeader_resultTupleSchemeFactory implements SchemeFactory { - public isLeader_resultTupleScheme getScheme() { - return new isLeader_resultTupleScheme(); - } - } - - private static class isLeader_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, isLeader_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - oprot.writeBool(struct.success); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, isLeader_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = iprot.readBool(); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class newCuratorProjection_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("newCuratorProjection_args"); - - private static final org.apache.thrift.protocol.TField CONNECTION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("connectionName", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new newCuratorProjection_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new newCuratorProjection_argsTupleSchemeFactory()); - } - - public String connectionName; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - CONNECTION_NAME((short)1, "connectionName"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // CONNECTION_NAME - return CONNECTION_NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.CONNECTION_NAME, new org.apache.thrift.meta_data.FieldMetaData("connectionName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(newCuratorProjection_args.class, metaDataMap); - } - - public newCuratorProjection_args() { - } - - public newCuratorProjection_args( - String connectionName) - { - this(); - this.connectionName = connectionName; - } - - /** - * Performs a deep copy on other. - */ - public newCuratorProjection_args(newCuratorProjection_args other) { - if (other.isSetConnectionName()) { - this.connectionName = other.connectionName; - } - } - - public newCuratorProjection_args deepCopy() { - return new newCuratorProjection_args(this); - } - - @Override - public void clear() { - this.connectionName = null; - } - - public String getConnectionName() { - return this.connectionName; - } - - public newCuratorProjection_args setConnectionName(String connectionName) { - this.connectionName = connectionName; - return this; - } - - public void unsetConnectionName() { - this.connectionName = null; - } - - /** Returns true if field connectionName is set (has been assigned a value) and false otherwise */ - public boolean isSetConnectionName() { - return this.connectionName != null; - } - - public void setConnectionNameIsSet(boolean value) { - if (!value) { - this.connectionName = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case CONNECTION_NAME: - if (value == null) { - unsetConnectionName(); - } else { - setConnectionName((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case CONNECTION_NAME: - return getConnectionName(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case CONNECTION_NAME: - return isSetConnectionName(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof newCuratorProjection_args) - return this.equals((newCuratorProjection_args)that); - return false; - } - - public boolean equals(newCuratorProjection_args that) { - if (that == null) - return false; - - boolean this_present_connectionName = true && this.isSetConnectionName(); - boolean that_present_connectionName = true && that.isSetConnectionName(); - if (this_present_connectionName || that_present_connectionName) { - if (!(this_present_connectionName && that_present_connectionName)) - return false; - if (!this.connectionName.equals(that.connectionName)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(newCuratorProjection_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetConnectionName()).compareTo(other.isSetConnectionName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetConnectionName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.connectionName, other.connectionName); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("newCuratorProjection_args("); - boolean first = true; - - sb.append("connectionName:"); - if (this.connectionName == null) { - sb.append("null"); - } else { - sb.append(this.connectionName); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class newCuratorProjection_argsStandardSchemeFactory implements SchemeFactory { - public newCuratorProjection_argsStandardScheme getScheme() { - return new newCuratorProjection_argsStandardScheme(); - } - } - - private static class newCuratorProjection_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, newCuratorProjection_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // CONNECTION_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.connectionName = iprot.readString(); - struct.setConnectionNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, newCuratorProjection_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.connectionName != null) { - oprot.writeFieldBegin(CONNECTION_NAME_FIELD_DESC); - oprot.writeString(struct.connectionName); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class newCuratorProjection_argsTupleSchemeFactory implements SchemeFactory { - public newCuratorProjection_argsTupleScheme getScheme() { - return new newCuratorProjection_argsTupleScheme(); - } - } - - private static class newCuratorProjection_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, newCuratorProjection_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetConnectionName()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetConnectionName()) { - oprot.writeString(struct.connectionName); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, newCuratorProjection_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.connectionName = iprot.readString(); - struct.setConnectionNameIsSet(true); - } - } - } - - } - - public static class newCuratorProjection_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("newCuratorProjection_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new newCuratorProjection_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new newCuratorProjection_resultTupleSchemeFactory()); - } - - public CuratorProjection success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(newCuratorProjection_result.class, metaDataMap); - } - - public newCuratorProjection_result() { - } - - public newCuratorProjection_result( - CuratorProjection success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public newCuratorProjection_result(newCuratorProjection_result other) { - if (other.isSetSuccess()) { - this.success = new CuratorProjection(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public newCuratorProjection_result deepCopy() { - return new newCuratorProjection_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public CuratorProjection getSuccess() { - return this.success; - } - - public newCuratorProjection_result setSuccess(CuratorProjection success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public newCuratorProjection_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((CuratorProjection)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof newCuratorProjection_result) - return this.equals((newCuratorProjection_result)that); - return false; - } - - public boolean equals(newCuratorProjection_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(newCuratorProjection_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("newCuratorProjection_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class newCuratorProjection_resultStandardSchemeFactory implements SchemeFactory { - public newCuratorProjection_resultStandardScheme getScheme() { - return new newCuratorProjection_resultStandardScheme(); - } - } - - private static class newCuratorProjection_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, newCuratorProjection_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new CuratorProjection(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, newCuratorProjection_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class newCuratorProjection_resultTupleSchemeFactory implements SchemeFactory { - public newCuratorProjection_resultTupleScheme getScheme() { - return new newCuratorProjection_resultTupleScheme(); - } - } - - private static class newCuratorProjection_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, newCuratorProjection_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, newCuratorProjection_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new CuratorProjection(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class pingCuratorProjection_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("pingCuratorProjection_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new pingCuratorProjection_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new pingCuratorProjection_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pingCuratorProjection_args.class, metaDataMap); - } - - public pingCuratorProjection_args() { - } - - public pingCuratorProjection_args( - CuratorProjection projection) - { - this(); - this.projection = projection; - } - - /** - * Performs a deep copy on other. - */ - public pingCuratorProjection_args(pingCuratorProjection_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - } - - public pingCuratorProjection_args deepCopy() { - return new pingCuratorProjection_args(this); - } - - @Override - public void clear() { - this.projection = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public pingCuratorProjection_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof pingCuratorProjection_args) - return this.equals((pingCuratorProjection_args)that); - return false; - } - - public boolean equals(pingCuratorProjection_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(pingCuratorProjection_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("pingCuratorProjection_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class pingCuratorProjection_argsStandardSchemeFactory implements SchemeFactory { - public pingCuratorProjection_argsStandardScheme getScheme() { - return new pingCuratorProjection_argsStandardScheme(); - } - } - - private static class pingCuratorProjection_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, pingCuratorProjection_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, pingCuratorProjection_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class pingCuratorProjection_argsTupleSchemeFactory implements SchemeFactory { - public pingCuratorProjection_argsTupleScheme getScheme() { - return new pingCuratorProjection_argsTupleScheme(); - } - } - - private static class pingCuratorProjection_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, pingCuratorProjection_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, pingCuratorProjection_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - } - } - - } - - public static class setData_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setData_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("spec", org.apache.thrift.protocol.TType.STRUCT, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new setData_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new setData_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public SetDataSpec spec; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - SPEC((short)2, "spec"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // SPEC - return SPEC; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.SPEC, new org.apache.thrift.meta_data.FieldMetaData("spec", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SetDataSpec.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setData_args.class, metaDataMap); - } - - public setData_args() { - } - - public setData_args( - CuratorProjection projection, - SetDataSpec spec) - { - this(); - this.projection = projection; - this.spec = spec; - } - - /** - * Performs a deep copy on other. - */ - public setData_args(setData_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetSpec()) { - this.spec = new SetDataSpec(other.spec); - } - } - - public setData_args deepCopy() { - return new setData_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.spec = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public setData_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public SetDataSpec getSpec() { - return this.spec; - } - - public setData_args setSpec(SetDataSpec spec) { - this.spec = spec; - return this; - } - - public void unsetSpec() { - this.spec = null; - } - - /** Returns true if field spec is set (has been assigned a value) and false otherwise */ - public boolean isSetSpec() { - return this.spec != null; - } - - public void setSpecIsSet(boolean value) { - if (!value) { - this.spec = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case SPEC: - if (value == null) { - unsetSpec(); - } else { - setSpec((SetDataSpec)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case SPEC: - return getSpec(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case SPEC: - return isSetSpec(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof setData_args) - return this.equals((setData_args)that); - return false; - } - - public boolean equals(setData_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_spec = true && this.isSetSpec(); - boolean that_present_spec = true && that.isSetSpec(); - if (this_present_spec || that_present_spec) { - if (!(this_present_spec && that_present_spec)) - return false; - if (!this.spec.equals(that.spec)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(setData_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSpec()).compareTo(other.isSetSpec()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSpec()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spec, other.spec); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("setData_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("spec:"); - if (this.spec == null) { - sb.append("null"); - } else { - sb.append(this.spec); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (spec != null) { - spec.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class setData_argsStandardSchemeFactory implements SchemeFactory { - public setData_argsStandardScheme getScheme() { - return new setData_argsStandardScheme(); - } - } - - private static class setData_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, setData_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // SPEC - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.spec = new SetDataSpec(); - struct.spec.read(iprot); - struct.setSpecIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, setData_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.spec != null) { - oprot.writeFieldBegin(SPEC_FIELD_DESC); - struct.spec.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class setData_argsTupleSchemeFactory implements SchemeFactory { - public setData_argsTupleScheme getScheme() { - return new setData_argsTupleScheme(); - } - } - - private static class setData_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, setData_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetSpec()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetSpec()) { - struct.spec.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, setData_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.spec = new SetDataSpec(); - struct.spec.read(iprot); - struct.setSpecIsSet(true); - } - } - } - - } - - public static class setData_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setData_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new setData_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new setData_resultTupleSchemeFactory()); - } - - public OptionalStat success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OptionalStat.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setData_result.class, metaDataMap); - } - - public setData_result() { - } - - public setData_result( - OptionalStat success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public setData_result(setData_result other) { - if (other.isSetSuccess()) { - this.success = new OptionalStat(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public setData_result deepCopy() { - return new setData_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public OptionalStat getSuccess() { - return this.success; - } - - public setData_result setSuccess(OptionalStat success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public setData_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((OptionalStat)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof setData_result) - return this.equals((setData_result)that); - return false; - } - - public boolean equals(setData_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(setData_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("setData_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class setData_resultStandardSchemeFactory implements SchemeFactory { - public setData_resultStandardScheme getScheme() { - return new setData_resultStandardScheme(); - } - } - - private static class setData_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, setData_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new OptionalStat(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, setData_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class setData_resultTupleSchemeFactory implements SchemeFactory { - public setData_resultTupleScheme getScheme() { - return new setData_resultTupleScheme(); - } - } - - private static class setData_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, setData_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, setData_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new OptionalStat(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class startLeaderSelector_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startLeaderSelector_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField PARTICIPANT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("participantId", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField WAIT_FOR_LEADERSHIP_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("waitForLeadershipMs", org.apache.thrift.protocol.TType.I32, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new startLeaderSelector_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new startLeaderSelector_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public String path; // required - public String participantId; // required - public int waitForLeadershipMs; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - PATH((short)2, "path"), - PARTICIPANT_ID((short)3, "participantId"), - WAIT_FOR_LEADERSHIP_MS((short)4, "waitForLeadershipMs"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // PATH - return PATH; - case 3: // PARTICIPANT_ID - return PARTICIPANT_ID; - case 4: // WAIT_FOR_LEADERSHIP_MS - return WAIT_FOR_LEADERSHIP_MS; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __WAITFORLEADERSHIPMS_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARTICIPANT_ID, new org.apache.thrift.meta_data.FieldMetaData("participantId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.WAIT_FOR_LEADERSHIP_MS, new org.apache.thrift.meta_data.FieldMetaData("waitForLeadershipMs", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startLeaderSelector_args.class, metaDataMap); - } - - public startLeaderSelector_args() { - } - - public startLeaderSelector_args( - CuratorProjection projection, - String path, - String participantId, - int waitForLeadershipMs) - { - this(); - this.projection = projection; - this.path = path; - this.participantId = participantId; - this.waitForLeadershipMs = waitForLeadershipMs; - setWaitForLeadershipMsIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public startLeaderSelector_args(startLeaderSelector_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetPath()) { - this.path = other.path; - } - if (other.isSetParticipantId()) { - this.participantId = other.participantId; - } - this.waitForLeadershipMs = other.waitForLeadershipMs; - } - - public startLeaderSelector_args deepCopy() { - return new startLeaderSelector_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.path = null; - this.participantId = null; - setWaitForLeadershipMsIsSet(false); - this.waitForLeadershipMs = 0; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public startLeaderSelector_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public String getPath() { - return this.path; - } - - public startLeaderSelector_args setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public String getParticipantId() { - return this.participantId; - } - - public startLeaderSelector_args setParticipantId(String participantId) { - this.participantId = participantId; - return this; - } - - public void unsetParticipantId() { - this.participantId = null; - } - - /** Returns true if field participantId is set (has been assigned a value) and false otherwise */ - public boolean isSetParticipantId() { - return this.participantId != null; - } - - public void setParticipantIdIsSet(boolean value) { - if (!value) { - this.participantId = null; - } - } - - public int getWaitForLeadershipMs() { - return this.waitForLeadershipMs; - } - - public startLeaderSelector_args setWaitForLeadershipMs(int waitForLeadershipMs) { - this.waitForLeadershipMs = waitForLeadershipMs; - setWaitForLeadershipMsIsSet(true); - return this; - } - - public void unsetWaitForLeadershipMs() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WAITFORLEADERSHIPMS_ISSET_ID); - } - - /** Returns true if field waitForLeadershipMs is set (has been assigned a value) and false otherwise */ - public boolean isSetWaitForLeadershipMs() { - return EncodingUtils.testBit(__isset_bitfield, __WAITFORLEADERSHIPMS_ISSET_ID); - } - - public void setWaitForLeadershipMsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WAITFORLEADERSHIPMS_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case PARTICIPANT_ID: - if (value == null) { - unsetParticipantId(); - } else { - setParticipantId((String)value); - } - break; - - case WAIT_FOR_LEADERSHIP_MS: - if (value == null) { - unsetWaitForLeadershipMs(); - } else { - setWaitForLeadershipMs((Integer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case PATH: - return getPath(); - - case PARTICIPANT_ID: - return getParticipantId(); - - case WAIT_FOR_LEADERSHIP_MS: - return Integer.valueOf(getWaitForLeadershipMs()); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case PATH: - return isSetPath(); - case PARTICIPANT_ID: - return isSetParticipantId(); - case WAIT_FOR_LEADERSHIP_MS: - return isSetWaitForLeadershipMs(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof startLeaderSelector_args) - return this.equals((startLeaderSelector_args)that); - return false; - } - - public boolean equals(startLeaderSelector_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_participantId = true && this.isSetParticipantId(); - boolean that_present_participantId = true && that.isSetParticipantId(); - if (this_present_participantId || that_present_participantId) { - if (!(this_present_participantId && that_present_participantId)) - return false; - if (!this.participantId.equals(that.participantId)) - return false; - } - - boolean this_present_waitForLeadershipMs = true; - boolean that_present_waitForLeadershipMs = true; - if (this_present_waitForLeadershipMs || that_present_waitForLeadershipMs) { - if (!(this_present_waitForLeadershipMs && that_present_waitForLeadershipMs)) - return false; - if (this.waitForLeadershipMs != that.waitForLeadershipMs) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(startLeaderSelector_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetParticipantId()).compareTo(other.isSetParticipantId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParticipantId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.participantId, other.participantId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetWaitForLeadershipMs()).compareTo(other.isSetWaitForLeadershipMs()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetWaitForLeadershipMs()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.waitForLeadershipMs, other.waitForLeadershipMs); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("startLeaderSelector_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - if (!first) sb.append(", "); - sb.append("participantId:"); - if (this.participantId == null) { - sb.append("null"); - } else { - sb.append(this.participantId); - } - first = false; - if (!first) sb.append(", "); - sb.append("waitForLeadershipMs:"); - sb.append(this.waitForLeadershipMs); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class startLeaderSelector_argsStandardSchemeFactory implements SchemeFactory { - public startLeaderSelector_argsStandardScheme getScheme() { - return new startLeaderSelector_argsStandardScheme(); - } - } - - private static class startLeaderSelector_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, startLeaderSelector_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // PARTICIPANT_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.participantId = iprot.readString(); - struct.setParticipantIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // WAIT_FOR_LEADERSHIP_MS - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.waitForLeadershipMs = iprot.readI32(); - struct.setWaitForLeadershipMsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, startLeaderSelector_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - if (struct.participantId != null) { - oprot.writeFieldBegin(PARTICIPANT_ID_FIELD_DESC); - oprot.writeString(struct.participantId); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(WAIT_FOR_LEADERSHIP_MS_FIELD_DESC); - oprot.writeI32(struct.waitForLeadershipMs); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class startLeaderSelector_argsTupleSchemeFactory implements SchemeFactory { - public startLeaderSelector_argsTupleScheme getScheme() { - return new startLeaderSelector_argsTupleScheme(); - } - } - - private static class startLeaderSelector_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, startLeaderSelector_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetPath()) { - optionals.set(1); - } - if (struct.isSetParticipantId()) { - optionals.set(2); - } - if (struct.isSetWaitForLeadershipMs()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetParticipantId()) { - oprot.writeString(struct.participantId); - } - if (struct.isSetWaitForLeadershipMs()) { - oprot.writeI32(struct.waitForLeadershipMs); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, startLeaderSelector_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - if (incoming.get(2)) { - struct.participantId = iprot.readString(); - struct.setParticipantIdIsSet(true); - } - if (incoming.get(3)) { - struct.waitForLeadershipMs = iprot.readI32(); - struct.setWaitForLeadershipMsIsSet(true); - } - } - } - - } - - public static class startLeaderSelector_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startLeaderSelector_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new startLeaderSelector_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new startLeaderSelector_resultTupleSchemeFactory()); - } - - public LeaderResult success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LeaderResult.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startLeaderSelector_result.class, metaDataMap); - } - - public startLeaderSelector_result() { - } - - public startLeaderSelector_result( - LeaderResult success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public startLeaderSelector_result(startLeaderSelector_result other) { - if (other.isSetSuccess()) { - this.success = new LeaderResult(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public startLeaderSelector_result deepCopy() { - return new startLeaderSelector_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public LeaderResult getSuccess() { - return this.success; - } - - public startLeaderSelector_result setSuccess(LeaderResult success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public startLeaderSelector_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((LeaderResult)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof startLeaderSelector_result) - return this.equals((startLeaderSelector_result)that); - return false; - } - - public boolean equals(startLeaderSelector_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(startLeaderSelector_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("startLeaderSelector_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class startLeaderSelector_resultStandardSchemeFactory implements SchemeFactory { - public startLeaderSelector_resultStandardScheme getScheme() { - return new startLeaderSelector_resultStandardScheme(); - } - } - - private static class startLeaderSelector_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, startLeaderSelector_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new LeaderResult(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, startLeaderSelector_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class startLeaderSelector_resultTupleSchemeFactory implements SchemeFactory { - public startLeaderSelector_resultTupleScheme getScheme() { - return new startLeaderSelector_resultTupleScheme(); - } - } - - private static class startLeaderSelector_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, startLeaderSelector_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, startLeaderSelector_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new LeaderResult(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class startNodeCache_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startNodeCache_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField DATA_IS_COMPRESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("dataIsCompressed", org.apache.thrift.protocol.TType.BOOL, (short)3); - private static final org.apache.thrift.protocol.TField BUILD_INITIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("buildInitial", org.apache.thrift.protocol.TType.BOOL, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new startNodeCache_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new startNodeCache_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public String path; // required - public boolean dataIsCompressed; // required - public boolean buildInitial; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - PATH((short)2, "path"), - DATA_IS_COMPRESSED((short)3, "dataIsCompressed"), - BUILD_INITIAL((short)4, "buildInitial"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // PATH - return PATH; - case 3: // DATA_IS_COMPRESSED - return DATA_IS_COMPRESSED; - case 4: // BUILD_INITIAL - return BUILD_INITIAL; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __DATAISCOMPRESSED_ISSET_ID = 0; - private static final int __BUILDINITIAL_ISSET_ID = 1; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DATA_IS_COMPRESSED, new org.apache.thrift.meta_data.FieldMetaData("dataIsCompressed", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.BUILD_INITIAL, new org.apache.thrift.meta_data.FieldMetaData("buildInitial", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startNodeCache_args.class, metaDataMap); - } - - public startNodeCache_args() { - } - - public startNodeCache_args( - CuratorProjection projection, - String path, - boolean dataIsCompressed, - boolean buildInitial) - { - this(); - this.projection = projection; - this.path = path; - this.dataIsCompressed = dataIsCompressed; - setDataIsCompressedIsSet(true); - this.buildInitial = buildInitial; - setBuildInitialIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public startNodeCache_args(startNodeCache_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetPath()) { - this.path = other.path; - } - this.dataIsCompressed = other.dataIsCompressed; - this.buildInitial = other.buildInitial; - } - - public startNodeCache_args deepCopy() { - return new startNodeCache_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.path = null; - setDataIsCompressedIsSet(false); - this.dataIsCompressed = false; - setBuildInitialIsSet(false); - this.buildInitial = false; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public startNodeCache_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public String getPath() { - return this.path; - } - - public startNodeCache_args setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public boolean isDataIsCompressed() { - return this.dataIsCompressed; - } - - public startNodeCache_args setDataIsCompressed(boolean dataIsCompressed) { - this.dataIsCompressed = dataIsCompressed; - setDataIsCompressedIsSet(true); - return this; - } - - public void unsetDataIsCompressed() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DATAISCOMPRESSED_ISSET_ID); - } - - /** Returns true if field dataIsCompressed is set (has been assigned a value) and false otherwise */ - public boolean isSetDataIsCompressed() { - return EncodingUtils.testBit(__isset_bitfield, __DATAISCOMPRESSED_ISSET_ID); - } - - public void setDataIsCompressedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DATAISCOMPRESSED_ISSET_ID, value); - } - - public boolean isBuildInitial() { - return this.buildInitial; - } - - public startNodeCache_args setBuildInitial(boolean buildInitial) { - this.buildInitial = buildInitial; - setBuildInitialIsSet(true); - return this; - } - - public void unsetBuildInitial() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __BUILDINITIAL_ISSET_ID); - } - - /** Returns true if field buildInitial is set (has been assigned a value) and false otherwise */ - public boolean isSetBuildInitial() { - return EncodingUtils.testBit(__isset_bitfield, __BUILDINITIAL_ISSET_ID); - } - - public void setBuildInitialIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __BUILDINITIAL_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case DATA_IS_COMPRESSED: - if (value == null) { - unsetDataIsCompressed(); - } else { - setDataIsCompressed((Boolean)value); - } - break; - - case BUILD_INITIAL: - if (value == null) { - unsetBuildInitial(); - } else { - setBuildInitial((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case PATH: - return getPath(); - - case DATA_IS_COMPRESSED: - return Boolean.valueOf(isDataIsCompressed()); - - case BUILD_INITIAL: - return Boolean.valueOf(isBuildInitial()); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case PATH: - return isSetPath(); - case DATA_IS_COMPRESSED: - return isSetDataIsCompressed(); - case BUILD_INITIAL: - return isSetBuildInitial(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof startNodeCache_args) - return this.equals((startNodeCache_args)that); - return false; - } - - public boolean equals(startNodeCache_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_dataIsCompressed = true; - boolean that_present_dataIsCompressed = true; - if (this_present_dataIsCompressed || that_present_dataIsCompressed) { - if (!(this_present_dataIsCompressed && that_present_dataIsCompressed)) - return false; - if (this.dataIsCompressed != that.dataIsCompressed) - return false; - } - - boolean this_present_buildInitial = true; - boolean that_present_buildInitial = true; - if (this_present_buildInitial || that_present_buildInitial) { - if (!(this_present_buildInitial && that_present_buildInitial)) - return false; - if (this.buildInitial != that.buildInitial) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(startNodeCache_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDataIsCompressed()).compareTo(other.isSetDataIsCompressed()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataIsCompressed()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataIsCompressed, other.dataIsCompressed); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBuildInitial()).compareTo(other.isSetBuildInitial()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBuildInitial()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.buildInitial, other.buildInitial); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("startNodeCache_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - if (!first) sb.append(", "); - sb.append("dataIsCompressed:"); - sb.append(this.dataIsCompressed); - first = false; - if (!first) sb.append(", "); - sb.append("buildInitial:"); - sb.append(this.buildInitial); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class startNodeCache_argsStandardSchemeFactory implements SchemeFactory { - public startNodeCache_argsStandardScheme getScheme() { - return new startNodeCache_argsStandardScheme(); - } - } - - private static class startNodeCache_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, startNodeCache_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // DATA_IS_COMPRESSED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.dataIsCompressed = iprot.readBool(); - struct.setDataIsCompressedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // BUILD_INITIAL - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.buildInitial = iprot.readBool(); - struct.setBuildInitialIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, startNodeCache_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DATA_IS_COMPRESSED_FIELD_DESC); - oprot.writeBool(struct.dataIsCompressed); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(BUILD_INITIAL_FIELD_DESC); - oprot.writeBool(struct.buildInitial); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class startNodeCache_argsTupleSchemeFactory implements SchemeFactory { - public startNodeCache_argsTupleScheme getScheme() { - return new startNodeCache_argsTupleScheme(); - } - } - - private static class startNodeCache_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, startNodeCache_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetPath()) { - optionals.set(1); - } - if (struct.isSetDataIsCompressed()) { - optionals.set(2); - } - if (struct.isSetBuildInitial()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetDataIsCompressed()) { - oprot.writeBool(struct.dataIsCompressed); - } - if (struct.isSetBuildInitial()) { - oprot.writeBool(struct.buildInitial); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, startNodeCache_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - if (incoming.get(2)) { - struct.dataIsCompressed = iprot.readBool(); - struct.setDataIsCompressedIsSet(true); - } - if (incoming.get(3)) { - struct.buildInitial = iprot.readBool(); - struct.setBuildInitialIsSet(true); - } - } - } - - } - - public static class startNodeCache_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startNodeCache_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new startNodeCache_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new startNodeCache_resultTupleSchemeFactory()); - } - - public NodeCacheProjection success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, NodeCacheProjection.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startNodeCache_result.class, metaDataMap); - } - - public startNodeCache_result() { - } - - public startNodeCache_result( - NodeCacheProjection success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public startNodeCache_result(startNodeCache_result other) { - if (other.isSetSuccess()) { - this.success = new NodeCacheProjection(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public startNodeCache_result deepCopy() { - return new startNodeCache_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public NodeCacheProjection getSuccess() { - return this.success; - } - - public startNodeCache_result setSuccess(NodeCacheProjection success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public startNodeCache_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((NodeCacheProjection)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof startNodeCache_result) - return this.equals((startNodeCache_result)that); - return false; - } - - public boolean equals(startNodeCache_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(startNodeCache_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("startNodeCache_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class startNodeCache_resultStandardSchemeFactory implements SchemeFactory { - public startNodeCache_resultStandardScheme getScheme() { - return new startNodeCache_resultStandardScheme(); - } - } - - private static class startNodeCache_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, startNodeCache_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new NodeCacheProjection(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, startNodeCache_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class startNodeCache_resultTupleSchemeFactory implements SchemeFactory { - public startNodeCache_resultTupleScheme getScheme() { - return new startNodeCache_resultTupleScheme(); - } - } - - private static class startNodeCache_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, startNodeCache_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, startNodeCache_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new NodeCacheProjection(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class startPathChildrenCache_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPathChildrenCache_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField CACHE_DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("cacheData", org.apache.thrift.protocol.TType.BOOL, (short)3); - private static final org.apache.thrift.protocol.TField DATA_IS_COMPRESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("dataIsCompressed", org.apache.thrift.protocol.TType.BOOL, (short)4); - private static final org.apache.thrift.protocol.TField START_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("startMode", org.apache.thrift.protocol.TType.I32, (short)5); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new startPathChildrenCache_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new startPathChildrenCache_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public String path; // required - public boolean cacheData; // required - public boolean dataIsCompressed; // required - /** - * - * @see PathChildrenCacheStartMode - */ - public PathChildrenCacheStartMode startMode; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - PATH((short)2, "path"), - CACHE_DATA((short)3, "cacheData"), - DATA_IS_COMPRESSED((short)4, "dataIsCompressed"), - /** - * - * @see PathChildrenCacheStartMode - */ - START_MODE((short)5, "startMode"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // PATH - return PATH; - case 3: // CACHE_DATA - return CACHE_DATA; - case 4: // DATA_IS_COMPRESSED - return DATA_IS_COMPRESSED; - case 5: // START_MODE - return START_MODE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __CACHEDATA_ISSET_ID = 0; - private static final int __DATAISCOMPRESSED_ISSET_ID = 1; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.CACHE_DATA, new org.apache.thrift.meta_data.FieldMetaData("cacheData", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.DATA_IS_COMPRESSED, new org.apache.thrift.meta_data.FieldMetaData("dataIsCompressed", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.START_MODE, new org.apache.thrift.meta_data.FieldMetaData("startMode", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PathChildrenCacheStartMode.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPathChildrenCache_args.class, metaDataMap); - } - - public startPathChildrenCache_args() { - } - - public startPathChildrenCache_args( - CuratorProjection projection, - String path, - boolean cacheData, - boolean dataIsCompressed, - PathChildrenCacheStartMode startMode) - { - this(); - this.projection = projection; - this.path = path; - this.cacheData = cacheData; - setCacheDataIsSet(true); - this.dataIsCompressed = dataIsCompressed; - setDataIsCompressedIsSet(true); - this.startMode = startMode; - } - - /** - * Performs a deep copy on other. - */ - public startPathChildrenCache_args(startPathChildrenCache_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetPath()) { - this.path = other.path; - } - this.cacheData = other.cacheData; - this.dataIsCompressed = other.dataIsCompressed; - if (other.isSetStartMode()) { - this.startMode = other.startMode; - } - } - - public startPathChildrenCache_args deepCopy() { - return new startPathChildrenCache_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.path = null; - setCacheDataIsSet(false); - this.cacheData = false; - setDataIsCompressedIsSet(false); - this.dataIsCompressed = false; - this.startMode = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public startPathChildrenCache_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public String getPath() { - return this.path; - } - - public startPathChildrenCache_args setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public boolean isCacheData() { - return this.cacheData; - } - - public startPathChildrenCache_args setCacheData(boolean cacheData) { - this.cacheData = cacheData; - setCacheDataIsSet(true); - return this; - } - - public void unsetCacheData() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CACHEDATA_ISSET_ID); - } - - /** Returns true if field cacheData is set (has been assigned a value) and false otherwise */ - public boolean isSetCacheData() { - return EncodingUtils.testBit(__isset_bitfield, __CACHEDATA_ISSET_ID); - } - - public void setCacheDataIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CACHEDATA_ISSET_ID, value); - } - - public boolean isDataIsCompressed() { - return this.dataIsCompressed; - } - - public startPathChildrenCache_args setDataIsCompressed(boolean dataIsCompressed) { - this.dataIsCompressed = dataIsCompressed; - setDataIsCompressedIsSet(true); - return this; - } - - public void unsetDataIsCompressed() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DATAISCOMPRESSED_ISSET_ID); - } - - /** Returns true if field dataIsCompressed is set (has been assigned a value) and false otherwise */ - public boolean isSetDataIsCompressed() { - return EncodingUtils.testBit(__isset_bitfield, __DATAISCOMPRESSED_ISSET_ID); - } - - public void setDataIsCompressedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DATAISCOMPRESSED_ISSET_ID, value); - } - - /** - * - * @see PathChildrenCacheStartMode - */ - public PathChildrenCacheStartMode getStartMode() { - return this.startMode; - } - - /** - * - * @see PathChildrenCacheStartMode - */ - public startPathChildrenCache_args setStartMode(PathChildrenCacheStartMode startMode) { - this.startMode = startMode; - return this; - } - - public void unsetStartMode() { - this.startMode = null; - } - - /** Returns true if field startMode is set (has been assigned a value) and false otherwise */ - public boolean isSetStartMode() { - return this.startMode != null; - } - - public void setStartModeIsSet(boolean value) { - if (!value) { - this.startMode = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case CACHE_DATA: - if (value == null) { - unsetCacheData(); - } else { - setCacheData((Boolean)value); - } - break; - - case DATA_IS_COMPRESSED: - if (value == null) { - unsetDataIsCompressed(); - } else { - setDataIsCompressed((Boolean)value); - } - break; - - case START_MODE: - if (value == null) { - unsetStartMode(); - } else { - setStartMode((PathChildrenCacheStartMode)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case PATH: - return getPath(); - - case CACHE_DATA: - return Boolean.valueOf(isCacheData()); - - case DATA_IS_COMPRESSED: - return Boolean.valueOf(isDataIsCompressed()); - - case START_MODE: - return getStartMode(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case PATH: - return isSetPath(); - case CACHE_DATA: - return isSetCacheData(); - case DATA_IS_COMPRESSED: - return isSetDataIsCompressed(); - case START_MODE: - return isSetStartMode(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof startPathChildrenCache_args) - return this.equals((startPathChildrenCache_args)that); - return false; - } - - public boolean equals(startPathChildrenCache_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_cacheData = true; - boolean that_present_cacheData = true; - if (this_present_cacheData || that_present_cacheData) { - if (!(this_present_cacheData && that_present_cacheData)) - return false; - if (this.cacheData != that.cacheData) - return false; - } - - boolean this_present_dataIsCompressed = true; - boolean that_present_dataIsCompressed = true; - if (this_present_dataIsCompressed || that_present_dataIsCompressed) { - if (!(this_present_dataIsCompressed && that_present_dataIsCompressed)) - return false; - if (this.dataIsCompressed != that.dataIsCompressed) - return false; - } - - boolean this_present_startMode = true && this.isSetStartMode(); - boolean that_present_startMode = true && that.isSetStartMode(); - if (this_present_startMode || that_present_startMode) { - if (!(this_present_startMode && that_present_startMode)) - return false; - if (!this.startMode.equals(that.startMode)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(startPathChildrenCache_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCacheData()).compareTo(other.isSetCacheData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCacheData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cacheData, other.cacheData); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDataIsCompressed()).compareTo(other.isSetDataIsCompressed()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataIsCompressed()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataIsCompressed, other.dataIsCompressed); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetStartMode()).compareTo(other.isSetStartMode()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStartMode()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startMode, other.startMode); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("startPathChildrenCache_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - if (!first) sb.append(", "); - sb.append("cacheData:"); - sb.append(this.cacheData); - first = false; - if (!first) sb.append(", "); - sb.append("dataIsCompressed:"); - sb.append(this.dataIsCompressed); - first = false; - if (!first) sb.append(", "); - sb.append("startMode:"); - if (this.startMode == null) { - sb.append("null"); - } else { - sb.append(this.startMode); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class startPathChildrenCache_argsStandardSchemeFactory implements SchemeFactory { - public startPathChildrenCache_argsStandardScheme getScheme() { - return new startPathChildrenCache_argsStandardScheme(); - } - } - - private static class startPathChildrenCache_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, startPathChildrenCache_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // CACHE_DATA - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.cacheData = iprot.readBool(); - struct.setCacheDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // DATA_IS_COMPRESSED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.dataIsCompressed = iprot.readBool(); - struct.setDataIsCompressedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // START_MODE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.startMode = PathChildrenCacheStartMode.findByValue(iprot.readI32()); - struct.setStartModeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, startPathChildrenCache_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(CACHE_DATA_FIELD_DESC); - oprot.writeBool(struct.cacheData); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(DATA_IS_COMPRESSED_FIELD_DESC); - oprot.writeBool(struct.dataIsCompressed); - oprot.writeFieldEnd(); - if (struct.startMode != null) { - oprot.writeFieldBegin(START_MODE_FIELD_DESC); - oprot.writeI32(struct.startMode.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class startPathChildrenCache_argsTupleSchemeFactory implements SchemeFactory { - public startPathChildrenCache_argsTupleScheme getScheme() { - return new startPathChildrenCache_argsTupleScheme(); - } - } - - private static class startPathChildrenCache_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, startPathChildrenCache_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetPath()) { - optionals.set(1); - } - if (struct.isSetCacheData()) { - optionals.set(2); - } - if (struct.isSetDataIsCompressed()) { - optionals.set(3); - } - if (struct.isSetStartMode()) { - optionals.set(4); - } - oprot.writeBitSet(optionals, 5); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetCacheData()) { - oprot.writeBool(struct.cacheData); - } - if (struct.isSetDataIsCompressed()) { - oprot.writeBool(struct.dataIsCompressed); - } - if (struct.isSetStartMode()) { - oprot.writeI32(struct.startMode.getValue()); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, startPathChildrenCache_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(5); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - if (incoming.get(2)) { - struct.cacheData = iprot.readBool(); - struct.setCacheDataIsSet(true); - } - if (incoming.get(3)) { - struct.dataIsCompressed = iprot.readBool(); - struct.setDataIsCompressedIsSet(true); - } - if (incoming.get(4)) { - struct.startMode = PathChildrenCacheStartMode.findByValue(iprot.readI32()); - struct.setStartModeIsSet(true); - } - } - } - - } - - public static class startPathChildrenCache_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPathChildrenCache_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new startPathChildrenCache_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new startPathChildrenCache_resultTupleSchemeFactory()); - } - - public PathChildrenCacheProjection success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PathChildrenCacheProjection.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPathChildrenCache_result.class, metaDataMap); - } - - public startPathChildrenCache_result() { - } - - public startPathChildrenCache_result( - PathChildrenCacheProjection success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public startPathChildrenCache_result(startPathChildrenCache_result other) { - if (other.isSetSuccess()) { - this.success = new PathChildrenCacheProjection(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public startPathChildrenCache_result deepCopy() { - return new startPathChildrenCache_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public PathChildrenCacheProjection getSuccess() { - return this.success; - } - - public startPathChildrenCache_result setSuccess(PathChildrenCacheProjection success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public startPathChildrenCache_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((PathChildrenCacheProjection)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof startPathChildrenCache_result) - return this.equals((startPathChildrenCache_result)that); - return false; - } - - public boolean equals(startPathChildrenCache_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(startPathChildrenCache_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("startPathChildrenCache_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class startPathChildrenCache_resultStandardSchemeFactory implements SchemeFactory { - public startPathChildrenCache_resultStandardScheme getScheme() { - return new startPathChildrenCache_resultStandardScheme(); - } - } - - private static class startPathChildrenCache_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, startPathChildrenCache_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new PathChildrenCacheProjection(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, startPathChildrenCache_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class startPathChildrenCache_resultTupleSchemeFactory implements SchemeFactory { - public startPathChildrenCache_resultTupleScheme getScheme() { - return new startPathChildrenCache_resultTupleScheme(); - } - } - - private static class startPathChildrenCache_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, startPathChildrenCache_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, startPathChildrenCache_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new PathChildrenCacheProjection(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class startPersistentEphemeralNode_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPersistentEphemeralNode_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("mode", org.apache.thrift.protocol.TType.I32, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new startPersistentEphemeralNode_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new startPersistentEphemeralNode_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public String path; // required - public ByteBuffer data; // required - /** - * - * @see PersistentEphemeralNodeMode - */ - public PersistentEphemeralNodeMode mode; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - PATH((short)2, "path"), - DATA((short)3, "data"), - /** - * - * @see PersistentEphemeralNodeMode - */ - MODE((short)4, "mode"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // PATH - return PATH; - case 3: // DATA - return DATA; - case 4: // MODE - return MODE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.MODE, new org.apache.thrift.meta_data.FieldMetaData("mode", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PersistentEphemeralNodeMode.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPersistentEphemeralNode_args.class, metaDataMap); - } - - public startPersistentEphemeralNode_args() { - } - - public startPersistentEphemeralNode_args( - CuratorProjection projection, - String path, - ByteBuffer data, - PersistentEphemeralNodeMode mode) - { - this(); - this.projection = projection; - this.path = path; - this.data = data; - this.mode = mode; - } - - /** - * Performs a deep copy on other. - */ - public startPersistentEphemeralNode_args(startPersistentEphemeralNode_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetPath()) { - this.path = other.path; - } - if (other.isSetData()) { - this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data); -; - } - if (other.isSetMode()) { - this.mode = other.mode; - } - } - - public startPersistentEphemeralNode_args deepCopy() { - return new startPersistentEphemeralNode_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.path = null; - this.data = null; - this.mode = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public startPersistentEphemeralNode_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public String getPath() { - return this.path; - } - - public startPersistentEphemeralNode_args setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public byte[] getData() { - setData(org.apache.thrift.TBaseHelper.rightSize(data)); - return data == null ? null : data.array(); - } - - public ByteBuffer bufferForData() { - return data; - } - - public startPersistentEphemeralNode_args setData(byte[] data) { - setData(data == null ? (ByteBuffer)null : ByteBuffer.wrap(data)); - return this; - } - - public startPersistentEphemeralNode_args setData(ByteBuffer data) { - this.data = data; - return this; - } - - public void unsetData() { - this.data = null; - } - - /** Returns true if field data is set (has been assigned a value) and false otherwise */ - public boolean isSetData() { - return this.data != null; - } - - public void setDataIsSet(boolean value) { - if (!value) { - this.data = null; - } - } - - /** - * - * @see PersistentEphemeralNodeMode - */ - public PersistentEphemeralNodeMode getMode() { - return this.mode; - } - - /** - * - * @see PersistentEphemeralNodeMode - */ - public startPersistentEphemeralNode_args setMode(PersistentEphemeralNodeMode mode) { - this.mode = mode; - return this; - } - - public void unsetMode() { - this.mode = null; - } - - /** Returns true if field mode is set (has been assigned a value) and false otherwise */ - public boolean isSetMode() { - return this.mode != null; - } - - public void setModeIsSet(boolean value) { - if (!value) { - this.mode = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case DATA: - if (value == null) { - unsetData(); - } else { - setData((ByteBuffer)value); - } - break; - - case MODE: - if (value == null) { - unsetMode(); - } else { - setMode((PersistentEphemeralNodeMode)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case PATH: - return getPath(); - - case DATA: - return getData(); - - case MODE: - return getMode(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case PATH: - return isSetPath(); - case DATA: - return isSetData(); - case MODE: - return isSetMode(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof startPersistentEphemeralNode_args) - return this.equals((startPersistentEphemeralNode_args)that); - return false; - } - - public boolean equals(startPersistentEphemeralNode_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_data = true && this.isSetData(); - boolean that_present_data = true && that.isSetData(); - if (this_present_data || that_present_data) { - if (!(this_present_data && that_present_data)) - return false; - if (!this.data.equals(that.data)) - return false; - } - - boolean this_present_mode = true && this.isSetMode(); - boolean that_present_mode = true && that.isSetMode(); - if (this_present_mode || that_present_mode) { - if (!(this_present_mode && that_present_mode)) - return false; - if (!this.mode.equals(that.mode)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(startPersistentEphemeralNode_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMode()).compareTo(other.isSetMode()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMode()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mode, other.mode); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("startPersistentEphemeralNode_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - if (!first) sb.append(", "); - sb.append("data:"); - if (this.data == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.data, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("mode:"); - if (this.mode == null) { - sb.append("null"); - } else { - sb.append(this.mode); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class startPersistentEphemeralNode_argsStandardSchemeFactory implements SchemeFactory { - public startPersistentEphemeralNode_argsStandardScheme getScheme() { - return new startPersistentEphemeralNode_argsStandardScheme(); - } - } - - private static class startPersistentEphemeralNode_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, startPersistentEphemeralNode_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // DATA - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.data = iprot.readBinary(); - struct.setDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // MODE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.mode = PersistentEphemeralNodeMode.findByValue(iprot.readI32()); - struct.setModeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, startPersistentEphemeralNode_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - if (struct.data != null) { - oprot.writeFieldBegin(DATA_FIELD_DESC); - oprot.writeBinary(struct.data); - oprot.writeFieldEnd(); - } - if (struct.mode != null) { - oprot.writeFieldBegin(MODE_FIELD_DESC); - oprot.writeI32(struct.mode.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class startPersistentEphemeralNode_argsTupleSchemeFactory implements SchemeFactory { - public startPersistentEphemeralNode_argsTupleScheme getScheme() { - return new startPersistentEphemeralNode_argsTupleScheme(); - } - } - - private static class startPersistentEphemeralNode_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, startPersistentEphemeralNode_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetPath()) { - optionals.set(1); - } - if (struct.isSetData()) { - optionals.set(2); - } - if (struct.isSetMode()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetData()) { - oprot.writeBinary(struct.data); - } - if (struct.isSetMode()) { - oprot.writeI32(struct.mode.getValue()); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, startPersistentEphemeralNode_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - if (incoming.get(2)) { - struct.data = iprot.readBinary(); - struct.setDataIsSet(true); - } - if (incoming.get(3)) { - struct.mode = PersistentEphemeralNodeMode.findByValue(iprot.readI32()); - struct.setModeIsSet(true); - } - } - } - - } - - public static class startPersistentEphemeralNode_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startPersistentEphemeralNode_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new startPersistentEphemeralNode_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new startPersistentEphemeralNode_resultTupleSchemeFactory()); - } - - public PersistentEphemeralNodeProjection success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PersistentEphemeralNodeProjection.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startPersistentEphemeralNode_result.class, metaDataMap); - } - - public startPersistentEphemeralNode_result() { - } - - public startPersistentEphemeralNode_result( - PersistentEphemeralNodeProjection success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public startPersistentEphemeralNode_result(startPersistentEphemeralNode_result other) { - if (other.isSetSuccess()) { - this.success = new PersistentEphemeralNodeProjection(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public startPersistentEphemeralNode_result deepCopy() { - return new startPersistentEphemeralNode_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public PersistentEphemeralNodeProjection getSuccess() { - return this.success; - } - - public startPersistentEphemeralNode_result setSuccess(PersistentEphemeralNodeProjection success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public startPersistentEphemeralNode_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((PersistentEphemeralNodeProjection)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof startPersistentEphemeralNode_result) - return this.equals((startPersistentEphemeralNode_result)that); - return false; - } - - public boolean equals(startPersistentEphemeralNode_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(startPersistentEphemeralNode_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("startPersistentEphemeralNode_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class startPersistentEphemeralNode_resultStandardSchemeFactory implements SchemeFactory { - public startPersistentEphemeralNode_resultStandardScheme getScheme() { - return new startPersistentEphemeralNode_resultStandardScheme(); - } - } - - private static class startPersistentEphemeralNode_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, startPersistentEphemeralNode_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new PersistentEphemeralNodeProjection(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, startPersistentEphemeralNode_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class startPersistentEphemeralNode_resultTupleSchemeFactory implements SchemeFactory { - public startPersistentEphemeralNode_resultTupleScheme getScheme() { - return new startPersistentEphemeralNode_resultTupleScheme(); - } - } - - private static class startPersistentEphemeralNode_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, startPersistentEphemeralNode_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, startPersistentEphemeralNode_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new PersistentEphemeralNodeProjection(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class sync_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sync_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField ASYNC_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("asyncContext", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new sync_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new sync_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public String path; // required - public String asyncContext; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - PATH((short)2, "path"), - ASYNC_CONTEXT((short)3, "asyncContext"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // PATH - return PATH; - case 3: // ASYNC_CONTEXT - return ASYNC_CONTEXT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ASYNC_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("asyncContext", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sync_args.class, metaDataMap); - } - - public sync_args() { - } - - public sync_args( - CuratorProjection projection, - String path, - String asyncContext) - { - this(); - this.projection = projection; - this.path = path; - this.asyncContext = asyncContext; - } - - /** - * Performs a deep copy on other. - */ - public sync_args(sync_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetPath()) { - this.path = other.path; - } - if (other.isSetAsyncContext()) { - this.asyncContext = other.asyncContext; - } - } - - public sync_args deepCopy() { - return new sync_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.path = null; - this.asyncContext = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public sync_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public String getPath() { - return this.path; - } - - public sync_args setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public String getAsyncContext() { - return this.asyncContext; - } - - public sync_args setAsyncContext(String asyncContext) { - this.asyncContext = asyncContext; - return this; - } - - public void unsetAsyncContext() { - this.asyncContext = null; - } - - /** Returns true if field asyncContext is set (has been assigned a value) and false otherwise */ - public boolean isSetAsyncContext() { - return this.asyncContext != null; - } - - public void setAsyncContextIsSet(boolean value) { - if (!value) { - this.asyncContext = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case ASYNC_CONTEXT: - if (value == null) { - unsetAsyncContext(); - } else { - setAsyncContext((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case PATH: - return getPath(); - - case ASYNC_CONTEXT: - return getAsyncContext(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case PATH: - return isSetPath(); - case ASYNC_CONTEXT: - return isSetAsyncContext(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof sync_args) - return this.equals((sync_args)that); - return false; - } - - public boolean equals(sync_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_asyncContext = true && this.isSetAsyncContext(); - boolean that_present_asyncContext = true && that.isSetAsyncContext(); - if (this_present_asyncContext || that_present_asyncContext) { - if (!(this_present_asyncContext && that_present_asyncContext)) - return false; - if (!this.asyncContext.equals(that.asyncContext)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(sync_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAsyncContext()).compareTo(other.isSetAsyncContext()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAsyncContext()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asyncContext, other.asyncContext); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("sync_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - if (!first) sb.append(", "); - sb.append("asyncContext:"); - if (this.asyncContext == null) { - sb.append("null"); - } else { - sb.append(this.asyncContext); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class sync_argsStandardSchemeFactory implements SchemeFactory { - public sync_argsStandardScheme getScheme() { - return new sync_argsStandardScheme(); - } - } - - private static class sync_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, sync_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // ASYNC_CONTEXT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.asyncContext = iprot.readString(); - struct.setAsyncContextIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, sync_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - if (struct.asyncContext != null) { - oprot.writeFieldBegin(ASYNC_CONTEXT_FIELD_DESC); - oprot.writeString(struct.asyncContext); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class sync_argsTupleSchemeFactory implements SchemeFactory { - public sync_argsTupleScheme getScheme() { - return new sync_argsTupleScheme(); - } - } - - private static class sync_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, sync_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetPath()) { - optionals.set(1); - } - if (struct.isSetAsyncContext()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetAsyncContext()) { - oprot.writeString(struct.asyncContext); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, sync_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - if (incoming.get(2)) { - struct.asyncContext = iprot.readString(); - struct.setAsyncContextIsSet(true); - } - } - } - - } - - public static class sync_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("sync_result"); - - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new sync_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new sync_resultTupleSchemeFactory()); - } - - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sync_result.class, metaDataMap); - } - - public sync_result() { - } - - public sync_result( - CuratorException ex1) - { - this(); - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public sync_result(sync_result other) { - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public sync_result deepCopy() { - return new sync_result(this); - } - - @Override - public void clear() { - this.ex1 = null; - } - - public CuratorException getEx1() { - return this.ex1; - } - - public sync_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof sync_result) - return this.equals((sync_result)that); - return false; - } - - public boolean equals(sync_result that) { - if (that == null) - return false; - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(sync_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("sync_result("); - boolean first = true; - - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class sync_resultStandardSchemeFactory implements SchemeFactory { - public sync_resultStandardScheme getScheme() { - return new sync_resultStandardScheme(); - } - } - - private static class sync_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, sync_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, sync_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class sync_resultTupleSchemeFactory implements SchemeFactory { - public sync_resultTupleScheme getScheme() { - return new sync_resultTupleScheme(); - } - } - - private static class sync_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, sync_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetEx1()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, sync_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/DeleteSpec.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/DeleteSpec.java deleted file mode 100644 index f278e6e050..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/DeleteSpec.java +++ /dev/null @@ -1,691 +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 DeleteSpec implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DeleteSpec"); - - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField GUARANTEED_FIELD_DESC = new org.apache.thrift.protocol.TField("guaranteed", org.apache.thrift.protocol.TType.BOOL, (short)2); - private static final org.apache.thrift.protocol.TField ASYNC_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("asyncContext", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRUCT, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new DeleteSpecStandardSchemeFactory()); - schemes.put(TupleScheme.class, new DeleteSpecTupleSchemeFactory()); - } - - public String path; // required - public boolean guaranteed; // required - public String asyncContext; // required - public Version version; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PATH((short)1, "path"), - GUARANTEED((short)2, "guaranteed"), - ASYNC_CONTEXT((short)3, "asyncContext"), - VERSION((short)4, "version"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PATH - return PATH; - case 2: // GUARANTEED - return GUARANTEED; - case 3: // ASYNC_CONTEXT - return ASYNC_CONTEXT; - case 4: // VERSION - return VERSION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __GUARANTEED_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.GUARANTEED, new org.apache.thrift.meta_data.FieldMetaData("guaranteed", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.ASYNC_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("asyncContext", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Version.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DeleteSpec.class, metaDataMap); - } - - public DeleteSpec() { - } - - public DeleteSpec( - String path, - boolean guaranteed, - String asyncContext, - Version version) - { - this(); - this.path = path; - this.guaranteed = guaranteed; - setGuaranteedIsSet(true); - this.asyncContext = asyncContext; - this.version = version; - } - - /** - * Performs a deep copy on other. - */ - public DeleteSpec(DeleteSpec other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetPath()) { - this.path = other.path; - } - this.guaranteed = other.guaranteed; - if (other.isSetAsyncContext()) { - this.asyncContext = other.asyncContext; - } - if (other.isSetVersion()) { - this.version = new Version(other.version); - } - } - - public DeleteSpec deepCopy() { - return new DeleteSpec(this); - } - - @Override - public void clear() { - this.path = null; - setGuaranteedIsSet(false); - this.guaranteed = false; - this.asyncContext = null; - this.version = null; - } - - public String getPath() { - return this.path; - } - - public DeleteSpec setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public boolean isGuaranteed() { - return this.guaranteed; - } - - public DeleteSpec setGuaranteed(boolean guaranteed) { - this.guaranteed = guaranteed; - setGuaranteedIsSet(true); - return this; - } - - public void unsetGuaranteed() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __GUARANTEED_ISSET_ID); - } - - /** Returns true if field guaranteed is set (has been assigned a value) and false otherwise */ - public boolean isSetGuaranteed() { - return EncodingUtils.testBit(__isset_bitfield, __GUARANTEED_ISSET_ID); - } - - public void setGuaranteedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __GUARANTEED_ISSET_ID, value); - } - - public String getAsyncContext() { - return this.asyncContext; - } - - public DeleteSpec setAsyncContext(String asyncContext) { - this.asyncContext = asyncContext; - return this; - } - - public void unsetAsyncContext() { - this.asyncContext = null; - } - - /** Returns true if field asyncContext is set (has been assigned a value) and false otherwise */ - public boolean isSetAsyncContext() { - return this.asyncContext != null; - } - - public void setAsyncContextIsSet(boolean value) { - if (!value) { - this.asyncContext = null; - } - } - - public Version getVersion() { - return this.version; - } - - public DeleteSpec setVersion(Version version) { - this.version = version; - return this; - } - - public void unsetVersion() { - this.version = null; - } - - /** Returns true if field version is set (has been assigned a value) and false otherwise */ - public boolean isSetVersion() { - return this.version != null; - } - - public void setVersionIsSet(boolean value) { - if (!value) { - this.version = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case GUARANTEED: - if (value == null) { - unsetGuaranteed(); - } else { - setGuaranteed((Boolean)value); - } - break; - - case ASYNC_CONTEXT: - if (value == null) { - unsetAsyncContext(); - } else { - setAsyncContext((String)value); - } - break; - - case VERSION: - if (value == null) { - unsetVersion(); - } else { - setVersion((Version)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PATH: - return getPath(); - - case GUARANTEED: - return Boolean.valueOf(isGuaranteed()); - - case ASYNC_CONTEXT: - return getAsyncContext(); - - case VERSION: - return getVersion(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PATH: - return isSetPath(); - case GUARANTEED: - return isSetGuaranteed(); - case ASYNC_CONTEXT: - return isSetAsyncContext(); - case VERSION: - return isSetVersion(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof DeleteSpec) - return this.equals((DeleteSpec)that); - return false; - } - - public boolean equals(DeleteSpec that) { - if (that == null) - return false; - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_guaranteed = true; - boolean that_present_guaranteed = true; - if (this_present_guaranteed || that_present_guaranteed) { - if (!(this_present_guaranteed && that_present_guaranteed)) - return false; - if (this.guaranteed != that.guaranteed) - return false; - } - - boolean this_present_asyncContext = true && this.isSetAsyncContext(); - boolean that_present_asyncContext = true && that.isSetAsyncContext(); - if (this_present_asyncContext || that_present_asyncContext) { - if (!(this_present_asyncContext && that_present_asyncContext)) - return false; - if (!this.asyncContext.equals(that.asyncContext)) - return false; - } - - boolean this_present_version = true && this.isSetVersion(); - boolean that_present_version = true && that.isSetVersion(); - if (this_present_version || that_present_version) { - if (!(this_present_version && that_present_version)) - return false; - if (!this.version.equals(that.version)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(DeleteSpec other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetGuaranteed()).compareTo(other.isSetGuaranteed()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetGuaranteed()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.guaranteed, other.guaranteed); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAsyncContext()).compareTo(other.isSetAsyncContext()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAsyncContext()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asyncContext, other.asyncContext); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVersion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("DeleteSpec("); - boolean first = true; - - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - if (!first) sb.append(", "); - sb.append("guaranteed:"); - sb.append(this.guaranteed); - first = false; - if (!first) sb.append(", "); - sb.append("asyncContext:"); - if (this.asyncContext == null) { - sb.append("null"); - } else { - sb.append(this.asyncContext); - } - first = false; - if (!first) sb.append(", "); - sb.append("version:"); - if (this.version == null) { - sb.append("null"); - } else { - sb.append(this.version); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (version != null) { - version.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class DeleteSpecStandardSchemeFactory implements SchemeFactory { - public DeleteSpecStandardScheme getScheme() { - return new DeleteSpecStandardScheme(); - } - } - - private static class DeleteSpecStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, DeleteSpec struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // GUARANTEED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.guaranteed = iprot.readBool(); - struct.setGuaranteedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // ASYNC_CONTEXT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.asyncContext = iprot.readString(); - struct.setAsyncContextIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // VERSION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.version = new Version(); - struct.version.read(iprot); - struct.setVersionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, DeleteSpec struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(GUARANTEED_FIELD_DESC); - oprot.writeBool(struct.guaranteed); - oprot.writeFieldEnd(); - if (struct.asyncContext != null) { - oprot.writeFieldBegin(ASYNC_CONTEXT_FIELD_DESC); - oprot.writeString(struct.asyncContext); - oprot.writeFieldEnd(); - } - if (struct.version != null) { - oprot.writeFieldBegin(VERSION_FIELD_DESC); - struct.version.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class DeleteSpecTupleSchemeFactory implements SchemeFactory { - public DeleteSpecTupleScheme getScheme() { - return new DeleteSpecTupleScheme(); - } - } - - private static class DeleteSpecTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, DeleteSpec struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPath()) { - optionals.set(0); - } - if (struct.isSetGuaranteed()) { - optionals.set(1); - } - if (struct.isSetAsyncContext()) { - optionals.set(2); - } - if (struct.isSetVersion()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetGuaranteed()) { - oprot.writeBool(struct.guaranteed); - } - if (struct.isSetAsyncContext()) { - oprot.writeString(struct.asyncContext); - } - if (struct.isSetVersion()) { - struct.version.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, DeleteSpec struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - if (incoming.get(1)) { - struct.guaranteed = iprot.readBool(); - struct.setGuaranteedIsSet(true); - } - if (incoming.get(2)) { - struct.asyncContext = iprot.readString(); - struct.setAsyncContextIsSet(true); - } - if (incoming.get(3)) { - struct.version = new Version(); - struct.version.read(iprot); - struct.setVersionIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryInstance.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryInstance.java deleted file mode 100644 index b73be319bd..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryInstance.java +++ /dev/null @@ -1,1201 +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 DiscoveryInstance implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DiscoveryInstance"); - - private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("address", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)4); - private static final org.apache.thrift.protocol.TField SSL_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("sslPort", org.apache.thrift.protocol.TType.I32, (short)5); - private static final org.apache.thrift.protocol.TField PAYLOAD_FIELD_DESC = new org.apache.thrift.protocol.TField("payload", org.apache.thrift.protocol.TType.STRING, (short)6); - private static final org.apache.thrift.protocol.TField REGISTRATION_TIME_UTC_FIELD_DESC = new org.apache.thrift.protocol.TField("registrationTimeUTC", org.apache.thrift.protocol.TType.I64, (short)7); - private static final org.apache.thrift.protocol.TField SERVICE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("serviceType", org.apache.thrift.protocol.TType.I32, (short)8); - private static final org.apache.thrift.protocol.TField URI_SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("uriSpec", org.apache.thrift.protocol.TType.STRING, (short)9); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new DiscoveryInstanceStandardSchemeFactory()); - schemes.put(TupleScheme.class, new DiscoveryInstanceTupleSchemeFactory()); - } - - public String name; // required - public String id; // required - public String address; // required - public int port; // required - public int sslPort; // required - public ByteBuffer payload; // required - public long registrationTimeUTC; // required - /** - * - * @see DiscoveryInstanceType - */ - public DiscoveryInstanceType serviceType; // required - public String uriSpec; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NAME((short)1, "name"), - ID((short)2, "id"), - ADDRESS((short)3, "address"), - PORT((short)4, "port"), - SSL_PORT((short)5, "sslPort"), - PAYLOAD((short)6, "payload"), - REGISTRATION_TIME_UTC((short)7, "registrationTimeUTC"), - /** - * - * @see DiscoveryInstanceType - */ - SERVICE_TYPE((short)8, "serviceType"), - URI_SPEC((short)9, "uriSpec"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NAME - return NAME; - case 2: // ID - return ID; - case 3: // ADDRESS - return ADDRESS; - case 4: // PORT - return PORT; - case 5: // SSL_PORT - return SSL_PORT; - case 6: // PAYLOAD - return PAYLOAD; - case 7: // REGISTRATION_TIME_UTC - return REGISTRATION_TIME_UTC; - case 8: // SERVICE_TYPE - return SERVICE_TYPE; - case 9: // URI_SPEC - return URI_SPEC; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __PORT_ISSET_ID = 0; - private static final int __SSLPORT_ISSET_ID = 1; - private static final int __REGISTRATIONTIMEUTC_ISSET_ID = 2; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("address", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.SSL_PORT, new org.apache.thrift.meta_data.FieldMetaData("sslPort", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.PAYLOAD, new org.apache.thrift.meta_data.FieldMetaData("payload", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.REGISTRATION_TIME_UTC, new org.apache.thrift.meta_data.FieldMetaData("registrationTimeUTC", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.SERVICE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("serviceType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DiscoveryInstanceType.class))); - tmpMap.put(_Fields.URI_SPEC, new org.apache.thrift.meta_data.FieldMetaData("uriSpec", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DiscoveryInstance.class, metaDataMap); - } - - public DiscoveryInstance() { - } - - public DiscoveryInstance( - String name, - String id, - String address, - int port, - int sslPort, - ByteBuffer payload, - long registrationTimeUTC, - DiscoveryInstanceType serviceType, - String uriSpec) - { - this(); - this.name = name; - this.id = id; - this.address = address; - this.port = port; - setPortIsSet(true); - this.sslPort = sslPort; - setSslPortIsSet(true); - this.payload = payload; - this.registrationTimeUTC = registrationTimeUTC; - setRegistrationTimeUTCIsSet(true); - this.serviceType = serviceType; - this.uriSpec = uriSpec; - } - - /** - * Performs a deep copy on other. - */ - public DiscoveryInstance(DiscoveryInstance other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetName()) { - this.name = other.name; - } - if (other.isSetId()) { - this.id = other.id; - } - if (other.isSetAddress()) { - this.address = other.address; - } - this.port = other.port; - this.sslPort = other.sslPort; - if (other.isSetPayload()) { - this.payload = org.apache.thrift.TBaseHelper.copyBinary(other.payload); -; - } - this.registrationTimeUTC = other.registrationTimeUTC; - if (other.isSetServiceType()) { - this.serviceType = other.serviceType; - } - if (other.isSetUriSpec()) { - this.uriSpec = other.uriSpec; - } - } - - public DiscoveryInstance deepCopy() { - return new DiscoveryInstance(this); - } - - @Override - public void clear() { - this.name = null; - this.id = null; - this.address = null; - setPortIsSet(false); - this.port = 0; - setSslPortIsSet(false); - this.sslPort = 0; - this.payload = null; - setRegistrationTimeUTCIsSet(false); - this.registrationTimeUTC = 0; - this.serviceType = null; - this.uriSpec = null; - } - - public String getName() { - return this.name; - } - - public DiscoveryInstance setName(String name) { - this.name = name; - return this; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public String getId() { - return this.id; - } - - public DiscoveryInstance setId(String id) { - this.id = id; - return this; - } - - public void unsetId() { - this.id = null; - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return this.id != null; - } - - public void setIdIsSet(boolean value) { - if (!value) { - this.id = null; - } - } - - public String getAddress() { - return this.address; - } - - public DiscoveryInstance setAddress(String address) { - this.address = address; - return this; - } - - public void unsetAddress() { - this.address = null; - } - - /** Returns true if field address is set (has been assigned a value) and false otherwise */ - public boolean isSetAddress() { - return this.address != null; - } - - public void setAddressIsSet(boolean value) { - if (!value) { - this.address = null; - } - } - - public int getPort() { - return this.port; - } - - public DiscoveryInstance setPort(int port) { - this.port = port; - setPortIsSet(true); - return this; - } - - public void unsetPort() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID); - } - - /** Returns true if field port is set (has been assigned a value) and false otherwise */ - public boolean isSetPort() { - return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID); - } - - public void setPortIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value); - } - - public int getSslPort() { - return this.sslPort; - } - - public DiscoveryInstance setSslPort(int sslPort) { - this.sslPort = sslPort; - setSslPortIsSet(true); - return this; - } - - public void unsetSslPort() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SSLPORT_ISSET_ID); - } - - /** Returns true if field sslPort is set (has been assigned a value) and false otherwise */ - public boolean isSetSslPort() { - return EncodingUtils.testBit(__isset_bitfield, __SSLPORT_ISSET_ID); - } - - public void setSslPortIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SSLPORT_ISSET_ID, value); - } - - public byte[] getPayload() { - setPayload(org.apache.thrift.TBaseHelper.rightSize(payload)); - return payload == null ? null : payload.array(); - } - - public ByteBuffer bufferForPayload() { - return payload; - } - - public DiscoveryInstance setPayload(byte[] payload) { - setPayload(payload == null ? (ByteBuffer)null : ByteBuffer.wrap(payload)); - return this; - } - - public DiscoveryInstance setPayload(ByteBuffer payload) { - this.payload = payload; - return this; - } - - public void unsetPayload() { - this.payload = null; - } - - /** Returns true if field payload is set (has been assigned a value) and false otherwise */ - public boolean isSetPayload() { - return this.payload != null; - } - - public void setPayloadIsSet(boolean value) { - if (!value) { - this.payload = null; - } - } - - public long getRegistrationTimeUTC() { - return this.registrationTimeUTC; - } - - public DiscoveryInstance setRegistrationTimeUTC(long registrationTimeUTC) { - this.registrationTimeUTC = registrationTimeUTC; - setRegistrationTimeUTCIsSet(true); - return this; - } - - public void unsetRegistrationTimeUTC() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __REGISTRATIONTIMEUTC_ISSET_ID); - } - - /** Returns true if field registrationTimeUTC is set (has been assigned a value) and false otherwise */ - public boolean isSetRegistrationTimeUTC() { - return EncodingUtils.testBit(__isset_bitfield, __REGISTRATIONTIMEUTC_ISSET_ID); - } - - public void setRegistrationTimeUTCIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __REGISTRATIONTIMEUTC_ISSET_ID, value); - } - - /** - * - * @see DiscoveryInstanceType - */ - public DiscoveryInstanceType getServiceType() { - return this.serviceType; - } - - /** - * - * @see DiscoveryInstanceType - */ - public DiscoveryInstance setServiceType(DiscoveryInstanceType serviceType) { - this.serviceType = serviceType; - return this; - } - - public void unsetServiceType() { - this.serviceType = null; - } - - /** Returns true if field serviceType is set (has been assigned a value) and false otherwise */ - public boolean isSetServiceType() { - return this.serviceType != null; - } - - public void setServiceTypeIsSet(boolean value) { - if (!value) { - this.serviceType = null; - } - } - - public String getUriSpec() { - return this.uriSpec; - } - - public DiscoveryInstance setUriSpec(String uriSpec) { - this.uriSpec = uriSpec; - return this; - } - - public void unsetUriSpec() { - this.uriSpec = null; - } - - /** Returns true if field uriSpec is set (has been assigned a value) and false otherwise */ - public boolean isSetUriSpec() { - return this.uriSpec != null; - } - - public void setUriSpecIsSet(boolean value) { - if (!value) { - this.uriSpec = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case ID: - if (value == null) { - unsetId(); - } else { - setId((String)value); - } - break; - - case ADDRESS: - if (value == null) { - unsetAddress(); - } else { - setAddress((String)value); - } - break; - - case PORT: - if (value == null) { - unsetPort(); - } else { - setPort((Integer)value); - } - break; - - case SSL_PORT: - if (value == null) { - unsetSslPort(); - } else { - setSslPort((Integer)value); - } - break; - - case PAYLOAD: - if (value == null) { - unsetPayload(); - } else { - setPayload((ByteBuffer)value); - } - break; - - case REGISTRATION_TIME_UTC: - if (value == null) { - unsetRegistrationTimeUTC(); - } else { - setRegistrationTimeUTC((Long)value); - } - break; - - case SERVICE_TYPE: - if (value == null) { - unsetServiceType(); - } else { - setServiceType((DiscoveryInstanceType)value); - } - break; - - case URI_SPEC: - if (value == null) { - unsetUriSpec(); - } else { - setUriSpec((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NAME: - return getName(); - - case ID: - return getId(); - - case ADDRESS: - return getAddress(); - - case PORT: - return Integer.valueOf(getPort()); - - case SSL_PORT: - return Integer.valueOf(getSslPort()); - - case PAYLOAD: - return getPayload(); - - case REGISTRATION_TIME_UTC: - return Long.valueOf(getRegistrationTimeUTC()); - - case SERVICE_TYPE: - return getServiceType(); - - case URI_SPEC: - return getUriSpec(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NAME: - return isSetName(); - case ID: - return isSetId(); - case ADDRESS: - return isSetAddress(); - case PORT: - return isSetPort(); - case SSL_PORT: - return isSetSslPort(); - case PAYLOAD: - return isSetPayload(); - case REGISTRATION_TIME_UTC: - return isSetRegistrationTimeUTC(); - case SERVICE_TYPE: - return isSetServiceType(); - case URI_SPEC: - return isSetUriSpec(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof DiscoveryInstance) - return this.equals((DiscoveryInstance)that); - return false; - } - - public boolean equals(DiscoveryInstance that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (!this.id.equals(that.id)) - return false; - } - - boolean this_present_address = true && this.isSetAddress(); - boolean that_present_address = true && that.isSetAddress(); - if (this_present_address || that_present_address) { - if (!(this_present_address && that_present_address)) - return false; - if (!this.address.equals(that.address)) - return false; - } - - boolean this_present_port = true; - boolean that_present_port = true; - if (this_present_port || that_present_port) { - if (!(this_present_port && that_present_port)) - return false; - if (this.port != that.port) - return false; - } - - boolean this_present_sslPort = true; - boolean that_present_sslPort = true; - if (this_present_sslPort || that_present_sslPort) { - if (!(this_present_sslPort && that_present_sslPort)) - return false; - if (this.sslPort != that.sslPort) - return false; - } - - boolean this_present_payload = true && this.isSetPayload(); - boolean that_present_payload = true && that.isSetPayload(); - if (this_present_payload || that_present_payload) { - if (!(this_present_payload && that_present_payload)) - return false; - if (!this.payload.equals(that.payload)) - return false; - } - - boolean this_present_registrationTimeUTC = true; - boolean that_present_registrationTimeUTC = true; - if (this_present_registrationTimeUTC || that_present_registrationTimeUTC) { - if (!(this_present_registrationTimeUTC && that_present_registrationTimeUTC)) - return false; - if (this.registrationTimeUTC != that.registrationTimeUTC) - return false; - } - - boolean this_present_serviceType = true && this.isSetServiceType(); - boolean that_present_serviceType = true && that.isSetServiceType(); - if (this_present_serviceType || that_present_serviceType) { - if (!(this_present_serviceType && that_present_serviceType)) - return false; - if (!this.serviceType.equals(that.serviceType)) - return false; - } - - boolean this_present_uriSpec = true && this.isSetUriSpec(); - boolean that_present_uriSpec = true && that.isSetUriSpec(); - if (this_present_uriSpec || that_present_uriSpec) { - if (!(this_present_uriSpec && that_present_uriSpec)) - return false; - if (!this.uriSpec.equals(that.uriSpec)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(DiscoveryInstance other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAddress()).compareTo(other.isSetAddress()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAddress()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.address, other.address); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPort()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetSslPort()).compareTo(other.isSetSslPort()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSslPort()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sslPort, other.sslPort); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPayload()).compareTo(other.isSetPayload()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPayload()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.payload, other.payload); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetRegistrationTimeUTC()).compareTo(other.isSetRegistrationTimeUTC()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetRegistrationTimeUTC()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.registrationTimeUTC, other.registrationTimeUTC); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetServiceType()).compareTo(other.isSetServiceType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetServiceType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serviceType, other.serviceType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetUriSpec()).compareTo(other.isSetUriSpec()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetUriSpec()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uriSpec, other.uriSpec); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("DiscoveryInstance("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("id:"); - if (this.id == null) { - sb.append("null"); - } else { - sb.append(this.id); - } - first = false; - if (!first) sb.append(", "); - sb.append("address:"); - if (this.address == null) { - sb.append("null"); - } else { - sb.append(this.address); - } - first = false; - if (!first) sb.append(", "); - sb.append("port:"); - sb.append(this.port); - first = false; - if (!first) sb.append(", "); - sb.append("sslPort:"); - sb.append(this.sslPort); - first = false; - if (!first) sb.append(", "); - sb.append("payload:"); - if (this.payload == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.payload, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("registrationTimeUTC:"); - sb.append(this.registrationTimeUTC); - first = false; - if (!first) sb.append(", "); - sb.append("serviceType:"); - if (this.serviceType == null) { - sb.append("null"); - } else { - sb.append(this.serviceType); - } - first = false; - if (!first) sb.append(", "); - sb.append("uriSpec:"); - if (this.uriSpec == null) { - sb.append("null"); - } else { - sb.append(this.uriSpec); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class DiscoveryInstanceStandardSchemeFactory implements SchemeFactory { - public DiscoveryInstanceStandardScheme getScheme() { - return new DiscoveryInstanceStandardScheme(); - } - } - - private static class DiscoveryInstanceStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, DiscoveryInstance struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // ADDRESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.address = iprot.readString(); - struct.setAddressIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // PORT - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.port = iprot.readI32(); - struct.setPortIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // SSL_PORT - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.sslPort = iprot.readI32(); - struct.setSslPortIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // PAYLOAD - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.payload = iprot.readBinary(); - struct.setPayloadIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // REGISTRATION_TIME_UTC - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.registrationTimeUTC = iprot.readI64(); - struct.setRegistrationTimeUTCIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // SERVICE_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.serviceType = DiscoveryInstanceType.findByValue(iprot.readI32()); - struct.setServiceTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // URI_SPEC - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.uriSpec = iprot.readString(); - struct.setUriSpecIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, DiscoveryInstance struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(struct.name); - oprot.writeFieldEnd(); - } - if (struct.id != null) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeString(struct.id); - oprot.writeFieldEnd(); - } - if (struct.address != null) { - oprot.writeFieldBegin(ADDRESS_FIELD_DESC); - oprot.writeString(struct.address); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(PORT_FIELD_DESC); - oprot.writeI32(struct.port); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(SSL_PORT_FIELD_DESC); - oprot.writeI32(struct.sslPort); - oprot.writeFieldEnd(); - if (struct.payload != null) { - oprot.writeFieldBegin(PAYLOAD_FIELD_DESC); - oprot.writeBinary(struct.payload); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(REGISTRATION_TIME_UTC_FIELD_DESC); - oprot.writeI64(struct.registrationTimeUTC); - oprot.writeFieldEnd(); - if (struct.serviceType != null) { - oprot.writeFieldBegin(SERVICE_TYPE_FIELD_DESC); - oprot.writeI32(struct.serviceType.getValue()); - oprot.writeFieldEnd(); - } - if (struct.uriSpec != null) { - oprot.writeFieldBegin(URI_SPEC_FIELD_DESC); - oprot.writeString(struct.uriSpec); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class DiscoveryInstanceTupleSchemeFactory implements SchemeFactory { - public DiscoveryInstanceTupleScheme getScheme() { - return new DiscoveryInstanceTupleScheme(); - } - } - - private static class DiscoveryInstanceTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, DiscoveryInstance struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetName()) { - optionals.set(0); - } - if (struct.isSetId()) { - optionals.set(1); - } - if (struct.isSetAddress()) { - optionals.set(2); - } - if (struct.isSetPort()) { - optionals.set(3); - } - if (struct.isSetSslPort()) { - optionals.set(4); - } - if (struct.isSetPayload()) { - optionals.set(5); - } - if (struct.isSetRegistrationTimeUTC()) { - optionals.set(6); - } - if (struct.isSetServiceType()) { - optionals.set(7); - } - if (struct.isSetUriSpec()) { - optionals.set(8); - } - oprot.writeBitSet(optionals, 9); - if (struct.isSetName()) { - oprot.writeString(struct.name); - } - if (struct.isSetId()) { - oprot.writeString(struct.id); - } - if (struct.isSetAddress()) { - oprot.writeString(struct.address); - } - if (struct.isSetPort()) { - oprot.writeI32(struct.port); - } - if (struct.isSetSslPort()) { - oprot.writeI32(struct.sslPort); - } - if (struct.isSetPayload()) { - oprot.writeBinary(struct.payload); - } - if (struct.isSetRegistrationTimeUTC()) { - oprot.writeI64(struct.registrationTimeUTC); - } - if (struct.isSetServiceType()) { - oprot.writeI32(struct.serviceType.getValue()); - } - if (struct.isSetUriSpec()) { - oprot.writeString(struct.uriSpec); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, DiscoveryInstance struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(9); - if (incoming.get(0)) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } - if (incoming.get(1)) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } - if (incoming.get(2)) { - struct.address = iprot.readString(); - struct.setAddressIsSet(true); - } - if (incoming.get(3)) { - struct.port = iprot.readI32(); - struct.setPortIsSet(true); - } - if (incoming.get(4)) { - struct.sslPort = iprot.readI32(); - struct.setSslPortIsSet(true); - } - if (incoming.get(5)) { - struct.payload = iprot.readBinary(); - struct.setPayloadIsSet(true); - } - if (incoming.get(6)) { - struct.registrationTimeUTC = iprot.readI64(); - struct.setRegistrationTimeUTCIsSet(true); - } - if (incoming.get(7)) { - struct.serviceType = DiscoveryInstanceType.findByValue(iprot.readI32()); - struct.setServiceTypeIsSet(true); - } - if (incoming.get(8)) { - struct.uriSpec = iprot.readString(); - struct.setUriSpecIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryInstanceType.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryInstanceType.java deleted file mode 100644 index 26ae4138fc..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryInstanceType.java +++ /dev/null @@ -1,48 +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 java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum DiscoveryInstanceType implements org.apache.thrift.TEnum { - DYNAMIC(0), - STATIC(1), - PERMANENT(2); - - private final int value; - - private DiscoveryInstanceType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static DiscoveryInstanceType findByValue(int value) { - switch (value) { - case 0: - return DYNAMIC; - case 1: - return STATIC; - case 2: - return PERMANENT; - default: - return null; - } - } -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryProjection.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryProjection.java deleted file mode 100644 index e8e281361e..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryProjection.java +++ /dev/null @@ -1,388 +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 DiscoveryProjection implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DiscoveryProjection"); - - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new DiscoveryProjectionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new DiscoveryProjectionTupleSchemeFactory()); - } - - public String id; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ID((short)1, "id"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ID - return ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DiscoveryProjection.class, metaDataMap); - } - - public DiscoveryProjection() { - } - - public DiscoveryProjection( - String id) - { - this(); - this.id = id; - } - - /** - * Performs a deep copy on other. - */ - public DiscoveryProjection(DiscoveryProjection other) { - if (other.isSetId()) { - this.id = other.id; - } - } - - public DiscoveryProjection deepCopy() { - return new DiscoveryProjection(this); - } - - @Override - public void clear() { - this.id = null; - } - - public String getId() { - return this.id; - } - - public DiscoveryProjection setId(String id) { - this.id = id; - return this; - } - - public void unsetId() { - this.id = null; - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return this.id != null; - } - - public void setIdIsSet(boolean value) { - if (!value) { - this.id = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ID: - if (value == null) { - unsetId(); - } else { - setId((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ID: - return getId(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ID: - return isSetId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof DiscoveryProjection) - return this.equals((DiscoveryProjection)that); - return false; - } - - public boolean equals(DiscoveryProjection that) { - if (that == null) - return false; - - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (!this.id.equals(that.id)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(DiscoveryProjection other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("DiscoveryProjection("); - boolean first = true; - - sb.append("id:"); - if (this.id == null) { - sb.append("null"); - } else { - sb.append(this.id); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class DiscoveryProjectionStandardSchemeFactory implements SchemeFactory { - public DiscoveryProjectionStandardScheme getScheme() { - return new DiscoveryProjectionStandardScheme(); - } - } - - private static class DiscoveryProjectionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, DiscoveryProjection struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, DiscoveryProjection struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.id != null) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeString(struct.id); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class DiscoveryProjectionTupleSchemeFactory implements SchemeFactory { - public DiscoveryProjectionTupleScheme getScheme() { - return new DiscoveryProjectionTupleScheme(); - } - } - - private static class DiscoveryProjectionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, DiscoveryProjection struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetId()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetId()) { - oprot.writeString(struct.id); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, DiscoveryProjection struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryProviderProjection.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryProviderProjection.java deleted file mode 100644 index f6233ecb8e..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryProviderProjection.java +++ /dev/null @@ -1,388 +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 DiscoveryProviderProjection implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DiscoveryProviderProjection"); - - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new DiscoveryProviderProjectionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new DiscoveryProviderProjectionTupleSchemeFactory()); - } - - public String id; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ID((short)1, "id"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ID - return ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DiscoveryProviderProjection.class, metaDataMap); - } - - public DiscoveryProviderProjection() { - } - - public DiscoveryProviderProjection( - String id) - { - this(); - this.id = id; - } - - /** - * Performs a deep copy on other. - */ - public DiscoveryProviderProjection(DiscoveryProviderProjection other) { - if (other.isSetId()) { - this.id = other.id; - } - } - - public DiscoveryProviderProjection deepCopy() { - return new DiscoveryProviderProjection(this); - } - - @Override - public void clear() { - this.id = null; - } - - public String getId() { - return this.id; - } - - public DiscoveryProviderProjection setId(String id) { - this.id = id; - return this; - } - - public void unsetId() { - this.id = null; - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return this.id != null; - } - - public void setIdIsSet(boolean value) { - if (!value) { - this.id = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ID: - if (value == null) { - unsetId(); - } else { - setId((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ID: - return getId(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ID: - return isSetId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof DiscoveryProviderProjection) - return this.equals((DiscoveryProviderProjection)that); - return false; - } - - public boolean equals(DiscoveryProviderProjection that) { - if (that == null) - return false; - - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (!this.id.equals(that.id)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(DiscoveryProviderProjection other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("DiscoveryProviderProjection("); - boolean first = true; - - sb.append("id:"); - if (this.id == null) { - sb.append("null"); - } else { - sb.append(this.id); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class DiscoveryProviderProjectionStandardSchemeFactory implements SchemeFactory { - public DiscoveryProviderProjectionStandardScheme getScheme() { - return new DiscoveryProviderProjectionStandardScheme(); - } - } - - private static class DiscoveryProviderProjectionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, DiscoveryProviderProjection struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, DiscoveryProviderProjection struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.id != null) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeString(struct.id); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class DiscoveryProviderProjectionTupleSchemeFactory implements SchemeFactory { - public DiscoveryProviderProjectionTupleScheme getScheme() { - return new DiscoveryProviderProjectionTupleScheme(); - } - } - - private static class DiscoveryProviderProjectionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, DiscoveryProviderProjection struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetId()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetId()) { - oprot.writeString(struct.id); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, DiscoveryProviderProjection struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryService.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryService.java deleted file mode 100644 index 7e64f0fba1..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryService.java +++ /dev/null @@ -1,7236 +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 DiscoveryService { - - public interface Iface { - - public List getAllInstances(CuratorProjection projection, DiscoveryProviderProjection providerProjection) throws CuratorException, org.apache.thrift.TException; - - public DiscoveryInstance getInstance(CuratorProjection projection, DiscoveryProviderProjection providerProjection) throws CuratorException, org.apache.thrift.TException; - - public DiscoveryInstance makeDiscoveryInstance(String name, ByteBuffer payload, int port) throws CuratorException, org.apache.thrift.TException; - - public void noteError(CuratorProjection projection, DiscoveryProviderProjection providerProjection, String instanceId) throws CuratorException, org.apache.thrift.TException; - - public DiscoveryProjection startDiscovery(CuratorProjection projection, String basePath, DiscoveryInstance yourInstance) throws CuratorException, org.apache.thrift.TException; - - public DiscoveryProviderProjection startProvider(CuratorProjection projection, DiscoveryProjection discoveryProjection, String serviceName, ProviderStrategyType providerStrategy, int downTimeoutMs, int downErrorThreshold) throws CuratorException, org.apache.thrift.TException; - - } - - public interface AsyncIface { - - public void getAllInstances(CuratorProjection projection, DiscoveryProviderProjection providerProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void getInstance(CuratorProjection projection, DiscoveryProviderProjection providerProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void makeDiscoveryInstance(String name, ByteBuffer payload, int port, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void noteError(CuratorProjection projection, DiscoveryProviderProjection providerProjection, String instanceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void startDiscovery(CuratorProjection projection, String basePath, DiscoveryInstance yourInstance, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void startProvider(CuratorProjection projection, DiscoveryProjection discoveryProjection, String serviceName, ProviderStrategyType providerStrategy, int downTimeoutMs, int downErrorThreshold, 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 { - 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 List getAllInstances(CuratorProjection projection, DiscoveryProviderProjection providerProjection) throws CuratorException, org.apache.thrift.TException - { - send_getAllInstances(projection, providerProjection); - return recv_getAllInstances(); - } - - public void send_getAllInstances(CuratorProjection projection, DiscoveryProviderProjection providerProjection) throws org.apache.thrift.TException - { - getAllInstances_args args = new getAllInstances_args(); - args.setProjection(projection); - args.setProviderProjection(providerProjection); - sendBase("getAllInstances", args); - } - - public List recv_getAllInstances() throws CuratorException, org.apache.thrift.TException - { - getAllInstances_result result = new getAllInstances_result(); - receiveBase(result, "getAllInstances"); - 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, "getAllInstances failed: unknown result"); - } - - public DiscoveryInstance getInstance(CuratorProjection projection, DiscoveryProviderProjection providerProjection) throws CuratorException, org.apache.thrift.TException - { - send_getInstance(projection, providerProjection); - return recv_getInstance(); - } - - public void send_getInstance(CuratorProjection projection, DiscoveryProviderProjection providerProjection) throws org.apache.thrift.TException - { - getInstance_args args = new getInstance_args(); - args.setProjection(projection); - args.setProviderProjection(providerProjection); - sendBase("getInstance", args); - } - - public DiscoveryInstance recv_getInstance() throws CuratorException, org.apache.thrift.TException - { - getInstance_result result = new getInstance_result(); - receiveBase(result, "getInstance"); - 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, "getInstance failed: unknown result"); - } - - public DiscoveryInstance makeDiscoveryInstance(String name, ByteBuffer payload, int port) throws CuratorException, org.apache.thrift.TException - { - send_makeDiscoveryInstance(name, payload, port); - return recv_makeDiscoveryInstance(); - } - - public void send_makeDiscoveryInstance(String name, ByteBuffer payload, int port) throws org.apache.thrift.TException - { - makeDiscoveryInstance_args args = new makeDiscoveryInstance_args(); - args.setName(name); - args.setPayload(payload); - args.setPort(port); - sendBase("makeDiscoveryInstance", args); - } - - public DiscoveryInstance recv_makeDiscoveryInstance() throws CuratorException, org.apache.thrift.TException - { - makeDiscoveryInstance_result result = new makeDiscoveryInstance_result(); - receiveBase(result, "makeDiscoveryInstance"); - 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, "makeDiscoveryInstance failed: unknown result"); - } - - public void noteError(CuratorProjection projection, DiscoveryProviderProjection providerProjection, String instanceId) throws CuratorException, org.apache.thrift.TException - { - send_noteError(projection, providerProjection, instanceId); - recv_noteError(); - } - - public void send_noteError(CuratorProjection projection, DiscoveryProviderProjection providerProjection, String instanceId) throws org.apache.thrift.TException - { - noteError_args args = new noteError_args(); - args.setProjection(projection); - args.setProviderProjection(providerProjection); - args.setInstanceId(instanceId); - sendBase("noteError", args); - } - - public void recv_noteError() throws CuratorException, org.apache.thrift.TException - { - noteError_result result = new noteError_result(); - receiveBase(result, "noteError"); - if (result.ex1 != null) { - throw result.ex1; - } - return; - } - - public DiscoveryProjection startDiscovery(CuratorProjection projection, String basePath, DiscoveryInstance yourInstance) throws CuratorException, org.apache.thrift.TException - { - send_startDiscovery(projection, basePath, yourInstance); - return recv_startDiscovery(); - } - - public void send_startDiscovery(CuratorProjection projection, String basePath, DiscoveryInstance yourInstance) throws org.apache.thrift.TException - { - startDiscovery_args args = new startDiscovery_args(); - args.setProjection(projection); - args.setBasePath(basePath); - args.setYourInstance(yourInstance); - sendBase("startDiscovery", args); - } - - public DiscoveryProjection recv_startDiscovery() throws CuratorException, org.apache.thrift.TException - { - startDiscovery_result result = new startDiscovery_result(); - receiveBase(result, "startDiscovery"); - 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, "startDiscovery failed: unknown result"); - } - - public DiscoveryProviderProjection startProvider(CuratorProjection projection, DiscoveryProjection discoveryProjection, String serviceName, ProviderStrategyType providerStrategy, int downTimeoutMs, int downErrorThreshold) throws CuratorException, org.apache.thrift.TException - { - send_startProvider(projection, discoveryProjection, serviceName, providerStrategy, downTimeoutMs, downErrorThreshold); - return recv_startProvider(); - } - - public void send_startProvider(CuratorProjection projection, DiscoveryProjection discoveryProjection, String serviceName, ProviderStrategyType providerStrategy, int downTimeoutMs, int downErrorThreshold) throws org.apache.thrift.TException - { - startProvider_args args = new startProvider_args(); - args.setProjection(projection); - args.setDiscoveryProjection(discoveryProjection); - args.setServiceName(serviceName); - args.setProviderStrategy(providerStrategy); - args.setDownTimeoutMs(downTimeoutMs); - args.setDownErrorThreshold(downErrorThreshold); - sendBase("startProvider", args); - } - - public DiscoveryProviderProjection recv_startProvider() throws CuratorException, org.apache.thrift.TException - { - startProvider_result result = new startProvider_result(); - receiveBase(result, "startProvider"); - 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, "startProvider failed: unknown result"); - } - - } - public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { - public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { - 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 getAllInstances(CuratorProjection projection, DiscoveryProviderProjection providerProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getAllInstances_call method_call = new getAllInstances_call(projection, providerProjection, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getAllInstances_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private DiscoveryProviderProjection providerProjection; - public getAllInstances_call(CuratorProjection projection, DiscoveryProviderProjection providerProjection, 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.providerProjection = providerProjection; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllInstances", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getAllInstances_args args = new getAllInstances_args(); - args.setProjection(projection); - args.setProviderProjection(providerProjection); - args.write(prot); - prot.writeMessageEnd(); - } - - public List 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_getAllInstances(); - } - } - - public void getInstance(CuratorProjection projection, DiscoveryProviderProjection providerProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getInstance_call method_call = new getInstance_call(projection, providerProjection, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getInstance_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private DiscoveryProviderProjection providerProjection; - public getInstance_call(CuratorProjection projection, DiscoveryProviderProjection providerProjection, 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.providerProjection = providerProjection; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInstance", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getInstance_args args = new getInstance_args(); - args.setProjection(projection); - args.setProviderProjection(providerProjection); - args.write(prot); - prot.writeMessageEnd(); - } - - public DiscoveryInstance 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_getInstance(); - } - } - - public void makeDiscoveryInstance(String name, ByteBuffer payload, int port, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - makeDiscoveryInstance_call method_call = new makeDiscoveryInstance_call(name, payload, port, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class makeDiscoveryInstance_call extends org.apache.thrift.async.TAsyncMethodCall { - private String name; - private ByteBuffer payload; - private int port; - public makeDiscoveryInstance_call(String name, ByteBuffer payload, int port, 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.name = name; - this.payload = payload; - this.port = port; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("makeDiscoveryInstance", org.apache.thrift.protocol.TMessageType.CALL, 0)); - makeDiscoveryInstance_args args = new makeDiscoveryInstance_args(); - args.setName(name); - args.setPayload(payload); - args.setPort(port); - args.write(prot); - prot.writeMessageEnd(); - } - - public DiscoveryInstance 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_makeDiscoveryInstance(); - } - } - - public void noteError(CuratorProjection projection, DiscoveryProviderProjection providerProjection, String instanceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - noteError_call method_call = new noteError_call(projection, providerProjection, instanceId, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class noteError_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private DiscoveryProviderProjection providerProjection; - private String instanceId; - public noteError_call(CuratorProjection projection, DiscoveryProviderProjection providerProjection, String instanceId, 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.providerProjection = providerProjection; - this.instanceId = instanceId; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("noteError", org.apache.thrift.protocol.TMessageType.CALL, 0)); - noteError_args args = new noteError_args(); - args.setProjection(projection); - args.setProviderProjection(providerProjection); - args.setInstanceId(instanceId); - 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_noteError(); - } - } - - public void startDiscovery(CuratorProjection projection, String basePath, DiscoveryInstance yourInstance, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - startDiscovery_call method_call = new startDiscovery_call(projection, basePath, yourInstance, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class startDiscovery_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private String basePath; - private DiscoveryInstance yourInstance; - public startDiscovery_call(CuratorProjection projection, String basePath, DiscoveryInstance yourInstance, 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.basePath = basePath; - this.yourInstance = yourInstance; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startDiscovery", org.apache.thrift.protocol.TMessageType.CALL, 0)); - startDiscovery_args args = new startDiscovery_args(); - args.setProjection(projection); - args.setBasePath(basePath); - args.setYourInstance(yourInstance); - args.write(prot); - prot.writeMessageEnd(); - } - - public DiscoveryProjection 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_startDiscovery(); - } - } - - public void startProvider(CuratorProjection projection, DiscoveryProjection discoveryProjection, String serviceName, ProviderStrategyType providerStrategy, int downTimeoutMs, int downErrorThreshold, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - startProvider_call method_call = new startProvider_call(projection, discoveryProjection, serviceName, providerStrategy, downTimeoutMs, downErrorThreshold, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class startProvider_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private DiscoveryProjection discoveryProjection; - private String serviceName; - private ProviderStrategyType providerStrategy; - private int downTimeoutMs; - private int downErrorThreshold; - public startProvider_call(CuratorProjection projection, DiscoveryProjection discoveryProjection, String serviceName, ProviderStrategyType providerStrategy, int downTimeoutMs, int downErrorThreshold, 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.discoveryProjection = discoveryProjection; - this.serviceName = serviceName; - this.providerStrategy = providerStrategy; - this.downTimeoutMs = downTimeoutMs; - this.downErrorThreshold = downErrorThreshold; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startProvider", org.apache.thrift.protocol.TMessageType.CALL, 0)); - startProvider_args args = new startProvider_args(); - args.setProjection(projection); - args.setDiscoveryProjection(discoveryProjection); - args.setServiceName(serviceName); - args.setProviderStrategy(providerStrategy); - args.setDownTimeoutMs(downTimeoutMs); - args.setDownErrorThreshold(downErrorThreshold); - args.write(prot); - prot.writeMessageEnd(); - } - - public DiscoveryProviderProjection 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_startProvider(); - } - } - - } - - public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); - public Processor(I iface) { - super(iface, getProcessMap(new HashMap>())); - } - - protected Processor(I iface, Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static Map> getProcessMap(Map> processMap) { - processMap.put("getAllInstances", new getAllInstances()); - processMap.put("getInstance", new getInstance()); - processMap.put("makeDiscoveryInstance", new makeDiscoveryInstance()); - processMap.put("noteError", new noteError()); - processMap.put("startDiscovery", new startDiscovery()); - processMap.put("startProvider", new startProvider()); - return processMap; - } - - public static class getAllInstances extends org.apache.thrift.ProcessFunction { - public getAllInstances() { - super("getAllInstances"); - } - - public getAllInstances_args getEmptyArgsInstance() { - return new getAllInstances_args(); - } - - protected boolean isOneway() { - return false; - } - - public getAllInstances_result getResult(I iface, getAllInstances_args args) throws org.apache.thrift.TException { - getAllInstances_result result = new getAllInstances_result(); - try { - result.success = iface.getAllInstances(args.projection, args.providerProjection); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class getInstance extends org.apache.thrift.ProcessFunction { - public getInstance() { - super("getInstance"); - } - - public getInstance_args getEmptyArgsInstance() { - return new getInstance_args(); - } - - protected boolean isOneway() { - return false; - } - - public getInstance_result getResult(I iface, getInstance_args args) throws org.apache.thrift.TException { - getInstance_result result = new getInstance_result(); - try { - result.success = iface.getInstance(args.projection, args.providerProjection); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class makeDiscoveryInstance extends org.apache.thrift.ProcessFunction { - public makeDiscoveryInstance() { - super("makeDiscoveryInstance"); - } - - public makeDiscoveryInstance_args getEmptyArgsInstance() { - return new makeDiscoveryInstance_args(); - } - - protected boolean isOneway() { - return false; - } - - public makeDiscoveryInstance_result getResult(I iface, makeDiscoveryInstance_args args) throws org.apache.thrift.TException { - makeDiscoveryInstance_result result = new makeDiscoveryInstance_result(); - try { - result.success = iface.makeDiscoveryInstance(args.name, args.payload, args.port); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class noteError extends org.apache.thrift.ProcessFunction { - public noteError() { - super("noteError"); - } - - public noteError_args getEmptyArgsInstance() { - return new noteError_args(); - } - - protected boolean isOneway() { - return false; - } - - public noteError_result getResult(I iface, noteError_args args) throws org.apache.thrift.TException { - noteError_result result = new noteError_result(); - try { - iface.noteError(args.projection, args.providerProjection, args.instanceId); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class startDiscovery extends org.apache.thrift.ProcessFunction { - public startDiscovery() { - super("startDiscovery"); - } - - public startDiscovery_args getEmptyArgsInstance() { - return new startDiscovery_args(); - } - - protected boolean isOneway() { - return false; - } - - public startDiscovery_result getResult(I iface, startDiscovery_args args) throws org.apache.thrift.TException { - startDiscovery_result result = new startDiscovery_result(); - try { - result.success = iface.startDiscovery(args.projection, args.basePath, args.yourInstance); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class startProvider extends org.apache.thrift.ProcessFunction { - public startProvider() { - super("startProvider"); - } - - public startProvider_args getEmptyArgsInstance() { - return new startProvider_args(); - } - - protected boolean isOneway() { - return false; - } - - public startProvider_result getResult(I iface, startProvider_args args) throws org.apache.thrift.TException { - startProvider_result result = new startProvider_result(); - try { - result.success = iface.startProvider(args.projection, args.discoveryProjection, args.serviceName, args.providerStrategy, args.downTimeoutMs, args.downErrorThreshold); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - } - - public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); - public AsyncProcessor(I iface) { - super(iface, getProcessMap(new HashMap>())); - } - - protected AsyncProcessor(I iface, Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static Map> getProcessMap(Map> processMap) { - processMap.put("getAllInstances", new getAllInstances()); - processMap.put("getInstance", new getInstance()); - processMap.put("makeDiscoveryInstance", new makeDiscoveryInstance()); - processMap.put("noteError", new noteError()); - processMap.put("startDiscovery", new startDiscovery()); - processMap.put("startProvider", new startProvider()); - return processMap; - } - - public static class getAllInstances extends org.apache.thrift.AsyncProcessFunction> { - public getAllInstances() { - super("getAllInstances"); - } - - public getAllInstances_args getEmptyArgsInstance() { - return new getAllInstances_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - getAllInstances_result result = new getAllInstances_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getAllInstances_result result = new getAllInstances_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getAllInstances_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.getAllInstances(args.projection, args.providerProjection,resultHandler); - } - } - - public static class getInstance extends org.apache.thrift.AsyncProcessFunction { - public getInstance() { - super("getInstance"); - } - - public getInstance_args getEmptyArgsInstance() { - return new getInstance_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(DiscoveryInstance o) { - getInstance_result result = new getInstance_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getInstance_result result = new getInstance_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getInstance_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getInstance(args.projection, args.providerProjection,resultHandler); - } - } - - public static class makeDiscoveryInstance extends org.apache.thrift.AsyncProcessFunction { - public makeDiscoveryInstance() { - super("makeDiscoveryInstance"); - } - - public makeDiscoveryInstance_args getEmptyArgsInstance() { - return new makeDiscoveryInstance_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(DiscoveryInstance o) { - makeDiscoveryInstance_result result = new makeDiscoveryInstance_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - makeDiscoveryInstance_result result = new makeDiscoveryInstance_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, makeDiscoveryInstance_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.makeDiscoveryInstance(args.name, args.payload, args.port,resultHandler); - } - } - - public static class noteError extends org.apache.thrift.AsyncProcessFunction { - public noteError() { - super("noteError"); - } - - public noteError_args getEmptyArgsInstance() { - return new noteError_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - noteError_result result = new noteError_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - noteError_result result = new noteError_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, noteError_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.noteError(args.projection, args.providerProjection, args.instanceId,resultHandler); - } - } - - public static class startDiscovery extends org.apache.thrift.AsyncProcessFunction { - public startDiscovery() { - super("startDiscovery"); - } - - public startDiscovery_args getEmptyArgsInstance() { - return new startDiscovery_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(DiscoveryProjection o) { - startDiscovery_result result = new startDiscovery_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - startDiscovery_result result = new startDiscovery_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, startDiscovery_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.startDiscovery(args.projection, args.basePath, args.yourInstance,resultHandler); - } - } - - public static class startProvider extends org.apache.thrift.AsyncProcessFunction { - public startProvider() { - super("startProvider"); - } - - public startProvider_args getEmptyArgsInstance() { - return new startProvider_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(DiscoveryProviderProjection o) { - startProvider_result result = new startProvider_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - startProvider_result result = new startProvider_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, startProvider_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.startProvider(args.projection, args.discoveryProjection, args.serviceName, args.providerStrategy, args.downTimeoutMs, args.downErrorThreshold,resultHandler); - } - } - - } - - public static class getAllInstances_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllInstances_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField PROVIDER_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("providerProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getAllInstances_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAllInstances_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public DiscoveryProviderProjection providerProjection; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - PROVIDER_PROJECTION((short)2, "providerProjection"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // PROVIDER_PROJECTION - return PROVIDER_PROJECTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.PROVIDER_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("providerProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryProviderProjection.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllInstances_args.class, metaDataMap); - } - - public getAllInstances_args() { - } - - public getAllInstances_args( - CuratorProjection projection, - DiscoveryProviderProjection providerProjection) - { - this(); - this.projection = projection; - this.providerProjection = providerProjection; - } - - /** - * Performs a deep copy on other. - */ - public getAllInstances_args(getAllInstances_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetProviderProjection()) { - this.providerProjection = new DiscoveryProviderProjection(other.providerProjection); - } - } - - public getAllInstances_args deepCopy() { - return new getAllInstances_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.providerProjection = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public getAllInstances_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public DiscoveryProviderProjection getProviderProjection() { - return this.providerProjection; - } - - public getAllInstances_args setProviderProjection(DiscoveryProviderProjection providerProjection) { - this.providerProjection = providerProjection; - return this; - } - - public void unsetProviderProjection() { - this.providerProjection = null; - } - - /** Returns true if field providerProjection is set (has been assigned a value) and false otherwise */ - public boolean isSetProviderProjection() { - return this.providerProjection != null; - } - - public void setProviderProjectionIsSet(boolean value) { - if (!value) { - this.providerProjection = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case PROVIDER_PROJECTION: - if (value == null) { - unsetProviderProjection(); - } else { - setProviderProjection((DiscoveryProviderProjection)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case PROVIDER_PROJECTION: - return getProviderProjection(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case PROVIDER_PROJECTION: - return isSetProviderProjection(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getAllInstances_args) - return this.equals((getAllInstances_args)that); - return false; - } - - public boolean equals(getAllInstances_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_providerProjection = true && this.isSetProviderProjection(); - boolean that_present_providerProjection = true && that.isSetProviderProjection(); - if (this_present_providerProjection || that_present_providerProjection) { - if (!(this_present_providerProjection && that_present_providerProjection)) - return false; - if (!this.providerProjection.equals(that.providerProjection)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getAllInstances_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetProviderProjection()).compareTo(other.isSetProviderProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProviderProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.providerProjection, other.providerProjection); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getAllInstances_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("providerProjection:"); - if (this.providerProjection == null) { - sb.append("null"); - } else { - sb.append(this.providerProjection); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (providerProjection != null) { - providerProjection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getAllInstances_argsStandardSchemeFactory implements SchemeFactory { - public getAllInstances_argsStandardScheme getScheme() { - return new getAllInstances_argsStandardScheme(); - } - } - - private static class getAllInstances_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getAllInstances_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PROVIDER_PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.providerProjection = new DiscoveryProviderProjection(); - struct.providerProjection.read(iprot); - struct.setProviderProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getAllInstances_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.providerProjection != null) { - oprot.writeFieldBegin(PROVIDER_PROJECTION_FIELD_DESC); - struct.providerProjection.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getAllInstances_argsTupleSchemeFactory implements SchemeFactory { - public getAllInstances_argsTupleScheme getScheme() { - return new getAllInstances_argsTupleScheme(); - } - } - - private static class getAllInstances_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getAllInstances_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetProviderProjection()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetProviderProjection()) { - struct.providerProjection.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getAllInstances_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.providerProjection = new DiscoveryProviderProjection(); - struct.providerProjection.read(iprot); - struct.setProviderProjectionIsSet(true); - } - } - } - - } - - public static class getAllInstances_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllInstances_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getAllInstances_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getAllInstances_resultTupleSchemeFactory()); - } - - public List success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryInstance.class)))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllInstances_result.class, metaDataMap); - } - - public getAllInstances_result() { - } - - public getAllInstances_result( - List success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public getAllInstances_result(getAllInstances_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (DiscoveryInstance other_element : other.success) { - __this__success.add(new DiscoveryInstance(other_element)); - } - this.success = __this__success; - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public getAllInstances_result deepCopy() { - return new getAllInstances_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(DiscoveryInstance elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public getAllInstances_result setSuccess(List success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public getAllInstances_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getAllInstances_result) - return this.equals((getAllInstances_result)that); - return false; - } - - public boolean equals(getAllInstances_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getAllInstances_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getAllInstances_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getAllInstances_resultStandardSchemeFactory implements SchemeFactory { - public getAllInstances_resultStandardScheme getScheme() { - return new getAllInstances_resultStandardScheme(); - } - } - - private static class getAllInstances_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getAllInstances_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list48 = iprot.readListBegin(); - struct.success = new ArrayList(_list48.size); - for (int _i49 = 0; _i49 < _list48.size; ++_i49) - { - DiscoveryInstance _elem50; - _elem50 = new DiscoveryInstance(); - _elem50.read(iprot); - struct.success.add(_elem50); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getAllInstances_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (DiscoveryInstance _iter51 : struct.success) - { - _iter51.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getAllInstances_resultTupleSchemeFactory implements SchemeFactory { - public getAllInstances_resultTupleScheme getScheme() { - return new getAllInstances_resultTupleScheme(); - } - } - - private static class getAllInstances_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getAllInstances_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (DiscoveryInstance _iter52 : struct.success) - { - _iter52.write(oprot); - } - } - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getAllInstances_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list53 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list53.size); - for (int _i54 = 0; _i54 < _list53.size; ++_i54) - { - DiscoveryInstance _elem55; - _elem55 = new DiscoveryInstance(); - _elem55.read(iprot); - struct.success.add(_elem55); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class getInstance_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInstance_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField PROVIDER_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("providerProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getInstance_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getInstance_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public DiscoveryProviderProjection providerProjection; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - PROVIDER_PROJECTION((short)2, "providerProjection"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // PROVIDER_PROJECTION - return PROVIDER_PROJECTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.PROVIDER_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("providerProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryProviderProjection.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInstance_args.class, metaDataMap); - } - - public getInstance_args() { - } - - public getInstance_args( - CuratorProjection projection, - DiscoveryProviderProjection providerProjection) - { - this(); - this.projection = projection; - this.providerProjection = providerProjection; - } - - /** - * Performs a deep copy on other. - */ - public getInstance_args(getInstance_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetProviderProjection()) { - this.providerProjection = new DiscoveryProviderProjection(other.providerProjection); - } - } - - public getInstance_args deepCopy() { - return new getInstance_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.providerProjection = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public getInstance_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public DiscoveryProviderProjection getProviderProjection() { - return this.providerProjection; - } - - public getInstance_args setProviderProjection(DiscoveryProviderProjection providerProjection) { - this.providerProjection = providerProjection; - return this; - } - - public void unsetProviderProjection() { - this.providerProjection = null; - } - - /** Returns true if field providerProjection is set (has been assigned a value) and false otherwise */ - public boolean isSetProviderProjection() { - return this.providerProjection != null; - } - - public void setProviderProjectionIsSet(boolean value) { - if (!value) { - this.providerProjection = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case PROVIDER_PROJECTION: - if (value == null) { - unsetProviderProjection(); - } else { - setProviderProjection((DiscoveryProviderProjection)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case PROVIDER_PROJECTION: - return getProviderProjection(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case PROVIDER_PROJECTION: - return isSetProviderProjection(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getInstance_args) - return this.equals((getInstance_args)that); - return false; - } - - public boolean equals(getInstance_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_providerProjection = true && this.isSetProviderProjection(); - boolean that_present_providerProjection = true && that.isSetProviderProjection(); - if (this_present_providerProjection || that_present_providerProjection) { - if (!(this_present_providerProjection && that_present_providerProjection)) - return false; - if (!this.providerProjection.equals(that.providerProjection)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getInstance_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetProviderProjection()).compareTo(other.isSetProviderProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProviderProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.providerProjection, other.providerProjection); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getInstance_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("providerProjection:"); - if (this.providerProjection == null) { - sb.append("null"); - } else { - sb.append(this.providerProjection); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (providerProjection != null) { - providerProjection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getInstance_argsStandardSchemeFactory implements SchemeFactory { - public getInstance_argsStandardScheme getScheme() { - return new getInstance_argsStandardScheme(); - } - } - - private static class getInstance_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getInstance_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PROVIDER_PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.providerProjection = new DiscoveryProviderProjection(); - struct.providerProjection.read(iprot); - struct.setProviderProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getInstance_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.providerProjection != null) { - oprot.writeFieldBegin(PROVIDER_PROJECTION_FIELD_DESC); - struct.providerProjection.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getInstance_argsTupleSchemeFactory implements SchemeFactory { - public getInstance_argsTupleScheme getScheme() { - return new getInstance_argsTupleScheme(); - } - } - - private static class getInstance_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getInstance_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetProviderProjection()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetProviderProjection()) { - struct.providerProjection.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getInstance_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.providerProjection = new DiscoveryProviderProjection(); - struct.providerProjection.read(iprot); - struct.setProviderProjectionIsSet(true); - } - } - } - - } - - public static class getInstance_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInstance_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getInstance_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getInstance_resultTupleSchemeFactory()); - } - - public DiscoveryInstance success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryInstance.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInstance_result.class, metaDataMap); - } - - public getInstance_result() { - } - - public getInstance_result( - DiscoveryInstance success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public getInstance_result(getInstance_result other) { - if (other.isSetSuccess()) { - this.success = new DiscoveryInstance(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public getInstance_result deepCopy() { - return new getInstance_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public DiscoveryInstance getSuccess() { - return this.success; - } - - public getInstance_result setSuccess(DiscoveryInstance success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public getInstance_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((DiscoveryInstance)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getInstance_result) - return this.equals((getInstance_result)that); - return false; - } - - public boolean equals(getInstance_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getInstance_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getInstance_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getInstance_resultStandardSchemeFactory implements SchemeFactory { - public getInstance_resultStandardScheme getScheme() { - return new getInstance_resultStandardScheme(); - } - } - - private static class getInstance_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getInstance_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new DiscoveryInstance(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getInstance_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getInstance_resultTupleSchemeFactory implements SchemeFactory { - public getInstance_resultTupleScheme getScheme() { - return new getInstance_resultTupleScheme(); - } - } - - private static class getInstance_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getInstance_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getInstance_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new DiscoveryInstance(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class makeDiscoveryInstance_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("makeDiscoveryInstance_args"); - - private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField PAYLOAD_FIELD_DESC = new org.apache.thrift.protocol.TField("payload", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new makeDiscoveryInstance_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new makeDiscoveryInstance_argsTupleSchemeFactory()); - } - - public String name; // required - public ByteBuffer payload; // required - public int port; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - NAME((short)1, "name"), - PAYLOAD((short)2, "payload"), - PORT((short)3, "port"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // NAME - return NAME; - case 2: // PAYLOAD - return PAYLOAD; - case 3: // PORT - return PORT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __PORT_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PAYLOAD, new org.apache.thrift.meta_data.FieldMetaData("payload", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(makeDiscoveryInstance_args.class, metaDataMap); - } - - public makeDiscoveryInstance_args() { - } - - public makeDiscoveryInstance_args( - String name, - ByteBuffer payload, - int port) - { - this(); - this.name = name; - this.payload = payload; - this.port = port; - setPortIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public makeDiscoveryInstance_args(makeDiscoveryInstance_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetName()) { - this.name = other.name; - } - if (other.isSetPayload()) { - this.payload = org.apache.thrift.TBaseHelper.copyBinary(other.payload); -; - } - this.port = other.port; - } - - public makeDiscoveryInstance_args deepCopy() { - return new makeDiscoveryInstance_args(this); - } - - @Override - public void clear() { - this.name = null; - this.payload = null; - setPortIsSet(false); - this.port = 0; - } - - public String getName() { - return this.name; - } - - public makeDiscoveryInstance_args setName(String name) { - this.name = name; - return this; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public byte[] getPayload() { - setPayload(org.apache.thrift.TBaseHelper.rightSize(payload)); - return payload == null ? null : payload.array(); - } - - public ByteBuffer bufferForPayload() { - return payload; - } - - public makeDiscoveryInstance_args setPayload(byte[] payload) { - setPayload(payload == null ? (ByteBuffer)null : ByteBuffer.wrap(payload)); - return this; - } - - public makeDiscoveryInstance_args setPayload(ByteBuffer payload) { - this.payload = payload; - return this; - } - - public void unsetPayload() { - this.payload = null; - } - - /** Returns true if field payload is set (has been assigned a value) and false otherwise */ - public boolean isSetPayload() { - return this.payload != null; - } - - public void setPayloadIsSet(boolean value) { - if (!value) { - this.payload = null; - } - } - - public int getPort() { - return this.port; - } - - public makeDiscoveryInstance_args setPort(int port) { - this.port = port; - setPortIsSet(true); - return this; - } - - public void unsetPort() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID); - } - - /** Returns true if field port is set (has been assigned a value) and false otherwise */ - public boolean isSetPort() { - return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID); - } - - public void setPortIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case PAYLOAD: - if (value == null) { - unsetPayload(); - } else { - setPayload((ByteBuffer)value); - } - break; - - case PORT: - if (value == null) { - unsetPort(); - } else { - setPort((Integer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case NAME: - return getName(); - - case PAYLOAD: - return getPayload(); - - case PORT: - return Integer.valueOf(getPort()); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case NAME: - return isSetName(); - case PAYLOAD: - return isSetPayload(); - case PORT: - return isSetPort(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof makeDiscoveryInstance_args) - return this.equals((makeDiscoveryInstance_args)that); - return false; - } - - public boolean equals(makeDiscoveryInstance_args that) { - if (that == null) - return false; - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_payload = true && this.isSetPayload(); - boolean that_present_payload = true && that.isSetPayload(); - if (this_present_payload || that_present_payload) { - if (!(this_present_payload && that_present_payload)) - return false; - if (!this.payload.equals(that.payload)) - return false; - } - - boolean this_present_port = true; - boolean that_present_port = true; - if (this_present_port || that_present_port) { - if (!(this_present_port && that_present_port)) - return false; - if (this.port != that.port) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(makeDiscoveryInstance_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPayload()).compareTo(other.isSetPayload()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPayload()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.payload, other.payload); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPort()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("makeDiscoveryInstance_args("); - boolean first = true; - - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("payload:"); - if (this.payload == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.payload, sb); - } - first = false; - if (!first) sb.append(", "); - sb.append("port:"); - sb.append(this.port); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class makeDiscoveryInstance_argsStandardSchemeFactory implements SchemeFactory { - public makeDiscoveryInstance_argsStandardScheme getScheme() { - return new makeDiscoveryInstance_argsStandardScheme(); - } - } - - private static class makeDiscoveryInstance_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, makeDiscoveryInstance_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PAYLOAD - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.payload = iprot.readBinary(); - struct.setPayloadIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // PORT - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.port = iprot.readI32(); - struct.setPortIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, makeDiscoveryInstance_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(struct.name); - oprot.writeFieldEnd(); - } - if (struct.payload != null) { - oprot.writeFieldBegin(PAYLOAD_FIELD_DESC); - oprot.writeBinary(struct.payload); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(PORT_FIELD_DESC); - oprot.writeI32(struct.port); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class makeDiscoveryInstance_argsTupleSchemeFactory implements SchemeFactory { - public makeDiscoveryInstance_argsTupleScheme getScheme() { - return new makeDiscoveryInstance_argsTupleScheme(); - } - } - - private static class makeDiscoveryInstance_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, makeDiscoveryInstance_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetName()) { - optionals.set(0); - } - if (struct.isSetPayload()) { - optionals.set(1); - } - if (struct.isSetPort()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetName()) { - oprot.writeString(struct.name); - } - if (struct.isSetPayload()) { - oprot.writeBinary(struct.payload); - } - if (struct.isSetPort()) { - oprot.writeI32(struct.port); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, makeDiscoveryInstance_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } - if (incoming.get(1)) { - struct.payload = iprot.readBinary(); - struct.setPayloadIsSet(true); - } - if (incoming.get(2)) { - struct.port = iprot.readI32(); - struct.setPortIsSet(true); - } - } - } - - } - - public static class makeDiscoveryInstance_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("makeDiscoveryInstance_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new makeDiscoveryInstance_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new makeDiscoveryInstance_resultTupleSchemeFactory()); - } - - public DiscoveryInstance success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryInstance.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(makeDiscoveryInstance_result.class, metaDataMap); - } - - public makeDiscoveryInstance_result() { - } - - public makeDiscoveryInstance_result( - DiscoveryInstance success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public makeDiscoveryInstance_result(makeDiscoveryInstance_result other) { - if (other.isSetSuccess()) { - this.success = new DiscoveryInstance(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public makeDiscoveryInstance_result deepCopy() { - return new makeDiscoveryInstance_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public DiscoveryInstance getSuccess() { - return this.success; - } - - public makeDiscoveryInstance_result setSuccess(DiscoveryInstance success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public makeDiscoveryInstance_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((DiscoveryInstance)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof makeDiscoveryInstance_result) - return this.equals((makeDiscoveryInstance_result)that); - return false; - } - - public boolean equals(makeDiscoveryInstance_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(makeDiscoveryInstance_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("makeDiscoveryInstance_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class makeDiscoveryInstance_resultStandardSchemeFactory implements SchemeFactory { - public makeDiscoveryInstance_resultStandardScheme getScheme() { - return new makeDiscoveryInstance_resultStandardScheme(); - } - } - - private static class makeDiscoveryInstance_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, makeDiscoveryInstance_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new DiscoveryInstance(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, makeDiscoveryInstance_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class makeDiscoveryInstance_resultTupleSchemeFactory implements SchemeFactory { - public makeDiscoveryInstance_resultTupleScheme getScheme() { - return new makeDiscoveryInstance_resultTupleScheme(); - } - } - - private static class makeDiscoveryInstance_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, makeDiscoveryInstance_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, makeDiscoveryInstance_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new DiscoveryInstance(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class noteError_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("noteError_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField PROVIDER_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("providerProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField INSTANCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("instanceId", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new noteError_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new noteError_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public DiscoveryProviderProjection providerProjection; // required - public String instanceId; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - PROVIDER_PROJECTION((short)2, "providerProjection"), - INSTANCE_ID((short)3, "instanceId"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // PROVIDER_PROJECTION - return PROVIDER_PROJECTION; - case 3: // INSTANCE_ID - return INSTANCE_ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.PROVIDER_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("providerProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryProviderProjection.class))); - tmpMap.put(_Fields.INSTANCE_ID, new org.apache.thrift.meta_data.FieldMetaData("instanceId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(noteError_args.class, metaDataMap); - } - - public noteError_args() { - } - - public noteError_args( - CuratorProjection projection, - DiscoveryProviderProjection providerProjection, - String instanceId) - { - this(); - this.projection = projection; - this.providerProjection = providerProjection; - this.instanceId = instanceId; - } - - /** - * Performs a deep copy on other. - */ - public noteError_args(noteError_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetProviderProjection()) { - this.providerProjection = new DiscoveryProviderProjection(other.providerProjection); - } - if (other.isSetInstanceId()) { - this.instanceId = other.instanceId; - } - } - - public noteError_args deepCopy() { - return new noteError_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.providerProjection = null; - this.instanceId = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public noteError_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public DiscoveryProviderProjection getProviderProjection() { - return this.providerProjection; - } - - public noteError_args setProviderProjection(DiscoveryProviderProjection providerProjection) { - this.providerProjection = providerProjection; - return this; - } - - public void unsetProviderProjection() { - this.providerProjection = null; - } - - /** Returns true if field providerProjection is set (has been assigned a value) and false otherwise */ - public boolean isSetProviderProjection() { - return this.providerProjection != null; - } - - public void setProviderProjectionIsSet(boolean value) { - if (!value) { - this.providerProjection = null; - } - } - - public String getInstanceId() { - return this.instanceId; - } - - public noteError_args setInstanceId(String instanceId) { - this.instanceId = instanceId; - return this; - } - - public void unsetInstanceId() { - this.instanceId = null; - } - - /** Returns true if field instanceId is set (has been assigned a value) and false otherwise */ - public boolean isSetInstanceId() { - return this.instanceId != null; - } - - public void setInstanceIdIsSet(boolean value) { - if (!value) { - this.instanceId = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case PROVIDER_PROJECTION: - if (value == null) { - unsetProviderProjection(); - } else { - setProviderProjection((DiscoveryProviderProjection)value); - } - break; - - case INSTANCE_ID: - if (value == null) { - unsetInstanceId(); - } else { - setInstanceId((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case PROVIDER_PROJECTION: - return getProviderProjection(); - - case INSTANCE_ID: - return getInstanceId(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case PROVIDER_PROJECTION: - return isSetProviderProjection(); - case INSTANCE_ID: - return isSetInstanceId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof noteError_args) - return this.equals((noteError_args)that); - return false; - } - - public boolean equals(noteError_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_providerProjection = true && this.isSetProviderProjection(); - boolean that_present_providerProjection = true && that.isSetProviderProjection(); - if (this_present_providerProjection || that_present_providerProjection) { - if (!(this_present_providerProjection && that_present_providerProjection)) - return false; - if (!this.providerProjection.equals(that.providerProjection)) - return false; - } - - boolean this_present_instanceId = true && this.isSetInstanceId(); - boolean that_present_instanceId = true && that.isSetInstanceId(); - if (this_present_instanceId || that_present_instanceId) { - if (!(this_present_instanceId && that_present_instanceId)) - return false; - if (!this.instanceId.equals(that.instanceId)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(noteError_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetProviderProjection()).compareTo(other.isSetProviderProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProviderProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.providerProjection, other.providerProjection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetInstanceId()).compareTo(other.isSetInstanceId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetInstanceId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.instanceId, other.instanceId); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("noteError_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("providerProjection:"); - if (this.providerProjection == null) { - sb.append("null"); - } else { - sb.append(this.providerProjection); - } - first = false; - if (!first) sb.append(", "); - sb.append("instanceId:"); - if (this.instanceId == null) { - sb.append("null"); - } else { - sb.append(this.instanceId); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (providerProjection != null) { - providerProjection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class noteError_argsStandardSchemeFactory implements SchemeFactory { - public noteError_argsStandardScheme getScheme() { - return new noteError_argsStandardScheme(); - } - } - - private static class noteError_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, noteError_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PROVIDER_PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.providerProjection = new DiscoveryProviderProjection(); - struct.providerProjection.read(iprot); - struct.setProviderProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // INSTANCE_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.instanceId = iprot.readString(); - struct.setInstanceIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, noteError_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.providerProjection != null) { - oprot.writeFieldBegin(PROVIDER_PROJECTION_FIELD_DESC); - struct.providerProjection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.instanceId != null) { - oprot.writeFieldBegin(INSTANCE_ID_FIELD_DESC); - oprot.writeString(struct.instanceId); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class noteError_argsTupleSchemeFactory implements SchemeFactory { - public noteError_argsTupleScheme getScheme() { - return new noteError_argsTupleScheme(); - } - } - - private static class noteError_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, noteError_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetProviderProjection()) { - optionals.set(1); - } - if (struct.isSetInstanceId()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetProviderProjection()) { - struct.providerProjection.write(oprot); - } - if (struct.isSetInstanceId()) { - oprot.writeString(struct.instanceId); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, noteError_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.providerProjection = new DiscoveryProviderProjection(); - struct.providerProjection.read(iprot); - struct.setProviderProjectionIsSet(true); - } - if (incoming.get(2)) { - struct.instanceId = iprot.readString(); - struct.setInstanceIdIsSet(true); - } - } - } - - } - - public static class noteError_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("noteError_result"); - - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new noteError_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new noteError_resultTupleSchemeFactory()); - } - - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(noteError_result.class, metaDataMap); - } - - public noteError_result() { - } - - public noteError_result( - CuratorException ex1) - { - this(); - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public noteError_result(noteError_result other) { - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public noteError_result deepCopy() { - return new noteError_result(this); - } - - @Override - public void clear() { - this.ex1 = null; - } - - public CuratorException getEx1() { - return this.ex1; - } - - public noteError_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof noteError_result) - return this.equals((noteError_result)that); - return false; - } - - public boolean equals(noteError_result that) { - if (that == null) - return false; - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(noteError_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("noteError_result("); - boolean first = true; - - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class noteError_resultStandardSchemeFactory implements SchemeFactory { - public noteError_resultStandardScheme getScheme() { - return new noteError_resultStandardScheme(); - } - } - - private static class noteError_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, noteError_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, noteError_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class noteError_resultTupleSchemeFactory implements SchemeFactory { - public noteError_resultTupleScheme getScheme() { - return new noteError_resultTupleScheme(); - } - } - - private static class noteError_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, noteError_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetEx1()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, noteError_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class startDiscovery_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startDiscovery_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField BASE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("basePath", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField YOUR_INSTANCE_FIELD_DESC = new org.apache.thrift.protocol.TField("yourInstance", org.apache.thrift.protocol.TType.STRUCT, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new startDiscovery_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new startDiscovery_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public String basePath; // required - public DiscoveryInstance yourInstance; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - BASE_PATH((short)2, "basePath"), - YOUR_INSTANCE((short)3, "yourInstance"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // BASE_PATH - return BASE_PATH; - case 3: // YOUR_INSTANCE - return YOUR_INSTANCE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.BASE_PATH, new org.apache.thrift.meta_data.FieldMetaData("basePath", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.YOUR_INSTANCE, new org.apache.thrift.meta_data.FieldMetaData("yourInstance", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryInstance.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startDiscovery_args.class, metaDataMap); - } - - public startDiscovery_args() { - } - - public startDiscovery_args( - CuratorProjection projection, - String basePath, - DiscoveryInstance yourInstance) - { - this(); - this.projection = projection; - this.basePath = basePath; - this.yourInstance = yourInstance; - } - - /** - * Performs a deep copy on other. - */ - public startDiscovery_args(startDiscovery_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetBasePath()) { - this.basePath = other.basePath; - } - if (other.isSetYourInstance()) { - this.yourInstance = new DiscoveryInstance(other.yourInstance); - } - } - - public startDiscovery_args deepCopy() { - return new startDiscovery_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.basePath = null; - this.yourInstance = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public startDiscovery_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public String getBasePath() { - return this.basePath; - } - - public startDiscovery_args setBasePath(String basePath) { - this.basePath = basePath; - return this; - } - - public void unsetBasePath() { - this.basePath = null; - } - - /** Returns true if field basePath is set (has been assigned a value) and false otherwise */ - public boolean isSetBasePath() { - return this.basePath != null; - } - - public void setBasePathIsSet(boolean value) { - if (!value) { - this.basePath = null; - } - } - - public DiscoveryInstance getYourInstance() { - return this.yourInstance; - } - - public startDiscovery_args setYourInstance(DiscoveryInstance yourInstance) { - this.yourInstance = yourInstance; - return this; - } - - public void unsetYourInstance() { - this.yourInstance = null; - } - - /** Returns true if field yourInstance is set (has been assigned a value) and false otherwise */ - public boolean isSetYourInstance() { - return this.yourInstance != null; - } - - public void setYourInstanceIsSet(boolean value) { - if (!value) { - this.yourInstance = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case BASE_PATH: - if (value == null) { - unsetBasePath(); - } else { - setBasePath((String)value); - } - break; - - case YOUR_INSTANCE: - if (value == null) { - unsetYourInstance(); - } else { - setYourInstance((DiscoveryInstance)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case BASE_PATH: - return getBasePath(); - - case YOUR_INSTANCE: - return getYourInstance(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case BASE_PATH: - return isSetBasePath(); - case YOUR_INSTANCE: - return isSetYourInstance(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof startDiscovery_args) - return this.equals((startDiscovery_args)that); - return false; - } - - public boolean equals(startDiscovery_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_basePath = true && this.isSetBasePath(); - boolean that_present_basePath = true && that.isSetBasePath(); - if (this_present_basePath || that_present_basePath) { - if (!(this_present_basePath && that_present_basePath)) - return false; - if (!this.basePath.equals(that.basePath)) - return false; - } - - boolean this_present_yourInstance = true && this.isSetYourInstance(); - boolean that_present_yourInstance = true && that.isSetYourInstance(); - if (this_present_yourInstance || that_present_yourInstance) { - if (!(this_present_yourInstance && that_present_yourInstance)) - return false; - if (!this.yourInstance.equals(that.yourInstance)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(startDiscovery_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetBasePath()).compareTo(other.isSetBasePath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetBasePath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.basePath, other.basePath); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetYourInstance()).compareTo(other.isSetYourInstance()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetYourInstance()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.yourInstance, other.yourInstance); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("startDiscovery_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("basePath:"); - if (this.basePath == null) { - sb.append("null"); - } else { - sb.append(this.basePath); - } - first = false; - if (!first) sb.append(", "); - sb.append("yourInstance:"); - if (this.yourInstance == null) { - sb.append("null"); - } else { - sb.append(this.yourInstance); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (yourInstance != null) { - yourInstance.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class startDiscovery_argsStandardSchemeFactory implements SchemeFactory { - public startDiscovery_argsStandardScheme getScheme() { - return new startDiscovery_argsStandardScheme(); - } - } - - private static class startDiscovery_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, startDiscovery_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // BASE_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.basePath = iprot.readString(); - struct.setBasePathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // YOUR_INSTANCE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.yourInstance = new DiscoveryInstance(); - struct.yourInstance.read(iprot); - struct.setYourInstanceIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, startDiscovery_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.basePath != null) { - oprot.writeFieldBegin(BASE_PATH_FIELD_DESC); - oprot.writeString(struct.basePath); - oprot.writeFieldEnd(); - } - if (struct.yourInstance != null) { - oprot.writeFieldBegin(YOUR_INSTANCE_FIELD_DESC); - struct.yourInstance.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class startDiscovery_argsTupleSchemeFactory implements SchemeFactory { - public startDiscovery_argsTupleScheme getScheme() { - return new startDiscovery_argsTupleScheme(); - } - } - - private static class startDiscovery_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, startDiscovery_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetBasePath()) { - optionals.set(1); - } - if (struct.isSetYourInstance()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetBasePath()) { - oprot.writeString(struct.basePath); - } - if (struct.isSetYourInstance()) { - struct.yourInstance.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, startDiscovery_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.basePath = iprot.readString(); - struct.setBasePathIsSet(true); - } - if (incoming.get(2)) { - struct.yourInstance = new DiscoveryInstance(); - struct.yourInstance.read(iprot); - struct.setYourInstanceIsSet(true); - } - } - } - - } - - public static class startDiscovery_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startDiscovery_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new startDiscovery_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new startDiscovery_resultTupleSchemeFactory()); - } - - public DiscoveryProjection success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryProjection.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startDiscovery_result.class, metaDataMap); - } - - public startDiscovery_result() { - } - - public startDiscovery_result( - DiscoveryProjection success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public startDiscovery_result(startDiscovery_result other) { - if (other.isSetSuccess()) { - this.success = new DiscoveryProjection(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public startDiscovery_result deepCopy() { - return new startDiscovery_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public DiscoveryProjection getSuccess() { - return this.success; - } - - public startDiscovery_result setSuccess(DiscoveryProjection success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public startDiscovery_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((DiscoveryProjection)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof startDiscovery_result) - return this.equals((startDiscovery_result)that); - return false; - } - - public boolean equals(startDiscovery_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(startDiscovery_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("startDiscovery_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class startDiscovery_resultStandardSchemeFactory implements SchemeFactory { - public startDiscovery_resultStandardScheme getScheme() { - return new startDiscovery_resultStandardScheme(); - } - } - - private static class startDiscovery_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, startDiscovery_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new DiscoveryProjection(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, startDiscovery_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class startDiscovery_resultTupleSchemeFactory implements SchemeFactory { - public startDiscovery_resultTupleScheme getScheme() { - return new startDiscovery_resultTupleScheme(); - } - } - - private static class startDiscovery_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, startDiscovery_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, startDiscovery_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new DiscoveryProjection(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class startProvider_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startProvider_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField DISCOVERY_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("discoveryProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField SERVICE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("serviceName", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField PROVIDER_STRATEGY_FIELD_DESC = new org.apache.thrift.protocol.TField("providerStrategy", org.apache.thrift.protocol.TType.I32, (short)4); - private static final org.apache.thrift.protocol.TField DOWN_TIMEOUT_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("downTimeoutMs", org.apache.thrift.protocol.TType.I32, (short)5); - private static final org.apache.thrift.protocol.TField DOWN_ERROR_THRESHOLD_FIELD_DESC = new org.apache.thrift.protocol.TField("downErrorThreshold", org.apache.thrift.protocol.TType.I32, (short)6); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new startProvider_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new startProvider_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public DiscoveryProjection discoveryProjection; // required - public String serviceName; // required - /** - * - * @see ProviderStrategyType - */ - public ProviderStrategyType providerStrategy; // required - public int downTimeoutMs; // required - public int downErrorThreshold; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - DISCOVERY_PROJECTION((short)2, "discoveryProjection"), - SERVICE_NAME((short)3, "serviceName"), - /** - * - * @see ProviderStrategyType - */ - PROVIDER_STRATEGY((short)4, "providerStrategy"), - DOWN_TIMEOUT_MS((short)5, "downTimeoutMs"), - DOWN_ERROR_THRESHOLD((short)6, "downErrorThreshold"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // DISCOVERY_PROJECTION - return DISCOVERY_PROJECTION; - case 3: // SERVICE_NAME - return SERVICE_NAME; - case 4: // PROVIDER_STRATEGY - return PROVIDER_STRATEGY; - case 5: // DOWN_TIMEOUT_MS - return DOWN_TIMEOUT_MS; - case 6: // DOWN_ERROR_THRESHOLD - return DOWN_ERROR_THRESHOLD; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __DOWNTIMEOUTMS_ISSET_ID = 0; - private static final int __DOWNERRORTHRESHOLD_ISSET_ID = 1; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.DISCOVERY_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("discoveryProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryProjection.class))); - tmpMap.put(_Fields.SERVICE_NAME, new org.apache.thrift.meta_data.FieldMetaData("serviceName", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PROVIDER_STRATEGY, new org.apache.thrift.meta_data.FieldMetaData("providerStrategy", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ProviderStrategyType.class))); - tmpMap.put(_Fields.DOWN_TIMEOUT_MS, new org.apache.thrift.meta_data.FieldMetaData("downTimeoutMs", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.DOWN_ERROR_THRESHOLD, new org.apache.thrift.meta_data.FieldMetaData("downErrorThreshold", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startProvider_args.class, metaDataMap); - } - - public startProvider_args() { - } - - public startProvider_args( - CuratorProjection projection, - DiscoveryProjection discoveryProjection, - String serviceName, - ProviderStrategyType providerStrategy, - int downTimeoutMs, - int downErrorThreshold) - { - this(); - this.projection = projection; - this.discoveryProjection = discoveryProjection; - this.serviceName = serviceName; - this.providerStrategy = providerStrategy; - this.downTimeoutMs = downTimeoutMs; - setDownTimeoutMsIsSet(true); - this.downErrorThreshold = downErrorThreshold; - setDownErrorThresholdIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public startProvider_args(startProvider_args other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetDiscoveryProjection()) { - this.discoveryProjection = new DiscoveryProjection(other.discoveryProjection); - } - if (other.isSetServiceName()) { - this.serviceName = other.serviceName; - } - if (other.isSetProviderStrategy()) { - this.providerStrategy = other.providerStrategy; - } - this.downTimeoutMs = other.downTimeoutMs; - this.downErrorThreshold = other.downErrorThreshold; - } - - public startProvider_args deepCopy() { - return new startProvider_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.discoveryProjection = null; - this.serviceName = null; - this.providerStrategy = null; - setDownTimeoutMsIsSet(false); - this.downTimeoutMs = 0; - setDownErrorThresholdIsSet(false); - this.downErrorThreshold = 0; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public startProvider_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public DiscoveryProjection getDiscoveryProjection() { - return this.discoveryProjection; - } - - public startProvider_args setDiscoveryProjection(DiscoveryProjection discoveryProjection) { - this.discoveryProjection = discoveryProjection; - return this; - } - - public void unsetDiscoveryProjection() { - this.discoveryProjection = null; - } - - /** Returns true if field discoveryProjection is set (has been assigned a value) and false otherwise */ - public boolean isSetDiscoveryProjection() { - return this.discoveryProjection != null; - } - - public void setDiscoveryProjectionIsSet(boolean value) { - if (!value) { - this.discoveryProjection = null; - } - } - - public String getServiceName() { - return this.serviceName; - } - - public startProvider_args setServiceName(String serviceName) { - this.serviceName = serviceName; - return this; - } - - public void unsetServiceName() { - this.serviceName = null; - } - - /** Returns true if field serviceName is set (has been assigned a value) and false otherwise */ - public boolean isSetServiceName() { - return this.serviceName != null; - } - - public void setServiceNameIsSet(boolean value) { - if (!value) { - this.serviceName = null; - } - } - - /** - * - * @see ProviderStrategyType - */ - public ProviderStrategyType getProviderStrategy() { - return this.providerStrategy; - } - - /** - * - * @see ProviderStrategyType - */ - public startProvider_args setProviderStrategy(ProviderStrategyType providerStrategy) { - this.providerStrategy = providerStrategy; - return this; - } - - public void unsetProviderStrategy() { - this.providerStrategy = null; - } - - /** Returns true if field providerStrategy is set (has been assigned a value) and false otherwise */ - public boolean isSetProviderStrategy() { - return this.providerStrategy != null; - } - - public void setProviderStrategyIsSet(boolean value) { - if (!value) { - this.providerStrategy = null; - } - } - - public int getDownTimeoutMs() { - return this.downTimeoutMs; - } - - public startProvider_args setDownTimeoutMs(int downTimeoutMs) { - this.downTimeoutMs = downTimeoutMs; - setDownTimeoutMsIsSet(true); - return this; - } - - public void unsetDownTimeoutMs() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DOWNTIMEOUTMS_ISSET_ID); - } - - /** Returns true if field downTimeoutMs is set (has been assigned a value) and false otherwise */ - public boolean isSetDownTimeoutMs() { - return EncodingUtils.testBit(__isset_bitfield, __DOWNTIMEOUTMS_ISSET_ID); - } - - public void setDownTimeoutMsIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DOWNTIMEOUTMS_ISSET_ID, value); - } - - public int getDownErrorThreshold() { - return this.downErrorThreshold; - } - - public startProvider_args setDownErrorThreshold(int downErrorThreshold) { - this.downErrorThreshold = downErrorThreshold; - setDownErrorThresholdIsSet(true); - return this; - } - - public void unsetDownErrorThreshold() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DOWNERRORTHRESHOLD_ISSET_ID); - } - - /** Returns true if field downErrorThreshold is set (has been assigned a value) and false otherwise */ - public boolean isSetDownErrorThreshold() { - return EncodingUtils.testBit(__isset_bitfield, __DOWNERRORTHRESHOLD_ISSET_ID); - } - - public void setDownErrorThresholdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DOWNERRORTHRESHOLD_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case DISCOVERY_PROJECTION: - if (value == null) { - unsetDiscoveryProjection(); - } else { - setDiscoveryProjection((DiscoveryProjection)value); - } - break; - - case SERVICE_NAME: - if (value == null) { - unsetServiceName(); - } else { - setServiceName((String)value); - } - break; - - case PROVIDER_STRATEGY: - if (value == null) { - unsetProviderStrategy(); - } else { - setProviderStrategy((ProviderStrategyType)value); - } - break; - - case DOWN_TIMEOUT_MS: - if (value == null) { - unsetDownTimeoutMs(); - } else { - setDownTimeoutMs((Integer)value); - } - break; - - case DOWN_ERROR_THRESHOLD: - if (value == null) { - unsetDownErrorThreshold(); - } else { - setDownErrorThreshold((Integer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case DISCOVERY_PROJECTION: - return getDiscoveryProjection(); - - case SERVICE_NAME: - return getServiceName(); - - case PROVIDER_STRATEGY: - return getProviderStrategy(); - - case DOWN_TIMEOUT_MS: - return Integer.valueOf(getDownTimeoutMs()); - - case DOWN_ERROR_THRESHOLD: - return Integer.valueOf(getDownErrorThreshold()); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case DISCOVERY_PROJECTION: - return isSetDiscoveryProjection(); - case SERVICE_NAME: - return isSetServiceName(); - case PROVIDER_STRATEGY: - return isSetProviderStrategy(); - case DOWN_TIMEOUT_MS: - return isSetDownTimeoutMs(); - case DOWN_ERROR_THRESHOLD: - return isSetDownErrorThreshold(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof startProvider_args) - return this.equals((startProvider_args)that); - return false; - } - - public boolean equals(startProvider_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_discoveryProjection = true && this.isSetDiscoveryProjection(); - boolean that_present_discoveryProjection = true && that.isSetDiscoveryProjection(); - if (this_present_discoveryProjection || that_present_discoveryProjection) { - if (!(this_present_discoveryProjection && that_present_discoveryProjection)) - return false; - if (!this.discoveryProjection.equals(that.discoveryProjection)) - return false; - } - - boolean this_present_serviceName = true && this.isSetServiceName(); - boolean that_present_serviceName = true && that.isSetServiceName(); - if (this_present_serviceName || that_present_serviceName) { - if (!(this_present_serviceName && that_present_serviceName)) - return false; - if (!this.serviceName.equals(that.serviceName)) - return false; - } - - boolean this_present_providerStrategy = true && this.isSetProviderStrategy(); - boolean that_present_providerStrategy = true && that.isSetProviderStrategy(); - if (this_present_providerStrategy || that_present_providerStrategy) { - if (!(this_present_providerStrategy && that_present_providerStrategy)) - return false; - if (!this.providerStrategy.equals(that.providerStrategy)) - return false; - } - - boolean this_present_downTimeoutMs = true; - boolean that_present_downTimeoutMs = true; - if (this_present_downTimeoutMs || that_present_downTimeoutMs) { - if (!(this_present_downTimeoutMs && that_present_downTimeoutMs)) - return false; - if (this.downTimeoutMs != that.downTimeoutMs) - return false; - } - - boolean this_present_downErrorThreshold = true; - boolean that_present_downErrorThreshold = true; - if (this_present_downErrorThreshold || that_present_downErrorThreshold) { - if (!(this_present_downErrorThreshold && that_present_downErrorThreshold)) - return false; - if (this.downErrorThreshold != that.downErrorThreshold) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(startProvider_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDiscoveryProjection()).compareTo(other.isSetDiscoveryProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDiscoveryProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.discoveryProjection, other.discoveryProjection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetServiceName()).compareTo(other.isSetServiceName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetServiceName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serviceName, other.serviceName); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetProviderStrategy()).compareTo(other.isSetProviderStrategy()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProviderStrategy()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.providerStrategy, other.providerStrategy); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDownTimeoutMs()).compareTo(other.isSetDownTimeoutMs()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDownTimeoutMs()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.downTimeoutMs, other.downTimeoutMs); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDownErrorThreshold()).compareTo(other.isSetDownErrorThreshold()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDownErrorThreshold()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.downErrorThreshold, other.downErrorThreshold); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("startProvider_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("discoveryProjection:"); - if (this.discoveryProjection == null) { - sb.append("null"); - } else { - sb.append(this.discoveryProjection); - } - first = false; - if (!first) sb.append(", "); - sb.append("serviceName:"); - if (this.serviceName == null) { - sb.append("null"); - } else { - sb.append(this.serviceName); - } - first = false; - if (!first) sb.append(", "); - sb.append("providerStrategy:"); - if (this.providerStrategy == null) { - sb.append("null"); - } else { - sb.append(this.providerStrategy); - } - first = false; - if (!first) sb.append(", "); - sb.append("downTimeoutMs:"); - sb.append(this.downTimeoutMs); - first = false; - if (!first) sb.append(", "); - sb.append("downErrorThreshold:"); - sb.append(this.downErrorThreshold); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (discoveryProjection != null) { - discoveryProjection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class startProvider_argsStandardSchemeFactory implements SchemeFactory { - public startProvider_argsStandardScheme getScheme() { - return new startProvider_argsStandardScheme(); - } - } - - private static class startProvider_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, startProvider_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // DISCOVERY_PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.discoveryProjection = new DiscoveryProjection(); - struct.discoveryProjection.read(iprot); - struct.setDiscoveryProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // SERVICE_NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.serviceName = iprot.readString(); - struct.setServiceNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // PROVIDER_STRATEGY - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.providerStrategy = ProviderStrategyType.findByValue(iprot.readI32()); - struct.setProviderStrategyIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // DOWN_TIMEOUT_MS - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.downTimeoutMs = iprot.readI32(); - struct.setDownTimeoutMsIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // DOWN_ERROR_THRESHOLD - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.downErrorThreshold = iprot.readI32(); - struct.setDownErrorThresholdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, startProvider_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.discoveryProjection != null) { - oprot.writeFieldBegin(DISCOVERY_PROJECTION_FIELD_DESC); - struct.discoveryProjection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.serviceName != null) { - oprot.writeFieldBegin(SERVICE_NAME_FIELD_DESC); - oprot.writeString(struct.serviceName); - oprot.writeFieldEnd(); - } - if (struct.providerStrategy != null) { - oprot.writeFieldBegin(PROVIDER_STRATEGY_FIELD_DESC); - oprot.writeI32(struct.providerStrategy.getValue()); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DOWN_TIMEOUT_MS_FIELD_DESC); - oprot.writeI32(struct.downTimeoutMs); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(DOWN_ERROR_THRESHOLD_FIELD_DESC); - oprot.writeI32(struct.downErrorThreshold); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class startProvider_argsTupleSchemeFactory implements SchemeFactory { - public startProvider_argsTupleScheme getScheme() { - return new startProvider_argsTupleScheme(); - } - } - - private static class startProvider_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, startProvider_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetDiscoveryProjection()) { - optionals.set(1); - } - if (struct.isSetServiceName()) { - optionals.set(2); - } - if (struct.isSetProviderStrategy()) { - optionals.set(3); - } - if (struct.isSetDownTimeoutMs()) { - optionals.set(4); - } - if (struct.isSetDownErrorThreshold()) { - optionals.set(5); - } - oprot.writeBitSet(optionals, 6); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetDiscoveryProjection()) { - struct.discoveryProjection.write(oprot); - } - if (struct.isSetServiceName()) { - oprot.writeString(struct.serviceName); - } - if (struct.isSetProviderStrategy()) { - oprot.writeI32(struct.providerStrategy.getValue()); - } - if (struct.isSetDownTimeoutMs()) { - oprot.writeI32(struct.downTimeoutMs); - } - if (struct.isSetDownErrorThreshold()) { - oprot.writeI32(struct.downErrorThreshold); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, startProvider_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(6); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.discoveryProjection = new DiscoveryProjection(); - struct.discoveryProjection.read(iprot); - struct.setDiscoveryProjectionIsSet(true); - } - if (incoming.get(2)) { - struct.serviceName = iprot.readString(); - struct.setServiceNameIsSet(true); - } - if (incoming.get(3)) { - struct.providerStrategy = ProviderStrategyType.findByValue(iprot.readI32()); - struct.setProviderStrategyIsSet(true); - } - if (incoming.get(4)) { - struct.downTimeoutMs = iprot.readI32(); - struct.setDownTimeoutMsIsSet(true); - } - if (incoming.get(5)) { - struct.downErrorThreshold = iprot.readI32(); - struct.setDownErrorThresholdIsSet(true); - } - } - } - - } - - public static class startProvider_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startProvider_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new startProvider_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new startProvider_resultTupleSchemeFactory()); - } - - public DiscoveryProviderProjection success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryProviderProjection.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startProvider_result.class, metaDataMap); - } - - public startProvider_result() { - } - - public startProvider_result( - DiscoveryProviderProjection success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public startProvider_result(startProvider_result other) { - if (other.isSetSuccess()) { - this.success = new DiscoveryProviderProjection(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public startProvider_result deepCopy() { - return new startProvider_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public DiscoveryProviderProjection getSuccess() { - return this.success; - } - - public startProvider_result setSuccess(DiscoveryProviderProjection success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public startProvider_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((DiscoveryProviderProjection)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof startProvider_result) - return this.equals((startProvider_result)that); - return false; - } - - public boolean equals(startProvider_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(startProvider_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("startProvider_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class startProvider_resultStandardSchemeFactory implements SchemeFactory { - public startProvider_resultStandardScheme getScheme() { - return new startProvider_resultStandardScheme(); - } - } - - private static class startProvider_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, startProvider_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new DiscoveryProviderProjection(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, startProvider_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class startProvider_resultTupleSchemeFactory implements SchemeFactory { - public startProvider_resultTupleScheme getScheme() { - return new startProvider_resultTupleScheme(); - } - } - - private static class startProvider_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, startProvider_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, startProvider_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new DiscoveryProviderProjection(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryServiceLowLevel.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryServiceLowLevel.java deleted file mode 100644 index 169192ecf7..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/DiscoveryServiceLowLevel.java +++ /dev/null @@ -1,6966 +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 DiscoveryServiceLowLevel { - - public interface Iface { - - public DiscoveryInstance queryForInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, String id) throws CuratorException, org.apache.thrift.TException; - - public List queryForInstances(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name) throws CuratorException, org.apache.thrift.TException; - - public List queryForNames(CuratorProjection projection, DiscoveryProjection discoveryProjection) throws CuratorException, org.apache.thrift.TException; - - public void registerInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws CuratorException, org.apache.thrift.TException; - - public void unregisterInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws CuratorException, org.apache.thrift.TException; - - public void updateInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws CuratorException, org.apache.thrift.TException; - - } - - public interface AsyncIface { - - public void queryForInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void queryForInstances(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void queryForNames(CuratorProjection projection, DiscoveryProjection discoveryProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void registerInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void unregisterInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - - public void updateInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, 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 { - 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 DiscoveryInstance queryForInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, String id) throws CuratorException, org.apache.thrift.TException - { - send_queryForInstance(projection, discoveryProjection, name, id); - return recv_queryForInstance(); - } - - public void send_queryForInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, String id) throws org.apache.thrift.TException - { - queryForInstance_args args = new queryForInstance_args(); - args.setProjection(projection); - args.setDiscoveryProjection(discoveryProjection); - args.setName(name); - args.setId(id); - sendBase("queryForInstance", args); - } - - public DiscoveryInstance recv_queryForInstance() throws CuratorException, org.apache.thrift.TException - { - queryForInstance_result result = new queryForInstance_result(); - receiveBase(result, "queryForInstance"); - 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, "queryForInstance failed: unknown result"); - } - - public List queryForInstances(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name) throws CuratorException, org.apache.thrift.TException - { - send_queryForInstances(projection, discoveryProjection, name); - return recv_queryForInstances(); - } - - public void send_queryForInstances(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name) throws org.apache.thrift.TException - { - queryForInstances_args args = new queryForInstances_args(); - args.setProjection(projection); - args.setDiscoveryProjection(discoveryProjection); - args.setName(name); - sendBase("queryForInstances", args); - } - - public List recv_queryForInstances() throws CuratorException, org.apache.thrift.TException - { - queryForInstances_result result = new queryForInstances_result(); - receiveBase(result, "queryForInstances"); - 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, "queryForInstances failed: unknown result"); - } - - public List queryForNames(CuratorProjection projection, DiscoveryProjection discoveryProjection) throws CuratorException, org.apache.thrift.TException - { - send_queryForNames(projection, discoveryProjection); - return recv_queryForNames(); - } - - public void send_queryForNames(CuratorProjection projection, DiscoveryProjection discoveryProjection) throws org.apache.thrift.TException - { - queryForNames_args args = new queryForNames_args(); - args.setProjection(projection); - args.setDiscoveryProjection(discoveryProjection); - sendBase("queryForNames", args); - } - - public List recv_queryForNames() throws CuratorException, org.apache.thrift.TException - { - queryForNames_result result = new queryForNames_result(); - receiveBase(result, "queryForNames"); - 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, "queryForNames failed: unknown result"); - } - - public void registerInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws CuratorException, org.apache.thrift.TException - { - send_registerInstance(projection, discoveryProjection, instance); - recv_registerInstance(); - } - - public void send_registerInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws org.apache.thrift.TException - { - registerInstance_args args = new registerInstance_args(); - args.setProjection(projection); - args.setDiscoveryProjection(discoveryProjection); - args.setInstance(instance); - sendBase("registerInstance", args); - } - - public void recv_registerInstance() throws CuratorException, org.apache.thrift.TException - { - registerInstance_result result = new registerInstance_result(); - receiveBase(result, "registerInstance"); - if (result.ex1 != null) { - throw result.ex1; - } - return; - } - - public void unregisterInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws CuratorException, org.apache.thrift.TException - { - send_unregisterInstance(projection, discoveryProjection, instance); - recv_unregisterInstance(); - } - - public void send_unregisterInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws org.apache.thrift.TException - { - unregisterInstance_args args = new unregisterInstance_args(); - args.setProjection(projection); - args.setDiscoveryProjection(discoveryProjection); - args.setInstance(instance); - sendBase("unregisterInstance", args); - } - - public void recv_unregisterInstance() throws CuratorException, org.apache.thrift.TException - { - unregisterInstance_result result = new unregisterInstance_result(); - receiveBase(result, "unregisterInstance"); - if (result.ex1 != null) { - throw result.ex1; - } - return; - } - - public void updateInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws CuratorException, org.apache.thrift.TException - { - send_updateInstance(projection, discoveryProjection, instance); - recv_updateInstance(); - } - - public void send_updateInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance) throws org.apache.thrift.TException - { - updateInstance_args args = new updateInstance_args(); - args.setProjection(projection); - args.setDiscoveryProjection(discoveryProjection); - args.setInstance(instance); - sendBase("updateInstance", args); - } - - public void recv_updateInstance() throws CuratorException, org.apache.thrift.TException - { - updateInstance_result result = new updateInstance_result(); - receiveBase(result, "updateInstance"); - 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 { - 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 queryForInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, String id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - queryForInstance_call method_call = new queryForInstance_call(projection, discoveryProjection, name, id, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class queryForInstance_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private DiscoveryProjection discoveryProjection; - private String name; - private String id; - public queryForInstance_call(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, 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.discoveryProjection = discoveryProjection; - this.name = name; - 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("queryForInstance", org.apache.thrift.protocol.TMessageType.CALL, 0)); - queryForInstance_args args = new queryForInstance_args(); - args.setProjection(projection); - args.setDiscoveryProjection(discoveryProjection); - args.setName(name); - args.setId(id); - args.write(prot); - prot.writeMessageEnd(); - } - - public DiscoveryInstance 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_queryForInstance(); - } - } - - public void queryForInstances(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - queryForInstances_call method_call = new queryForInstances_call(projection, discoveryProjection, name, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class queryForInstances_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private DiscoveryProjection discoveryProjection; - private String name; - public queryForInstances_call(CuratorProjection projection, DiscoveryProjection discoveryProjection, String name, 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.discoveryProjection = discoveryProjection; - this.name = name; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("queryForInstances", org.apache.thrift.protocol.TMessageType.CALL, 0)); - queryForInstances_args args = new queryForInstances_args(); - args.setProjection(projection); - args.setDiscoveryProjection(discoveryProjection); - args.setName(name); - args.write(prot); - prot.writeMessageEnd(); - } - - public List 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_queryForInstances(); - } - } - - public void queryForNames(CuratorProjection projection, DiscoveryProjection discoveryProjection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - queryForNames_call method_call = new queryForNames_call(projection, discoveryProjection, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class queryForNames_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private DiscoveryProjection discoveryProjection; - public queryForNames_call(CuratorProjection projection, DiscoveryProjection discoveryProjection, 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.discoveryProjection = discoveryProjection; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("queryForNames", org.apache.thrift.protocol.TMessageType.CALL, 0)); - queryForNames_args args = new queryForNames_args(); - args.setProjection(projection); - args.setDiscoveryProjection(discoveryProjection); - args.write(prot); - prot.writeMessageEnd(); - } - - public List 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_queryForNames(); - } - } - - public void registerInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - registerInstance_call method_call = new registerInstance_call(projection, discoveryProjection, instance, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class registerInstance_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private DiscoveryProjection discoveryProjection; - private DiscoveryInstance instance; - public registerInstance_call(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, 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.discoveryProjection = discoveryProjection; - this.instance = instance; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerInstance", org.apache.thrift.protocol.TMessageType.CALL, 0)); - registerInstance_args args = new registerInstance_args(); - args.setProjection(projection); - args.setDiscoveryProjection(discoveryProjection); - args.setInstance(instance); - 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_registerInstance(); - } - } - - public void unregisterInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - unregisterInstance_call method_call = new unregisterInstance_call(projection, discoveryProjection, instance, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class unregisterInstance_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private DiscoveryProjection discoveryProjection; - private DiscoveryInstance instance; - public unregisterInstance_call(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, 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.discoveryProjection = discoveryProjection; - this.instance = instance; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unregisterInstance", org.apache.thrift.protocol.TMessageType.CALL, 0)); - unregisterInstance_args args = new unregisterInstance_args(); - args.setProjection(projection); - args.setDiscoveryProjection(discoveryProjection); - args.setInstance(instance); - 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_unregisterInstance(); - } - } - - public void updateInstance(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - updateInstance_call method_call = new updateInstance_call(projection, discoveryProjection, instance, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class updateInstance_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - private DiscoveryProjection discoveryProjection; - private DiscoveryInstance instance; - public updateInstance_call(CuratorProjection projection, DiscoveryProjection discoveryProjection, DiscoveryInstance instance, 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.discoveryProjection = discoveryProjection; - this.instance = instance; - } - - public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { - prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateInstance", org.apache.thrift.protocol.TMessageType.CALL, 0)); - updateInstance_args args = new updateInstance_args(); - args.setProjection(projection); - args.setDiscoveryProjection(discoveryProjection); - args.setInstance(instance); - 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_updateInstance(); - } - } - - } - - public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); - public Processor(I iface) { - super(iface, getProcessMap(new HashMap>())); - } - - protected Processor(I iface, Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static Map> getProcessMap(Map> processMap) { - processMap.put("queryForInstance", new queryForInstance()); - processMap.put("queryForInstances", new queryForInstances()); - processMap.put("queryForNames", new queryForNames()); - processMap.put("registerInstance", new registerInstance()); - processMap.put("unregisterInstance", new unregisterInstance()); - processMap.put("updateInstance", new updateInstance()); - return processMap; - } - - public static class queryForInstance extends org.apache.thrift.ProcessFunction { - public queryForInstance() { - super("queryForInstance"); - } - - public queryForInstance_args getEmptyArgsInstance() { - return new queryForInstance_args(); - } - - protected boolean isOneway() { - return false; - } - - public queryForInstance_result getResult(I iface, queryForInstance_args args) throws org.apache.thrift.TException { - queryForInstance_result result = new queryForInstance_result(); - try { - result.success = iface.queryForInstance(args.projection, args.discoveryProjection, args.name, args.id); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class queryForInstances extends org.apache.thrift.ProcessFunction { - public queryForInstances() { - super("queryForInstances"); - } - - public queryForInstances_args getEmptyArgsInstance() { - return new queryForInstances_args(); - } - - protected boolean isOneway() { - return false; - } - - public queryForInstances_result getResult(I iface, queryForInstances_args args) throws org.apache.thrift.TException { - queryForInstances_result result = new queryForInstances_result(); - try { - result.success = iface.queryForInstances(args.projection, args.discoveryProjection, args.name); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class queryForNames extends org.apache.thrift.ProcessFunction { - public queryForNames() { - super("queryForNames"); - } - - public queryForNames_args getEmptyArgsInstance() { - return new queryForNames_args(); - } - - protected boolean isOneway() { - return false; - } - - public queryForNames_result getResult(I iface, queryForNames_args args) throws org.apache.thrift.TException { - queryForNames_result result = new queryForNames_result(); - try { - result.success = iface.queryForNames(args.projection, args.discoveryProjection); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class registerInstance extends org.apache.thrift.ProcessFunction { - public registerInstance() { - super("registerInstance"); - } - - public registerInstance_args getEmptyArgsInstance() { - return new registerInstance_args(); - } - - protected boolean isOneway() { - return false; - } - - public registerInstance_result getResult(I iface, registerInstance_args args) throws org.apache.thrift.TException { - registerInstance_result result = new registerInstance_result(); - try { - iface.registerInstance(args.projection, args.discoveryProjection, args.instance); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class unregisterInstance extends org.apache.thrift.ProcessFunction { - public unregisterInstance() { - super("unregisterInstance"); - } - - public unregisterInstance_args getEmptyArgsInstance() { - return new unregisterInstance_args(); - } - - protected boolean isOneway() { - return false; - } - - public unregisterInstance_result getResult(I iface, unregisterInstance_args args) throws org.apache.thrift.TException { - unregisterInstance_result result = new unregisterInstance_result(); - try { - iface.unregisterInstance(args.projection, args.discoveryProjection, args.instance); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - public static class updateInstance extends org.apache.thrift.ProcessFunction { - public updateInstance() { - super("updateInstance"); - } - - public updateInstance_args getEmptyArgsInstance() { - return new updateInstance_args(); - } - - protected boolean isOneway() { - return false; - } - - public updateInstance_result getResult(I iface, updateInstance_args args) throws org.apache.thrift.TException { - updateInstance_result result = new updateInstance_result(); - try { - iface.updateInstance(args.projection, args.discoveryProjection, args.instance); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - } - - public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); - public AsyncProcessor(I iface) { - super(iface, getProcessMap(new HashMap>())); - } - - protected AsyncProcessor(I iface, Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static Map> getProcessMap(Map> processMap) { - processMap.put("queryForInstance", new queryForInstance()); - processMap.put("queryForInstances", new queryForInstances()); - processMap.put("queryForNames", new queryForNames()); - processMap.put("registerInstance", new registerInstance()); - processMap.put("unregisterInstance", new unregisterInstance()); - processMap.put("updateInstance", new updateInstance()); - return processMap; - } - - public static class queryForInstance extends org.apache.thrift.AsyncProcessFunction { - public queryForInstance() { - super("queryForInstance"); - } - - public queryForInstance_args getEmptyArgsInstance() { - return new queryForInstance_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(DiscoveryInstance o) { - queryForInstance_result result = new queryForInstance_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - queryForInstance_result result = new queryForInstance_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, queryForInstance_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.queryForInstance(args.projection, args.discoveryProjection, args.name, args.id,resultHandler); - } - } - - public static class queryForInstances extends org.apache.thrift.AsyncProcessFunction> { - public queryForInstances() { - super("queryForInstances"); - } - - public queryForInstances_args getEmptyArgsInstance() { - return new queryForInstances_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - queryForInstances_result result = new queryForInstances_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - queryForInstances_result result = new queryForInstances_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, queryForInstances_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.queryForInstances(args.projection, args.discoveryProjection, args.name,resultHandler); - } - } - - public static class queryForNames extends org.apache.thrift.AsyncProcessFunction> { - public queryForNames() { - super("queryForNames"); - } - - public queryForNames_args getEmptyArgsInstance() { - return new queryForNames_args(); - } - - public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback>() { - public void onComplete(List o) { - queryForNames_result result = new queryForNames_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - queryForNames_result result = new queryForNames_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, queryForNames_args args, org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws TException { - iface.queryForNames(args.projection, args.discoveryProjection,resultHandler); - } - } - - public static class registerInstance extends org.apache.thrift.AsyncProcessFunction { - public registerInstance() { - super("registerInstance"); - } - - public registerInstance_args getEmptyArgsInstance() { - return new registerInstance_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - registerInstance_result result = new registerInstance_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - registerInstance_result result = new registerInstance_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, registerInstance_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.registerInstance(args.projection, args.discoveryProjection, args.instance,resultHandler); - } - } - - public static class unregisterInstance extends org.apache.thrift.AsyncProcessFunction { - public unregisterInstance() { - super("unregisterInstance"); - } - - public unregisterInstance_args getEmptyArgsInstance() { - return new unregisterInstance_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - unregisterInstance_result result = new unregisterInstance_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - unregisterInstance_result result = new unregisterInstance_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, unregisterInstance_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.unregisterInstance(args.projection, args.discoveryProjection, args.instance,resultHandler); - } - } - - public static class updateInstance extends org.apache.thrift.AsyncProcessFunction { - public updateInstance() { - super("updateInstance"); - } - - public updateInstance_args getEmptyArgsInstance() { - return new updateInstance_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(Void o) { - updateInstance_result result = new updateInstance_result(); - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - updateInstance_result result = new updateInstance_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, updateInstance_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.updateInstance(args.projection, args.discoveryProjection, args.instance,resultHandler); - } - } - - } - - public static class queryForInstance_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queryForInstance_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField DISCOVERY_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("discoveryProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new queryForInstance_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new queryForInstance_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public DiscoveryProjection discoveryProjection; // required - public String name; // required - public String id; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - DISCOVERY_PROJECTION((short)2, "discoveryProjection"), - NAME((short)3, "name"), - ID((short)4, "id"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // DISCOVERY_PROJECTION - return DISCOVERY_PROJECTION; - case 3: // NAME - return NAME; - case 4: // ID - return ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.DISCOVERY_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("discoveryProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryProjection.class))); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queryForInstance_args.class, metaDataMap); - } - - public queryForInstance_args() { - } - - public queryForInstance_args( - CuratorProjection projection, - DiscoveryProjection discoveryProjection, - String name, - String id) - { - this(); - this.projection = projection; - this.discoveryProjection = discoveryProjection; - this.name = name; - this.id = id; - } - - /** - * Performs a deep copy on other. - */ - public queryForInstance_args(queryForInstance_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetDiscoveryProjection()) { - this.discoveryProjection = new DiscoveryProjection(other.discoveryProjection); - } - if (other.isSetName()) { - this.name = other.name; - } - if (other.isSetId()) { - this.id = other.id; - } - } - - public queryForInstance_args deepCopy() { - return new queryForInstance_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.discoveryProjection = null; - this.name = null; - this.id = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public queryForInstance_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public DiscoveryProjection getDiscoveryProjection() { - return this.discoveryProjection; - } - - public queryForInstance_args setDiscoveryProjection(DiscoveryProjection discoveryProjection) { - this.discoveryProjection = discoveryProjection; - return this; - } - - public void unsetDiscoveryProjection() { - this.discoveryProjection = null; - } - - /** Returns true if field discoveryProjection is set (has been assigned a value) and false otherwise */ - public boolean isSetDiscoveryProjection() { - return this.discoveryProjection != null; - } - - public void setDiscoveryProjectionIsSet(boolean value) { - if (!value) { - this.discoveryProjection = null; - } - } - - public String getName() { - return this.name; - } - - public queryForInstance_args setName(String name) { - this.name = name; - return this; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public String getId() { - return this.id; - } - - public queryForInstance_args setId(String id) { - this.id = id; - return this; - } - - public void unsetId() { - this.id = null; - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return this.id != null; - } - - public void setIdIsSet(boolean value) { - if (!value) { - this.id = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case DISCOVERY_PROJECTION: - if (value == null) { - unsetDiscoveryProjection(); - } else { - setDiscoveryProjection((DiscoveryProjection)value); - } - break; - - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case ID: - if (value == null) { - unsetId(); - } else { - setId((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case DISCOVERY_PROJECTION: - return getDiscoveryProjection(); - - case NAME: - return getName(); - - case ID: - return getId(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case DISCOVERY_PROJECTION: - return isSetDiscoveryProjection(); - case NAME: - return isSetName(); - case ID: - return isSetId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof queryForInstance_args) - return this.equals((queryForInstance_args)that); - return false; - } - - public boolean equals(queryForInstance_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_discoveryProjection = true && this.isSetDiscoveryProjection(); - boolean that_present_discoveryProjection = true && that.isSetDiscoveryProjection(); - if (this_present_discoveryProjection || that_present_discoveryProjection) { - if (!(this_present_discoveryProjection && that_present_discoveryProjection)) - return false; - if (!this.discoveryProjection.equals(that.discoveryProjection)) - return false; - } - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (!this.id.equals(that.id)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(queryForInstance_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDiscoveryProjection()).compareTo(other.isSetDiscoveryProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDiscoveryProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.discoveryProjection, other.discoveryProjection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("queryForInstance_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("discoveryProjection:"); - if (this.discoveryProjection == null) { - sb.append("null"); - } else { - sb.append(this.discoveryProjection); - } - first = false; - if (!first) sb.append(", "); - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - if (!first) sb.append(", "); - sb.append("id:"); - if (this.id == null) { - sb.append("null"); - } else { - sb.append(this.id); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (discoveryProjection != null) { - discoveryProjection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class queryForInstance_argsStandardSchemeFactory implements SchemeFactory { - public queryForInstance_argsStandardScheme getScheme() { - return new queryForInstance_argsStandardScheme(); - } - } - - private static class queryForInstance_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, queryForInstance_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // DISCOVERY_PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.discoveryProjection = new DiscoveryProjection(); - struct.discoveryProjection.read(iprot); - struct.setDiscoveryProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, queryForInstance_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.discoveryProjection != null) { - oprot.writeFieldBegin(DISCOVERY_PROJECTION_FIELD_DESC); - struct.discoveryProjection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(struct.name); - oprot.writeFieldEnd(); - } - if (struct.id != null) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeString(struct.id); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class queryForInstance_argsTupleSchemeFactory implements SchemeFactory { - public queryForInstance_argsTupleScheme getScheme() { - return new queryForInstance_argsTupleScheme(); - } - } - - private static class queryForInstance_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, queryForInstance_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetDiscoveryProjection()) { - optionals.set(1); - } - if (struct.isSetName()) { - optionals.set(2); - } - if (struct.isSetId()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetDiscoveryProjection()) { - struct.discoveryProjection.write(oprot); - } - if (struct.isSetName()) { - oprot.writeString(struct.name); - } - if (struct.isSetId()) { - oprot.writeString(struct.id); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, queryForInstance_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.discoveryProjection = new DiscoveryProjection(); - struct.discoveryProjection.read(iprot); - struct.setDiscoveryProjectionIsSet(true); - } - if (incoming.get(2)) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } - if (incoming.get(3)) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } - } - } - - } - - public static class queryForInstance_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queryForInstance_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new queryForInstance_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new queryForInstance_resultTupleSchemeFactory()); - } - - public DiscoveryInstance success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryInstance.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queryForInstance_result.class, metaDataMap); - } - - public queryForInstance_result() { - } - - public queryForInstance_result( - DiscoveryInstance success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public queryForInstance_result(queryForInstance_result other) { - if (other.isSetSuccess()) { - this.success = new DiscoveryInstance(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public queryForInstance_result deepCopy() { - return new queryForInstance_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public DiscoveryInstance getSuccess() { - return this.success; - } - - public queryForInstance_result setSuccess(DiscoveryInstance success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public queryForInstance_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((DiscoveryInstance)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof queryForInstance_result) - return this.equals((queryForInstance_result)that); - return false; - } - - public boolean equals(queryForInstance_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(queryForInstance_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("queryForInstance_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class queryForInstance_resultStandardSchemeFactory implements SchemeFactory { - public queryForInstance_resultStandardScheme getScheme() { - return new queryForInstance_resultStandardScheme(); - } - } - - private static class queryForInstance_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, queryForInstance_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new DiscoveryInstance(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, queryForInstance_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class queryForInstance_resultTupleSchemeFactory implements SchemeFactory { - public queryForInstance_resultTupleScheme getScheme() { - return new queryForInstance_resultTupleScheme(); - } - } - - private static class queryForInstance_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, queryForInstance_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, queryForInstance_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new DiscoveryInstance(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class queryForInstances_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queryForInstances_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField DISCOVERY_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("discoveryProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new queryForInstances_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new queryForInstances_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public DiscoveryProjection discoveryProjection; // required - public String name; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - DISCOVERY_PROJECTION((short)2, "discoveryProjection"), - NAME((short)3, "name"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // DISCOVERY_PROJECTION - return DISCOVERY_PROJECTION; - case 3: // NAME - return NAME; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.DISCOVERY_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("discoveryProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryProjection.class))); - tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queryForInstances_args.class, metaDataMap); - } - - public queryForInstances_args() { - } - - public queryForInstances_args( - CuratorProjection projection, - DiscoveryProjection discoveryProjection, - String name) - { - this(); - this.projection = projection; - this.discoveryProjection = discoveryProjection; - this.name = name; - } - - /** - * Performs a deep copy on other. - */ - public queryForInstances_args(queryForInstances_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetDiscoveryProjection()) { - this.discoveryProjection = new DiscoveryProjection(other.discoveryProjection); - } - if (other.isSetName()) { - this.name = other.name; - } - } - - public queryForInstances_args deepCopy() { - return new queryForInstances_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.discoveryProjection = null; - this.name = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public queryForInstances_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public DiscoveryProjection getDiscoveryProjection() { - return this.discoveryProjection; - } - - public queryForInstances_args setDiscoveryProjection(DiscoveryProjection discoveryProjection) { - this.discoveryProjection = discoveryProjection; - return this; - } - - public void unsetDiscoveryProjection() { - this.discoveryProjection = null; - } - - /** Returns true if field discoveryProjection is set (has been assigned a value) and false otherwise */ - public boolean isSetDiscoveryProjection() { - return this.discoveryProjection != null; - } - - public void setDiscoveryProjectionIsSet(boolean value) { - if (!value) { - this.discoveryProjection = null; - } - } - - public String getName() { - return this.name; - } - - public queryForInstances_args setName(String name) { - this.name = name; - return this; - } - - public void unsetName() { - this.name = null; - } - - /** Returns true if field name is set (has been assigned a value) and false otherwise */ - public boolean isSetName() { - return this.name != null; - } - - public void setNameIsSet(boolean value) { - if (!value) { - this.name = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case DISCOVERY_PROJECTION: - if (value == null) { - unsetDiscoveryProjection(); - } else { - setDiscoveryProjection((DiscoveryProjection)value); - } - break; - - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case DISCOVERY_PROJECTION: - return getDiscoveryProjection(); - - case NAME: - return getName(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case DISCOVERY_PROJECTION: - return isSetDiscoveryProjection(); - case NAME: - return isSetName(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof queryForInstances_args) - return this.equals((queryForInstances_args)that); - return false; - } - - public boolean equals(queryForInstances_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_discoveryProjection = true && this.isSetDiscoveryProjection(); - boolean that_present_discoveryProjection = true && that.isSetDiscoveryProjection(); - if (this_present_discoveryProjection || that_present_discoveryProjection) { - if (!(this_present_discoveryProjection && that_present_discoveryProjection)) - return false; - if (!this.discoveryProjection.equals(that.discoveryProjection)) - return false; - } - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(queryForInstances_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDiscoveryProjection()).compareTo(other.isSetDiscoveryProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDiscoveryProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.discoveryProjection, other.discoveryProjection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("queryForInstances_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("discoveryProjection:"); - if (this.discoveryProjection == null) { - sb.append("null"); - } else { - sb.append(this.discoveryProjection); - } - first = false; - if (!first) sb.append(", "); - sb.append("name:"); - if (this.name == null) { - sb.append("null"); - } else { - sb.append(this.name); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (discoveryProjection != null) { - discoveryProjection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class queryForInstances_argsStandardSchemeFactory implements SchemeFactory { - public queryForInstances_argsStandardScheme getScheme() { - return new queryForInstances_argsStandardScheme(); - } - } - - private static class queryForInstances_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, queryForInstances_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // DISCOVERY_PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.discoveryProjection = new DiscoveryProjection(); - struct.discoveryProjection.read(iprot); - struct.setDiscoveryProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // NAME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, queryForInstances_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.discoveryProjection != null) { - oprot.writeFieldBegin(DISCOVERY_PROJECTION_FIELD_DESC); - struct.discoveryProjection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(struct.name); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class queryForInstances_argsTupleSchemeFactory implements SchemeFactory { - public queryForInstances_argsTupleScheme getScheme() { - return new queryForInstances_argsTupleScheme(); - } - } - - private static class queryForInstances_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, queryForInstances_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetDiscoveryProjection()) { - optionals.set(1); - } - if (struct.isSetName()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetDiscoveryProjection()) { - struct.discoveryProjection.write(oprot); - } - if (struct.isSetName()) { - oprot.writeString(struct.name); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, queryForInstances_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.discoveryProjection = new DiscoveryProjection(); - struct.discoveryProjection.read(iprot); - struct.setDiscoveryProjectionIsSet(true); - } - if (incoming.get(2)) { - struct.name = iprot.readString(); - struct.setNameIsSet(true); - } - } - } - - } - - public static class queryForInstances_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queryForInstances_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new queryForInstances_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new queryForInstances_resultTupleSchemeFactory()); - } - - public List success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryInstance.class)))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queryForInstances_result.class, metaDataMap); - } - - public queryForInstances_result() { - } - - public queryForInstances_result( - List success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public queryForInstances_result(queryForInstances_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success.size()); - for (DiscoveryInstance other_element : other.success) { - __this__success.add(new DiscoveryInstance(other_element)); - } - this.success = __this__success; - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public queryForInstances_result deepCopy() { - return new queryForInstances_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(DiscoveryInstance elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public queryForInstances_result setSuccess(List success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public queryForInstances_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof queryForInstances_result) - return this.equals((queryForInstances_result)that); - return false; - } - - public boolean equals(queryForInstances_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(queryForInstances_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("queryForInstances_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class queryForInstances_resultStandardSchemeFactory implements SchemeFactory { - public queryForInstances_resultStandardScheme getScheme() { - return new queryForInstances_resultStandardScheme(); - } - } - - private static class queryForInstances_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, queryForInstances_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list56 = iprot.readListBegin(); - struct.success = new ArrayList(_list56.size); - for (int _i57 = 0; _i57 < _list56.size; ++_i57) - { - DiscoveryInstance _elem58; - _elem58 = new DiscoveryInstance(); - _elem58.read(iprot); - struct.success.add(_elem58); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, queryForInstances_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (DiscoveryInstance _iter59 : struct.success) - { - _iter59.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class queryForInstances_resultTupleSchemeFactory implements SchemeFactory { - public queryForInstances_resultTupleScheme getScheme() { - return new queryForInstances_resultTupleScheme(); - } - } - - private static class queryForInstances_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, queryForInstances_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (DiscoveryInstance _iter60 : struct.success) - { - _iter60.write(oprot); - } - } - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, queryForInstances_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list61 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list61.size); - for (int _i62 = 0; _i62 < _list61.size; ++_i62) - { - DiscoveryInstance _elem63; - _elem63 = new DiscoveryInstance(); - _elem63.read(iprot); - struct.success.add(_elem63); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class queryForNames_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queryForNames_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField DISCOVERY_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("discoveryProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new queryForNames_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new queryForNames_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public DiscoveryProjection discoveryProjection; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - DISCOVERY_PROJECTION((short)2, "discoveryProjection"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // DISCOVERY_PROJECTION - return DISCOVERY_PROJECTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.DISCOVERY_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("discoveryProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryProjection.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queryForNames_args.class, metaDataMap); - } - - public queryForNames_args() { - } - - public queryForNames_args( - CuratorProjection projection, - DiscoveryProjection discoveryProjection) - { - this(); - this.projection = projection; - this.discoveryProjection = discoveryProjection; - } - - /** - * Performs a deep copy on other. - */ - public queryForNames_args(queryForNames_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetDiscoveryProjection()) { - this.discoveryProjection = new DiscoveryProjection(other.discoveryProjection); - } - } - - public queryForNames_args deepCopy() { - return new queryForNames_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.discoveryProjection = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public queryForNames_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public DiscoveryProjection getDiscoveryProjection() { - return this.discoveryProjection; - } - - public queryForNames_args setDiscoveryProjection(DiscoveryProjection discoveryProjection) { - this.discoveryProjection = discoveryProjection; - return this; - } - - public void unsetDiscoveryProjection() { - this.discoveryProjection = null; - } - - /** Returns true if field discoveryProjection is set (has been assigned a value) and false otherwise */ - public boolean isSetDiscoveryProjection() { - return this.discoveryProjection != null; - } - - public void setDiscoveryProjectionIsSet(boolean value) { - if (!value) { - this.discoveryProjection = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case DISCOVERY_PROJECTION: - if (value == null) { - unsetDiscoveryProjection(); - } else { - setDiscoveryProjection((DiscoveryProjection)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case DISCOVERY_PROJECTION: - return getDiscoveryProjection(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case DISCOVERY_PROJECTION: - return isSetDiscoveryProjection(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof queryForNames_args) - return this.equals((queryForNames_args)that); - return false; - } - - public boolean equals(queryForNames_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_discoveryProjection = true && this.isSetDiscoveryProjection(); - boolean that_present_discoveryProjection = true && that.isSetDiscoveryProjection(); - if (this_present_discoveryProjection || that_present_discoveryProjection) { - if (!(this_present_discoveryProjection && that_present_discoveryProjection)) - return false; - if (!this.discoveryProjection.equals(that.discoveryProjection)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(queryForNames_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDiscoveryProjection()).compareTo(other.isSetDiscoveryProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDiscoveryProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.discoveryProjection, other.discoveryProjection); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("queryForNames_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("discoveryProjection:"); - if (this.discoveryProjection == null) { - sb.append("null"); - } else { - sb.append(this.discoveryProjection); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (discoveryProjection != null) { - discoveryProjection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class queryForNames_argsStandardSchemeFactory implements SchemeFactory { - public queryForNames_argsStandardScheme getScheme() { - return new queryForNames_argsStandardScheme(); - } - } - - private static class queryForNames_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, queryForNames_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // DISCOVERY_PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.discoveryProjection = new DiscoveryProjection(); - struct.discoveryProjection.read(iprot); - struct.setDiscoveryProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, queryForNames_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.discoveryProjection != null) { - oprot.writeFieldBegin(DISCOVERY_PROJECTION_FIELD_DESC); - struct.discoveryProjection.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class queryForNames_argsTupleSchemeFactory implements SchemeFactory { - public queryForNames_argsTupleScheme getScheme() { - return new queryForNames_argsTupleScheme(); - } - } - - private static class queryForNames_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, queryForNames_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetDiscoveryProjection()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetDiscoveryProjection()) { - struct.discoveryProjection.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, queryForNames_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.discoveryProjection = new DiscoveryProjection(); - struct.discoveryProjection.read(iprot); - struct.setDiscoveryProjectionIsSet(true); - } - } - } - - } - - public static class queryForNames_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queryForNames_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new queryForNames_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new queryForNames_resultTupleSchemeFactory()); - } - - public List success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queryForNames_result.class, metaDataMap); - } - - public queryForNames_result() { - } - - public queryForNames_result( - List success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public queryForNames_result(queryForNames_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(other.success); - this.success = __this__success; - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public queryForNames_result deepCopy() { - return new queryForNames_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); - } - - public List getSuccess() { - return this.success; - } - - public queryForNames_result setSuccess(List success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public queryForNames_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof queryForNames_result) - return this.equals((queryForNames_result)that); - return false; - } - - public boolean equals(queryForNames_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(queryForNames_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("queryForNames_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class queryForNames_resultStandardSchemeFactory implements SchemeFactory { - public queryForNames_resultStandardScheme getScheme() { - return new queryForNames_resultStandardScheme(); - } - } - - private static class queryForNames_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, queryForNames_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list64 = iprot.readListBegin(); - struct.success = new ArrayList(_list64.size); - for (int _i65 = 0; _i65 < _list64.size; ++_i65) - { - String _elem66; - _elem66 = iprot.readString(); - struct.success.add(_elem66); - } - iprot.readListEnd(); - } - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, queryForNames_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); - for (String _iter67 : struct.success) - { - oprot.writeString(_iter67); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class queryForNames_resultTupleSchemeFactory implements SchemeFactory { - public queryForNames_resultTupleScheme getScheme() { - return new queryForNames_resultTupleScheme(); - } - } - - private static class queryForNames_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, queryForNames_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - { - oprot.writeI32(struct.success.size()); - for (String _iter68 : struct.success) - { - oprot.writeString(_iter68); - } - } - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, queryForNames_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list69 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list69.size); - for (int _i70 = 0; _i70 < _list69.size; ++_i70) - { - String _elem71; - _elem71 = iprot.readString(); - struct.success.add(_elem71); - } - } - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class registerInstance_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerInstance_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField DISCOVERY_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("discoveryProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField INSTANCE_FIELD_DESC = new org.apache.thrift.protocol.TField("instance", org.apache.thrift.protocol.TType.STRUCT, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new registerInstance_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new registerInstance_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public DiscoveryProjection discoveryProjection; // required - public DiscoveryInstance instance; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - DISCOVERY_PROJECTION((short)2, "discoveryProjection"), - INSTANCE((short)3, "instance"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // DISCOVERY_PROJECTION - return DISCOVERY_PROJECTION; - case 3: // INSTANCE - return INSTANCE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.DISCOVERY_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("discoveryProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryProjection.class))); - tmpMap.put(_Fields.INSTANCE, new org.apache.thrift.meta_data.FieldMetaData("instance", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryInstance.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerInstance_args.class, metaDataMap); - } - - public registerInstance_args() { - } - - public registerInstance_args( - CuratorProjection projection, - DiscoveryProjection discoveryProjection, - DiscoveryInstance instance) - { - this(); - this.projection = projection; - this.discoveryProjection = discoveryProjection; - this.instance = instance; - } - - /** - * Performs a deep copy on other. - */ - public registerInstance_args(registerInstance_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetDiscoveryProjection()) { - this.discoveryProjection = new DiscoveryProjection(other.discoveryProjection); - } - if (other.isSetInstance()) { - this.instance = new DiscoveryInstance(other.instance); - } - } - - public registerInstance_args deepCopy() { - return new registerInstance_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.discoveryProjection = null; - this.instance = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public registerInstance_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public DiscoveryProjection getDiscoveryProjection() { - return this.discoveryProjection; - } - - public registerInstance_args setDiscoveryProjection(DiscoveryProjection discoveryProjection) { - this.discoveryProjection = discoveryProjection; - return this; - } - - public void unsetDiscoveryProjection() { - this.discoveryProjection = null; - } - - /** Returns true if field discoveryProjection is set (has been assigned a value) and false otherwise */ - public boolean isSetDiscoveryProjection() { - return this.discoveryProjection != null; - } - - public void setDiscoveryProjectionIsSet(boolean value) { - if (!value) { - this.discoveryProjection = null; - } - } - - public DiscoveryInstance getInstance() { - return this.instance; - } - - public registerInstance_args setInstance(DiscoveryInstance instance) { - this.instance = instance; - return this; - } - - public void unsetInstance() { - this.instance = null; - } - - /** Returns true if field instance is set (has been assigned a value) and false otherwise */ - public boolean isSetInstance() { - return this.instance != null; - } - - public void setInstanceIsSet(boolean value) { - if (!value) { - this.instance = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case DISCOVERY_PROJECTION: - if (value == null) { - unsetDiscoveryProjection(); - } else { - setDiscoveryProjection((DiscoveryProjection)value); - } - break; - - case INSTANCE: - if (value == null) { - unsetInstance(); - } else { - setInstance((DiscoveryInstance)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case DISCOVERY_PROJECTION: - return getDiscoveryProjection(); - - case INSTANCE: - return getInstance(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case DISCOVERY_PROJECTION: - return isSetDiscoveryProjection(); - case INSTANCE: - return isSetInstance(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof registerInstance_args) - return this.equals((registerInstance_args)that); - return false; - } - - public boolean equals(registerInstance_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_discoveryProjection = true && this.isSetDiscoveryProjection(); - boolean that_present_discoveryProjection = true && that.isSetDiscoveryProjection(); - if (this_present_discoveryProjection || that_present_discoveryProjection) { - if (!(this_present_discoveryProjection && that_present_discoveryProjection)) - return false; - if (!this.discoveryProjection.equals(that.discoveryProjection)) - return false; - } - - boolean this_present_instance = true && this.isSetInstance(); - boolean that_present_instance = true && that.isSetInstance(); - if (this_present_instance || that_present_instance) { - if (!(this_present_instance && that_present_instance)) - return false; - if (!this.instance.equals(that.instance)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(registerInstance_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDiscoveryProjection()).compareTo(other.isSetDiscoveryProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDiscoveryProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.discoveryProjection, other.discoveryProjection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetInstance()).compareTo(other.isSetInstance()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetInstance()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.instance, other.instance); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("registerInstance_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("discoveryProjection:"); - if (this.discoveryProjection == null) { - sb.append("null"); - } else { - sb.append(this.discoveryProjection); - } - first = false; - if (!first) sb.append(", "); - sb.append("instance:"); - if (this.instance == null) { - sb.append("null"); - } else { - sb.append(this.instance); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (discoveryProjection != null) { - discoveryProjection.validate(); - } - if (instance != null) { - instance.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class registerInstance_argsStandardSchemeFactory implements SchemeFactory { - public registerInstance_argsStandardScheme getScheme() { - return new registerInstance_argsStandardScheme(); - } - } - - private static class registerInstance_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, registerInstance_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // DISCOVERY_PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.discoveryProjection = new DiscoveryProjection(); - struct.discoveryProjection.read(iprot); - struct.setDiscoveryProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // INSTANCE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.instance = new DiscoveryInstance(); - struct.instance.read(iprot); - struct.setInstanceIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, registerInstance_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.discoveryProjection != null) { - oprot.writeFieldBegin(DISCOVERY_PROJECTION_FIELD_DESC); - struct.discoveryProjection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.instance != null) { - oprot.writeFieldBegin(INSTANCE_FIELD_DESC); - struct.instance.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class registerInstance_argsTupleSchemeFactory implements SchemeFactory { - public registerInstance_argsTupleScheme getScheme() { - return new registerInstance_argsTupleScheme(); - } - } - - private static class registerInstance_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, registerInstance_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetDiscoveryProjection()) { - optionals.set(1); - } - if (struct.isSetInstance()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetDiscoveryProjection()) { - struct.discoveryProjection.write(oprot); - } - if (struct.isSetInstance()) { - struct.instance.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, registerInstance_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.discoveryProjection = new DiscoveryProjection(); - struct.discoveryProjection.read(iprot); - struct.setDiscoveryProjectionIsSet(true); - } - if (incoming.get(2)) { - struct.instance = new DiscoveryInstance(); - struct.instance.read(iprot); - struct.setInstanceIsSet(true); - } - } - } - - } - - public static class registerInstance_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerInstance_result"); - - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new registerInstance_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new registerInstance_resultTupleSchemeFactory()); - } - - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerInstance_result.class, metaDataMap); - } - - public registerInstance_result() { - } - - public registerInstance_result( - CuratorException ex1) - { - this(); - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public registerInstance_result(registerInstance_result other) { - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public registerInstance_result deepCopy() { - return new registerInstance_result(this); - } - - @Override - public void clear() { - this.ex1 = null; - } - - public CuratorException getEx1() { - return this.ex1; - } - - public registerInstance_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof registerInstance_result) - return this.equals((registerInstance_result)that); - return false; - } - - public boolean equals(registerInstance_result that) { - if (that == null) - return false; - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(registerInstance_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("registerInstance_result("); - boolean first = true; - - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class registerInstance_resultStandardSchemeFactory implements SchemeFactory { - public registerInstance_resultStandardScheme getScheme() { - return new registerInstance_resultStandardScheme(); - } - } - - private static class registerInstance_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, registerInstance_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, registerInstance_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class registerInstance_resultTupleSchemeFactory implements SchemeFactory { - public registerInstance_resultTupleScheme getScheme() { - return new registerInstance_resultTupleScheme(); - } - } - - private static class registerInstance_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, registerInstance_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetEx1()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, registerInstance_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class unregisterInstance_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unregisterInstance_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField DISCOVERY_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("discoveryProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField INSTANCE_FIELD_DESC = new org.apache.thrift.protocol.TField("instance", org.apache.thrift.protocol.TType.STRUCT, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new unregisterInstance_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new unregisterInstance_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public DiscoveryProjection discoveryProjection; // required - public DiscoveryInstance instance; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - DISCOVERY_PROJECTION((short)2, "discoveryProjection"), - INSTANCE((short)3, "instance"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // DISCOVERY_PROJECTION - return DISCOVERY_PROJECTION; - case 3: // INSTANCE - return INSTANCE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.DISCOVERY_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("discoveryProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryProjection.class))); - tmpMap.put(_Fields.INSTANCE, new org.apache.thrift.meta_data.FieldMetaData("instance", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryInstance.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unregisterInstance_args.class, metaDataMap); - } - - public unregisterInstance_args() { - } - - public unregisterInstance_args( - CuratorProjection projection, - DiscoveryProjection discoveryProjection, - DiscoveryInstance instance) - { - this(); - this.projection = projection; - this.discoveryProjection = discoveryProjection; - this.instance = instance; - } - - /** - * Performs a deep copy on other. - */ - public unregisterInstance_args(unregisterInstance_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetDiscoveryProjection()) { - this.discoveryProjection = new DiscoveryProjection(other.discoveryProjection); - } - if (other.isSetInstance()) { - this.instance = new DiscoveryInstance(other.instance); - } - } - - public unregisterInstance_args deepCopy() { - return new unregisterInstance_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.discoveryProjection = null; - this.instance = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public unregisterInstance_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public DiscoveryProjection getDiscoveryProjection() { - return this.discoveryProjection; - } - - public unregisterInstance_args setDiscoveryProjection(DiscoveryProjection discoveryProjection) { - this.discoveryProjection = discoveryProjection; - return this; - } - - public void unsetDiscoveryProjection() { - this.discoveryProjection = null; - } - - /** Returns true if field discoveryProjection is set (has been assigned a value) and false otherwise */ - public boolean isSetDiscoveryProjection() { - return this.discoveryProjection != null; - } - - public void setDiscoveryProjectionIsSet(boolean value) { - if (!value) { - this.discoveryProjection = null; - } - } - - public DiscoveryInstance getInstance() { - return this.instance; - } - - public unregisterInstance_args setInstance(DiscoveryInstance instance) { - this.instance = instance; - return this; - } - - public void unsetInstance() { - this.instance = null; - } - - /** Returns true if field instance is set (has been assigned a value) and false otherwise */ - public boolean isSetInstance() { - return this.instance != null; - } - - public void setInstanceIsSet(boolean value) { - if (!value) { - this.instance = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case DISCOVERY_PROJECTION: - if (value == null) { - unsetDiscoveryProjection(); - } else { - setDiscoveryProjection((DiscoveryProjection)value); - } - break; - - case INSTANCE: - if (value == null) { - unsetInstance(); - } else { - setInstance((DiscoveryInstance)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case DISCOVERY_PROJECTION: - return getDiscoveryProjection(); - - case INSTANCE: - return getInstance(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case DISCOVERY_PROJECTION: - return isSetDiscoveryProjection(); - case INSTANCE: - return isSetInstance(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof unregisterInstance_args) - return this.equals((unregisterInstance_args)that); - return false; - } - - public boolean equals(unregisterInstance_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_discoveryProjection = true && this.isSetDiscoveryProjection(); - boolean that_present_discoveryProjection = true && that.isSetDiscoveryProjection(); - if (this_present_discoveryProjection || that_present_discoveryProjection) { - if (!(this_present_discoveryProjection && that_present_discoveryProjection)) - return false; - if (!this.discoveryProjection.equals(that.discoveryProjection)) - return false; - } - - boolean this_present_instance = true && this.isSetInstance(); - boolean that_present_instance = true && that.isSetInstance(); - if (this_present_instance || that_present_instance) { - if (!(this_present_instance && that_present_instance)) - return false; - if (!this.instance.equals(that.instance)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(unregisterInstance_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDiscoveryProjection()).compareTo(other.isSetDiscoveryProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDiscoveryProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.discoveryProjection, other.discoveryProjection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetInstance()).compareTo(other.isSetInstance()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetInstance()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.instance, other.instance); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("unregisterInstance_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("discoveryProjection:"); - if (this.discoveryProjection == null) { - sb.append("null"); - } else { - sb.append(this.discoveryProjection); - } - first = false; - if (!first) sb.append(", "); - sb.append("instance:"); - if (this.instance == null) { - sb.append("null"); - } else { - sb.append(this.instance); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (discoveryProjection != null) { - discoveryProjection.validate(); - } - if (instance != null) { - instance.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class unregisterInstance_argsStandardSchemeFactory implements SchemeFactory { - public unregisterInstance_argsStandardScheme getScheme() { - return new unregisterInstance_argsStandardScheme(); - } - } - - private static class unregisterInstance_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, unregisterInstance_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // DISCOVERY_PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.discoveryProjection = new DiscoveryProjection(); - struct.discoveryProjection.read(iprot); - struct.setDiscoveryProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // INSTANCE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.instance = new DiscoveryInstance(); - struct.instance.read(iprot); - struct.setInstanceIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, unregisterInstance_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.discoveryProjection != null) { - oprot.writeFieldBegin(DISCOVERY_PROJECTION_FIELD_DESC); - struct.discoveryProjection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.instance != null) { - oprot.writeFieldBegin(INSTANCE_FIELD_DESC); - struct.instance.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class unregisterInstance_argsTupleSchemeFactory implements SchemeFactory { - public unregisterInstance_argsTupleScheme getScheme() { - return new unregisterInstance_argsTupleScheme(); - } - } - - private static class unregisterInstance_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, unregisterInstance_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetDiscoveryProjection()) { - optionals.set(1); - } - if (struct.isSetInstance()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetDiscoveryProjection()) { - struct.discoveryProjection.write(oprot); - } - if (struct.isSetInstance()) { - struct.instance.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, unregisterInstance_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.discoveryProjection = new DiscoveryProjection(); - struct.discoveryProjection.read(iprot); - struct.setDiscoveryProjectionIsSet(true); - } - if (incoming.get(2)) { - struct.instance = new DiscoveryInstance(); - struct.instance.read(iprot); - struct.setInstanceIsSet(true); - } - } - } - - } - - public static class unregisterInstance_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("unregisterInstance_result"); - - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new unregisterInstance_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new unregisterInstance_resultTupleSchemeFactory()); - } - - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unregisterInstance_result.class, metaDataMap); - } - - public unregisterInstance_result() { - } - - public unregisterInstance_result( - CuratorException ex1) - { - this(); - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public unregisterInstance_result(unregisterInstance_result other) { - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public unregisterInstance_result deepCopy() { - return new unregisterInstance_result(this); - } - - @Override - public void clear() { - this.ex1 = null; - } - - public CuratorException getEx1() { - return this.ex1; - } - - public unregisterInstance_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof unregisterInstance_result) - return this.equals((unregisterInstance_result)that); - return false; - } - - public boolean equals(unregisterInstance_result that) { - if (that == null) - return false; - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(unregisterInstance_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("unregisterInstance_result("); - boolean first = true; - - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class unregisterInstance_resultStandardSchemeFactory implements SchemeFactory { - public unregisterInstance_resultStandardScheme getScheme() { - return new unregisterInstance_resultStandardScheme(); - } - } - - private static class unregisterInstance_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, unregisterInstance_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, unregisterInstance_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class unregisterInstance_resultTupleSchemeFactory implements SchemeFactory { - public unregisterInstance_resultTupleScheme getScheme() { - return new unregisterInstance_resultTupleScheme(); - } - } - - private static class unregisterInstance_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, unregisterInstance_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetEx1()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, unregisterInstance_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - - public static class updateInstance_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateInstance_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField DISCOVERY_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("discoveryProjection", org.apache.thrift.protocol.TType.STRUCT, (short)2); - private static final org.apache.thrift.protocol.TField INSTANCE_FIELD_DESC = new org.apache.thrift.protocol.TField("instance", org.apache.thrift.protocol.TType.STRUCT, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new updateInstance_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new updateInstance_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - public DiscoveryProjection discoveryProjection; // required - public DiscoveryInstance instance; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - DISCOVERY_PROJECTION((short)2, "discoveryProjection"), - INSTANCE((short)3, "instance"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // DISCOVERY_PROJECTION - return DISCOVERY_PROJECTION; - case 3: // INSTANCE - return INSTANCE; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - tmpMap.put(_Fields.DISCOVERY_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("discoveryProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryProjection.class))); - tmpMap.put(_Fields.INSTANCE, new org.apache.thrift.meta_data.FieldMetaData("instance", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DiscoveryInstance.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateInstance_args.class, metaDataMap); - } - - public updateInstance_args() { - } - - public updateInstance_args( - CuratorProjection projection, - DiscoveryProjection discoveryProjection, - DiscoveryInstance instance) - { - this(); - this.projection = projection; - this.discoveryProjection = discoveryProjection; - this.instance = instance; - } - - /** - * Performs a deep copy on other. - */ - public updateInstance_args(updateInstance_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - if (other.isSetDiscoveryProjection()) { - this.discoveryProjection = new DiscoveryProjection(other.discoveryProjection); - } - if (other.isSetInstance()) { - this.instance = new DiscoveryInstance(other.instance); - } - } - - public updateInstance_args deepCopy() { - return new updateInstance_args(this); - } - - @Override - public void clear() { - this.projection = null; - this.discoveryProjection = null; - this.instance = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public updateInstance_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public DiscoveryProjection getDiscoveryProjection() { - return this.discoveryProjection; - } - - public updateInstance_args setDiscoveryProjection(DiscoveryProjection discoveryProjection) { - this.discoveryProjection = discoveryProjection; - return this; - } - - public void unsetDiscoveryProjection() { - this.discoveryProjection = null; - } - - /** Returns true if field discoveryProjection is set (has been assigned a value) and false otherwise */ - public boolean isSetDiscoveryProjection() { - return this.discoveryProjection != null; - } - - public void setDiscoveryProjectionIsSet(boolean value) { - if (!value) { - this.discoveryProjection = null; - } - } - - public DiscoveryInstance getInstance() { - return this.instance; - } - - public updateInstance_args setInstance(DiscoveryInstance instance) { - this.instance = instance; - return this; - } - - public void unsetInstance() { - this.instance = null; - } - - /** Returns true if field instance is set (has been assigned a value) and false otherwise */ - public boolean isSetInstance() { - return this.instance != null; - } - - public void setInstanceIsSet(boolean value) { - if (!value) { - this.instance = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - case DISCOVERY_PROJECTION: - if (value == null) { - unsetDiscoveryProjection(); - } else { - setDiscoveryProjection((DiscoveryProjection)value); - } - break; - - case INSTANCE: - if (value == null) { - unsetInstance(); - } else { - setInstance((DiscoveryInstance)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case DISCOVERY_PROJECTION: - return getDiscoveryProjection(); - - case INSTANCE: - return getInstance(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case DISCOVERY_PROJECTION: - return isSetDiscoveryProjection(); - case INSTANCE: - return isSetInstance(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof updateInstance_args) - return this.equals((updateInstance_args)that); - return false; - } - - public boolean equals(updateInstance_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_discoveryProjection = true && this.isSetDiscoveryProjection(); - boolean that_present_discoveryProjection = true && that.isSetDiscoveryProjection(); - if (this_present_discoveryProjection || that_present_discoveryProjection) { - if (!(this_present_discoveryProjection && that_present_discoveryProjection)) - return false; - if (!this.discoveryProjection.equals(that.discoveryProjection)) - return false; - } - - boolean this_present_instance = true && this.isSetInstance(); - boolean that_present_instance = true && that.isSetInstance(); - if (this_present_instance || that_present_instance) { - if (!(this_present_instance && that_present_instance)) - return false; - if (!this.instance.equals(that.instance)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(updateInstance_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDiscoveryProjection()).compareTo(other.isSetDiscoveryProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDiscoveryProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.discoveryProjection, other.discoveryProjection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetInstance()).compareTo(other.isSetInstance()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetInstance()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.instance, other.instance); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("updateInstance_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("discoveryProjection:"); - if (this.discoveryProjection == null) { - sb.append("null"); - } else { - sb.append(this.discoveryProjection); - } - first = false; - if (!first) sb.append(", "); - sb.append("instance:"); - if (this.instance == null) { - sb.append("null"); - } else { - sb.append(this.instance); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - if (discoveryProjection != null) { - discoveryProjection.validate(); - } - if (instance != null) { - instance.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class updateInstance_argsStandardSchemeFactory implements SchemeFactory { - public updateInstance_argsStandardScheme getScheme() { - return new updateInstance_argsStandardScheme(); - } - } - - private static class updateInstance_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, updateInstance_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // DISCOVERY_PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.discoveryProjection = new DiscoveryProjection(); - struct.discoveryProjection.read(iprot); - struct.setDiscoveryProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // INSTANCE - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.instance = new DiscoveryInstance(); - struct.instance.read(iprot); - struct.setInstanceIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, updateInstance_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.discoveryProjection != null) { - oprot.writeFieldBegin(DISCOVERY_PROJECTION_FIELD_DESC); - struct.discoveryProjection.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.instance != null) { - oprot.writeFieldBegin(INSTANCE_FIELD_DESC); - struct.instance.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class updateInstance_argsTupleSchemeFactory implements SchemeFactory { - public updateInstance_argsTupleScheme getScheme() { - return new updateInstance_argsTupleScheme(); - } - } - - private static class updateInstance_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, updateInstance_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetDiscoveryProjection()) { - optionals.set(1); - } - if (struct.isSetInstance()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetDiscoveryProjection()) { - struct.discoveryProjection.write(oprot); - } - if (struct.isSetInstance()) { - struct.instance.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, updateInstance_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.discoveryProjection = new DiscoveryProjection(); - struct.discoveryProjection.read(iprot); - struct.setDiscoveryProjectionIsSet(true); - } - if (incoming.get(2)) { - struct.instance = new DiscoveryInstance(); - struct.instance.read(iprot); - struct.setInstanceIsSet(true); - } - } - } - - } - - public static class updateInstance_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateInstance_result"); - - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new updateInstance_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new updateInstance_resultTupleSchemeFactory()); - } - - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateInstance_result.class, metaDataMap); - } - - public updateInstance_result() { - } - - public updateInstance_result( - CuratorException ex1) - { - this(); - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public updateInstance_result(updateInstance_result other) { - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public updateInstance_result deepCopy() { - return new updateInstance_result(this); - } - - @Override - public void clear() { - this.ex1 = null; - } - - public CuratorException getEx1() { - return this.ex1; - } - - public updateInstance_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof updateInstance_result) - return this.equals((updateInstance_result)that); - return false; - } - - public boolean equals(updateInstance_result that) { - if (that == null) - return false; - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(updateInstance_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("updateInstance_result("); - boolean first = true; - - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class updateInstance_resultStandardSchemeFactory implements SchemeFactory { - public updateInstance_resultStandardScheme getScheme() { - return new updateInstance_resultStandardScheme(); - } - } - - private static class updateInstance_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, updateInstance_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, updateInstance_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class updateInstance_resultTupleSchemeFactory implements SchemeFactory { - public updateInstance_resultTupleScheme getScheme() { - return new updateInstance_resultTupleScheme(); - } - } - - private static class updateInstance_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, updateInstance_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetEx1()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, updateInstance_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/EventService.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/EventService.java deleted file mode 100644 index 9854e0ef54..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/EventService.java +++ /dev/null @@ -1,1082 +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 EventService { - - public interface Iface { - - public CuratorEvent getNextEvent(CuratorProjection projection) throws CuratorException, org.apache.thrift.TException; - - } - - public interface AsyncIface { - - public void getNextEvent(CuratorProjection projection, 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 { - 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 CuratorEvent getNextEvent(CuratorProjection projection) throws CuratorException, org.apache.thrift.TException - { - send_getNextEvent(projection); - return recv_getNextEvent(); - } - - public void send_getNextEvent(CuratorProjection projection) throws org.apache.thrift.TException - { - getNextEvent_args args = new getNextEvent_args(); - args.setProjection(projection); - sendBase("getNextEvent", args); - } - - public CuratorEvent recv_getNextEvent() throws CuratorException, org.apache.thrift.TException - { - getNextEvent_result result = new getNextEvent_result(); - receiveBase(result, "getNextEvent"); - 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, "getNextEvent failed: unknown result"); - } - - } - public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { - public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { - 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 getNextEvent(CuratorProjection projection, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { - checkReady(); - getNextEvent_call method_call = new getNextEvent_call(projection, resultHandler, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class getNextEvent_call extends org.apache.thrift.async.TAsyncMethodCall { - private CuratorProjection projection; - public getNextEvent_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("getNextEvent", org.apache.thrift.protocol.TMessageType.CALL, 0)); - getNextEvent_args args = new getNextEvent_args(); - args.setProjection(projection); - args.write(prot); - prot.writeMessageEnd(); - } - - public CuratorEvent 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_getNextEvent(); - } - } - - } - - public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); - public Processor(I iface) { - super(iface, getProcessMap(new HashMap>())); - } - - protected Processor(I iface, Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static Map> getProcessMap(Map> processMap) { - processMap.put("getNextEvent", new getNextEvent()); - return processMap; - } - - public static class getNextEvent extends org.apache.thrift.ProcessFunction { - public getNextEvent() { - super("getNextEvent"); - } - - public getNextEvent_args getEmptyArgsInstance() { - return new getNextEvent_args(); - } - - protected boolean isOneway() { - return false; - } - - public getNextEvent_result getResult(I iface, getNextEvent_args args) throws org.apache.thrift.TException { - getNextEvent_result result = new getNextEvent_result(); - try { - result.success = iface.getNextEvent(args.projection); - } catch (CuratorException ex1) { - result.ex1 = ex1; - } - return result; - } - } - - } - - public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); - public AsyncProcessor(I iface) { - super(iface, getProcessMap(new HashMap>())); - } - - protected AsyncProcessor(I iface, Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static Map> getProcessMap(Map> processMap) { - processMap.put("getNextEvent", new getNextEvent()); - return processMap; - } - - public static class getNextEvent extends org.apache.thrift.AsyncProcessFunction { - public getNextEvent() { - super("getNextEvent"); - } - - public getNextEvent_args getEmptyArgsInstance() { - return new getNextEvent_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(CuratorEvent o) { - getNextEvent_result result = new getNextEvent_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getNextEvent_result result = new getNextEvent_result(); - if (e instanceof CuratorException) { - result.ex1 = (CuratorException) e; - result.setEx1IsSet(true); - msg = result; - } - else - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getNextEvent_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.getNextEvent(args.projection,resultHandler); - } - } - - } - - public static class getNextEvent_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNextEvent_args"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getNextEvent_argsStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getNextEvent_argsTupleSchemeFactory()); - } - - public CuratorProjection projection; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorProjection.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNextEvent_args.class, metaDataMap); - } - - public getNextEvent_args() { - } - - public getNextEvent_args( - CuratorProjection projection) - { - this(); - this.projection = projection; - } - - /** - * Performs a deep copy on other. - */ - public getNextEvent_args(getNextEvent_args other) { - if (other.isSetProjection()) { - this.projection = new CuratorProjection(other.projection); - } - } - - public getNextEvent_args deepCopy() { - return new getNextEvent_args(this); - } - - @Override - public void clear() { - this.projection = null; - } - - public CuratorProjection getProjection() { - return this.projection; - } - - public getNextEvent_args setProjection(CuratorProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((CuratorProjection)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getNextEvent_args) - return this.equals((getNextEvent_args)that); - return false; - } - - public boolean equals(getNextEvent_args that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getNextEvent_args other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getNextEvent_args("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getNextEvent_argsStandardSchemeFactory implements SchemeFactory { - public getNextEvent_argsStandardScheme getScheme() { - return new getNextEvent_argsStandardScheme(); - } - } - - private static class getNextEvent_argsStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getNextEvent_args struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getNextEvent_args struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getNextEvent_argsTupleSchemeFactory implements SchemeFactory { - public getNextEvent_argsTupleScheme getScheme() { - return new getNextEvent_argsTupleScheme(); - } - } - - private static class getNextEvent_argsTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getNextEvent_args struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getNextEvent_args struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.projection = new CuratorProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - } - } - - } - - public static class getNextEvent_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNextEvent_result"); - - private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); - private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new getNextEvent_resultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new getNextEvent_resultTupleSchemeFactory()); - } - - public CuratorEvent success; // required - public CuratorException ex1; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SUCCESS((short)0, "success"), - EX1((short)1, "ex1"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 0: // SUCCESS - return SUCCESS; - case 1: // EX1 - return EX1; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CuratorEvent.class))); - tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNextEvent_result.class, metaDataMap); - } - - public getNextEvent_result() { - } - - public getNextEvent_result( - CuratorEvent success, - CuratorException ex1) - { - this(); - this.success = success; - this.ex1 = ex1; - } - - /** - * Performs a deep copy on other. - */ - public getNextEvent_result(getNextEvent_result other) { - if (other.isSetSuccess()) { - this.success = new CuratorEvent(other.success); - } - if (other.isSetEx1()) { - this.ex1 = new CuratorException(other.ex1); - } - } - - public getNextEvent_result deepCopy() { - return new getNextEvent_result(this); - } - - @Override - public void clear() { - this.success = null; - this.ex1 = null; - } - - public CuratorEvent getSuccess() { - return this.success; - } - - public getNextEvent_result setSuccess(CuratorEvent success) { - this.success = success; - return this; - } - - public void unsetSuccess() { - this.success = null; - } - - /** Returns true if field success is set (has been assigned a value) and false otherwise */ - public boolean isSetSuccess() { - return this.success != null; - } - - public void setSuccessIsSet(boolean value) { - if (!value) { - this.success = null; - } - } - - public CuratorException getEx1() { - return this.ex1; - } - - public getNextEvent_result setEx1(CuratorException ex1) { - this.ex1 = ex1; - return this; - } - - public void unsetEx1() { - this.ex1 = null; - } - - /** Returns true if field ex1 is set (has been assigned a value) and false otherwise */ - public boolean isSetEx1() { - return this.ex1 != null; - } - - public void setEx1IsSet(boolean value) { - if (!value) { - this.ex1 = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((CuratorEvent)value); - } - break; - - case EX1: - if (value == null) { - unsetEx1(); - } else { - setEx1((CuratorException)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SUCCESS: - return getSuccess(); - - case EX1: - return getEx1(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SUCCESS: - return isSetSuccess(); - case EX1: - return isSetEx1(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof getNextEvent_result) - return this.equals((getNextEvent_result)that); - return false; - } - - public boolean equals(getNextEvent_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_ex1 = true && this.isSetEx1(); - boolean that_present_ex1 = true && that.isSetEx1(); - if (this_present_ex1 || that_present_ex1) { - if (!(this_present_ex1 && that_present_ex1)) - return false; - if (!this.ex1.equals(that.ex1)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(getNextEvent_result other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEx1()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("getNextEvent_result("); - boolean first = true; - - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); - sb.append("ex1:"); - if (this.ex1 == null) { - sb.append("null"); - } else { - sb.append(this.ex1); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (success != null) { - success.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class getNextEvent_resultStandardSchemeFactory implements SchemeFactory { - public getNextEvent_resultStandardScheme getScheme() { - return new getNextEvent_resultStandardScheme(); - } - } - - private static class getNextEvent_resultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, getNextEvent_result struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 0: // SUCCESS - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.success = new CuratorEvent(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 1: // EX1 - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, getNextEvent_result struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.success != null) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - struct.success.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.ex1 != null) { - oprot.writeFieldBegin(EX1_FIELD_DESC); - struct.ex1.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class getNextEvent_resultTupleSchemeFactory implements SchemeFactory { - public getNextEvent_resultTupleScheme getScheme() { - return new getNextEvent_resultTupleScheme(); - } - } - - private static class getNextEvent_resultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, getNextEvent_result struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetSuccess()) { - optionals.set(0); - } - if (struct.isSetEx1()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetSuccess()) { - struct.success.write(oprot); - } - if (struct.isSetEx1()) { - struct.ex1.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, getNextEvent_result struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.success = new CuratorEvent(); - struct.success.read(iprot); - struct.setSuccessIsSet(true); - } - if (incoming.get(1)) { - struct.ex1 = new CuratorException(); - struct.ex1.read(iprot); - struct.setEx1IsSet(true); - } - } - } - - } - -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/EventType.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/EventType.java deleted file mode 100644 index dced909e8c..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/EventType.java +++ /dev/null @@ -1,54 +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 java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum EventType implements org.apache.thrift.TEnum { - None(0), - NodeCreated(1), - NodeDeleted(2), - NodeDataChanged(3), - NodeChildrenChanged(4); - - private final int value; - - private EventType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static EventType findByValue(int value) { - switch (value) { - case 0: - return None; - case 1: - return NodeCreated; - case 2: - return NodeDeleted; - case 3: - return NodeDataChanged; - case 4: - return NodeChildrenChanged; - default: - return null; - } - } -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/ExceptionType.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/ExceptionType.java deleted file mode 100644 index b727f3a983..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/ExceptionType.java +++ /dev/null @@ -1,48 +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 java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum ExceptionType implements org.apache.thrift.TEnum { - GENERAL(0), - ZOOKEEPER(1), - NODE(2); - - private final int value; - - private ExceptionType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static ExceptionType findByValue(int value) { - switch (value) { - case 0: - return GENERAL; - case 1: - return ZOOKEEPER; - case 2: - return NODE; - default: - return null; - } - } -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/ExistsSpec.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/ExistsSpec.java deleted file mode 100644 index e06749ee3e..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/ExistsSpec.java +++ /dev/null @@ -1,586 +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 ExistsSpec implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExistsSpec"); - - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField WATCHED_FIELD_DESC = new org.apache.thrift.protocol.TField("watched", org.apache.thrift.protocol.TType.BOOL, (short)2); - private static final org.apache.thrift.protocol.TField ASYNC_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("asyncContext", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ExistsSpecStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ExistsSpecTupleSchemeFactory()); - } - - public String path; // required - public boolean watched; // required - public String asyncContext; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PATH((short)1, "path"), - WATCHED((short)2, "watched"), - ASYNC_CONTEXT((short)3, "asyncContext"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PATH - return PATH; - case 2: // WATCHED - return WATCHED; - case 3: // ASYNC_CONTEXT - return ASYNC_CONTEXT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __WATCHED_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.WATCHED, new org.apache.thrift.meta_data.FieldMetaData("watched", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.ASYNC_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("asyncContext", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ExistsSpec.class, metaDataMap); - } - - public ExistsSpec() { - } - - public ExistsSpec( - String path, - boolean watched, - String asyncContext) - { - this(); - this.path = path; - this.watched = watched; - setWatchedIsSet(true); - this.asyncContext = asyncContext; - } - - /** - * Performs a deep copy on other. - */ - public ExistsSpec(ExistsSpec other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetPath()) { - this.path = other.path; - } - this.watched = other.watched; - if (other.isSetAsyncContext()) { - this.asyncContext = other.asyncContext; - } - } - - public ExistsSpec deepCopy() { - return new ExistsSpec(this); - } - - @Override - public void clear() { - this.path = null; - setWatchedIsSet(false); - this.watched = false; - this.asyncContext = null; - } - - public String getPath() { - return this.path; - } - - public ExistsSpec setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public boolean isWatched() { - return this.watched; - } - - public ExistsSpec setWatched(boolean watched) { - this.watched = watched; - setWatchedIsSet(true); - return this; - } - - public void unsetWatched() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WATCHED_ISSET_ID); - } - - /** Returns true if field watched is set (has been assigned a value) and false otherwise */ - public boolean isSetWatched() { - return EncodingUtils.testBit(__isset_bitfield, __WATCHED_ISSET_ID); - } - - public void setWatchedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WATCHED_ISSET_ID, value); - } - - public String getAsyncContext() { - return this.asyncContext; - } - - public ExistsSpec setAsyncContext(String asyncContext) { - this.asyncContext = asyncContext; - return this; - } - - public void unsetAsyncContext() { - this.asyncContext = null; - } - - /** Returns true if field asyncContext is set (has been assigned a value) and false otherwise */ - public boolean isSetAsyncContext() { - return this.asyncContext != null; - } - - public void setAsyncContextIsSet(boolean value) { - if (!value) { - this.asyncContext = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case WATCHED: - if (value == null) { - unsetWatched(); - } else { - setWatched((Boolean)value); - } - break; - - case ASYNC_CONTEXT: - if (value == null) { - unsetAsyncContext(); - } else { - setAsyncContext((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PATH: - return getPath(); - - case WATCHED: - return Boolean.valueOf(isWatched()); - - case ASYNC_CONTEXT: - return getAsyncContext(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PATH: - return isSetPath(); - case WATCHED: - return isSetWatched(); - case ASYNC_CONTEXT: - return isSetAsyncContext(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ExistsSpec) - return this.equals((ExistsSpec)that); - return false; - } - - public boolean equals(ExistsSpec that) { - if (that == null) - return false; - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_watched = true; - boolean that_present_watched = true; - if (this_present_watched || that_present_watched) { - if (!(this_present_watched && that_present_watched)) - return false; - if (this.watched != that.watched) - return false; - } - - boolean this_present_asyncContext = true && this.isSetAsyncContext(); - boolean that_present_asyncContext = true && that.isSetAsyncContext(); - if (this_present_asyncContext || that_present_asyncContext) { - if (!(this_present_asyncContext && that_present_asyncContext)) - return false; - if (!this.asyncContext.equals(that.asyncContext)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(ExistsSpec other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetWatched()).compareTo(other.isSetWatched()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetWatched()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.watched, other.watched); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAsyncContext()).compareTo(other.isSetAsyncContext()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAsyncContext()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asyncContext, other.asyncContext); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("ExistsSpec("); - boolean first = true; - - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - if (!first) sb.append(", "); - sb.append("watched:"); - sb.append(this.watched); - first = false; - if (!first) sb.append(", "); - sb.append("asyncContext:"); - if (this.asyncContext == null) { - sb.append("null"); - } else { - sb.append(this.asyncContext); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class ExistsSpecStandardSchemeFactory implements SchemeFactory { - public ExistsSpecStandardScheme getScheme() { - return new ExistsSpecStandardScheme(); - } - } - - private static class ExistsSpecStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, ExistsSpec struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // WATCHED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.watched = iprot.readBool(); - struct.setWatchedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // ASYNC_CONTEXT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.asyncContext = iprot.readString(); - struct.setAsyncContextIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, ExistsSpec struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(WATCHED_FIELD_DESC); - oprot.writeBool(struct.watched); - oprot.writeFieldEnd(); - if (struct.asyncContext != null) { - oprot.writeFieldBegin(ASYNC_CONTEXT_FIELD_DESC); - oprot.writeString(struct.asyncContext); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ExistsSpecTupleSchemeFactory implements SchemeFactory { - public ExistsSpecTupleScheme getScheme() { - return new ExistsSpecTupleScheme(); - } - } - - private static class ExistsSpecTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, ExistsSpec struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPath()) { - optionals.set(0); - } - if (struct.isSetWatched()) { - optionals.set(1); - } - if (struct.isSetAsyncContext()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetWatched()) { - oprot.writeBool(struct.watched); - } - if (struct.isSetAsyncContext()) { - oprot.writeString(struct.asyncContext); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, ExistsSpec struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - if (incoming.get(1)) { - struct.watched = iprot.readBool(); - struct.setWatchedIsSet(true); - } - if (incoming.get(2)) { - struct.asyncContext = iprot.readString(); - struct.setAsyncContextIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/GetChildrenSpec.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/GetChildrenSpec.java deleted file mode 100644 index 728298241c..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/GetChildrenSpec.java +++ /dev/null @@ -1,586 +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 GetChildrenSpec implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetChildrenSpec"); - - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField WATCHED_FIELD_DESC = new org.apache.thrift.protocol.TField("watched", org.apache.thrift.protocol.TType.BOOL, (short)2); - private static final org.apache.thrift.protocol.TField ASYNC_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("asyncContext", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetChildrenSpecStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetChildrenSpecTupleSchemeFactory()); - } - - public String path; // required - public boolean watched; // required - public String asyncContext; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PATH((short)1, "path"), - WATCHED((short)2, "watched"), - ASYNC_CONTEXT((short)3, "asyncContext"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PATH - return PATH; - case 2: // WATCHED - return WATCHED; - case 3: // ASYNC_CONTEXT - return ASYNC_CONTEXT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __WATCHED_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.WATCHED, new org.apache.thrift.meta_data.FieldMetaData("watched", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.ASYNC_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("asyncContext", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetChildrenSpec.class, metaDataMap); - } - - public GetChildrenSpec() { - } - - public GetChildrenSpec( - String path, - boolean watched, - String asyncContext) - { - this(); - this.path = path; - this.watched = watched; - setWatchedIsSet(true); - this.asyncContext = asyncContext; - } - - /** - * Performs a deep copy on other. - */ - public GetChildrenSpec(GetChildrenSpec other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetPath()) { - this.path = other.path; - } - this.watched = other.watched; - if (other.isSetAsyncContext()) { - this.asyncContext = other.asyncContext; - } - } - - public GetChildrenSpec deepCopy() { - return new GetChildrenSpec(this); - } - - @Override - public void clear() { - this.path = null; - setWatchedIsSet(false); - this.watched = false; - this.asyncContext = null; - } - - public String getPath() { - return this.path; - } - - public GetChildrenSpec setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public boolean isWatched() { - return this.watched; - } - - public GetChildrenSpec setWatched(boolean watched) { - this.watched = watched; - setWatchedIsSet(true); - return this; - } - - public void unsetWatched() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WATCHED_ISSET_ID); - } - - /** Returns true if field watched is set (has been assigned a value) and false otherwise */ - public boolean isSetWatched() { - return EncodingUtils.testBit(__isset_bitfield, __WATCHED_ISSET_ID); - } - - public void setWatchedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WATCHED_ISSET_ID, value); - } - - public String getAsyncContext() { - return this.asyncContext; - } - - public GetChildrenSpec setAsyncContext(String asyncContext) { - this.asyncContext = asyncContext; - return this; - } - - public void unsetAsyncContext() { - this.asyncContext = null; - } - - /** Returns true if field asyncContext is set (has been assigned a value) and false otherwise */ - public boolean isSetAsyncContext() { - return this.asyncContext != null; - } - - public void setAsyncContextIsSet(boolean value) { - if (!value) { - this.asyncContext = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case WATCHED: - if (value == null) { - unsetWatched(); - } else { - setWatched((Boolean)value); - } - break; - - case ASYNC_CONTEXT: - if (value == null) { - unsetAsyncContext(); - } else { - setAsyncContext((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PATH: - return getPath(); - - case WATCHED: - return Boolean.valueOf(isWatched()); - - case ASYNC_CONTEXT: - return getAsyncContext(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PATH: - return isSetPath(); - case WATCHED: - return isSetWatched(); - case ASYNC_CONTEXT: - return isSetAsyncContext(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetChildrenSpec) - return this.equals((GetChildrenSpec)that); - return false; - } - - public boolean equals(GetChildrenSpec that) { - if (that == null) - return false; - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_watched = true; - boolean that_present_watched = true; - if (this_present_watched || that_present_watched) { - if (!(this_present_watched && that_present_watched)) - return false; - if (this.watched != that.watched) - return false; - } - - boolean this_present_asyncContext = true && this.isSetAsyncContext(); - boolean that_present_asyncContext = true && that.isSetAsyncContext(); - if (this_present_asyncContext || that_present_asyncContext) { - if (!(this_present_asyncContext && that_present_asyncContext)) - return false; - if (!this.asyncContext.equals(that.asyncContext)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(GetChildrenSpec other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetWatched()).compareTo(other.isSetWatched()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetWatched()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.watched, other.watched); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAsyncContext()).compareTo(other.isSetAsyncContext()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAsyncContext()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asyncContext, other.asyncContext); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("GetChildrenSpec("); - boolean first = true; - - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - if (!first) sb.append(", "); - sb.append("watched:"); - sb.append(this.watched); - first = false; - if (!first) sb.append(", "); - sb.append("asyncContext:"); - if (this.asyncContext == null) { - sb.append("null"); - } else { - sb.append(this.asyncContext); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class GetChildrenSpecStandardSchemeFactory implements SchemeFactory { - public GetChildrenSpecStandardScheme getScheme() { - return new GetChildrenSpecStandardScheme(); - } - } - - private static class GetChildrenSpecStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetChildrenSpec struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // WATCHED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.watched = iprot.readBool(); - struct.setWatchedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // ASYNC_CONTEXT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.asyncContext = iprot.readString(); - struct.setAsyncContextIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, GetChildrenSpec struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(WATCHED_FIELD_DESC); - oprot.writeBool(struct.watched); - oprot.writeFieldEnd(); - if (struct.asyncContext != null) { - oprot.writeFieldBegin(ASYNC_CONTEXT_FIELD_DESC); - oprot.writeString(struct.asyncContext); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GetChildrenSpecTupleSchemeFactory implements SchemeFactory { - public GetChildrenSpecTupleScheme getScheme() { - return new GetChildrenSpecTupleScheme(); - } - } - - private static class GetChildrenSpecTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetChildrenSpec struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPath()) { - optionals.set(0); - } - if (struct.isSetWatched()) { - optionals.set(1); - } - if (struct.isSetAsyncContext()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetWatched()) { - oprot.writeBool(struct.watched); - } - if (struct.isSetAsyncContext()) { - oprot.writeString(struct.asyncContext); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetChildrenSpec struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - if (incoming.get(1)) { - struct.watched = iprot.readBool(); - struct.setWatchedIsSet(true); - } - if (incoming.get(2)) { - struct.asyncContext = iprot.readString(); - struct.setAsyncContextIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/GetDataSpec.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/GetDataSpec.java deleted file mode 100644 index 5644401162..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/GetDataSpec.java +++ /dev/null @@ -1,680 +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 GetDataSpec implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetDataSpec"); - - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField WATCHED_FIELD_DESC = new org.apache.thrift.protocol.TField("watched", org.apache.thrift.protocol.TType.BOOL, (short)2); - private static final org.apache.thrift.protocol.TField ASYNC_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("asyncContext", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField DECOMPRESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("decompressed", org.apache.thrift.protocol.TType.BOOL, (short)4); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new GetDataSpecStandardSchemeFactory()); - schemes.put(TupleScheme.class, new GetDataSpecTupleSchemeFactory()); - } - - public String path; // required - public boolean watched; // required - public String asyncContext; // required - public boolean decompressed; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PATH((short)1, "path"), - WATCHED((short)2, "watched"), - ASYNC_CONTEXT((short)3, "asyncContext"), - DECOMPRESSED((short)4, "decompressed"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PATH - return PATH; - case 2: // WATCHED - return WATCHED; - case 3: // ASYNC_CONTEXT - return ASYNC_CONTEXT; - case 4: // DECOMPRESSED - return DECOMPRESSED; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __WATCHED_ISSET_ID = 0; - private static final int __DECOMPRESSED_ISSET_ID = 1; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.WATCHED, new org.apache.thrift.meta_data.FieldMetaData("watched", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.ASYNC_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("asyncContext", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.DECOMPRESSED, new org.apache.thrift.meta_data.FieldMetaData("decompressed", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetDataSpec.class, metaDataMap); - } - - public GetDataSpec() { - } - - public GetDataSpec( - String path, - boolean watched, - String asyncContext, - boolean decompressed) - { - this(); - this.path = path; - this.watched = watched; - setWatchedIsSet(true); - this.asyncContext = asyncContext; - this.decompressed = decompressed; - setDecompressedIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public GetDataSpec(GetDataSpec other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetPath()) { - this.path = other.path; - } - this.watched = other.watched; - if (other.isSetAsyncContext()) { - this.asyncContext = other.asyncContext; - } - this.decompressed = other.decompressed; - } - - public GetDataSpec deepCopy() { - return new GetDataSpec(this); - } - - @Override - public void clear() { - this.path = null; - setWatchedIsSet(false); - this.watched = false; - this.asyncContext = null; - setDecompressedIsSet(false); - this.decompressed = false; - } - - public String getPath() { - return this.path; - } - - public GetDataSpec setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public boolean isWatched() { - return this.watched; - } - - public GetDataSpec setWatched(boolean watched) { - this.watched = watched; - setWatchedIsSet(true); - return this; - } - - public void unsetWatched() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WATCHED_ISSET_ID); - } - - /** Returns true if field watched is set (has been assigned a value) and false otherwise */ - public boolean isSetWatched() { - return EncodingUtils.testBit(__isset_bitfield, __WATCHED_ISSET_ID); - } - - public void setWatchedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WATCHED_ISSET_ID, value); - } - - public String getAsyncContext() { - return this.asyncContext; - } - - public GetDataSpec setAsyncContext(String asyncContext) { - this.asyncContext = asyncContext; - return this; - } - - public void unsetAsyncContext() { - this.asyncContext = null; - } - - /** Returns true if field asyncContext is set (has been assigned a value) and false otherwise */ - public boolean isSetAsyncContext() { - return this.asyncContext != null; - } - - public void setAsyncContextIsSet(boolean value) { - if (!value) { - this.asyncContext = null; - } - } - - public boolean isDecompressed() { - return this.decompressed; - } - - public GetDataSpec setDecompressed(boolean decompressed) { - this.decompressed = decompressed; - setDecompressedIsSet(true); - return this; - } - - public void unsetDecompressed() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DECOMPRESSED_ISSET_ID); - } - - /** Returns true if field decompressed is set (has been assigned a value) and false otherwise */ - public boolean isSetDecompressed() { - return EncodingUtils.testBit(__isset_bitfield, __DECOMPRESSED_ISSET_ID); - } - - public void setDecompressedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DECOMPRESSED_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case WATCHED: - if (value == null) { - unsetWatched(); - } else { - setWatched((Boolean)value); - } - break; - - case ASYNC_CONTEXT: - if (value == null) { - unsetAsyncContext(); - } else { - setAsyncContext((String)value); - } - break; - - case DECOMPRESSED: - if (value == null) { - unsetDecompressed(); - } else { - setDecompressed((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PATH: - return getPath(); - - case WATCHED: - return Boolean.valueOf(isWatched()); - - case ASYNC_CONTEXT: - return getAsyncContext(); - - case DECOMPRESSED: - return Boolean.valueOf(isDecompressed()); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PATH: - return isSetPath(); - case WATCHED: - return isSetWatched(); - case ASYNC_CONTEXT: - return isSetAsyncContext(); - case DECOMPRESSED: - return isSetDecompressed(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof GetDataSpec) - return this.equals((GetDataSpec)that); - return false; - } - - public boolean equals(GetDataSpec that) { - if (that == null) - return false; - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_watched = true; - boolean that_present_watched = true; - if (this_present_watched || that_present_watched) { - if (!(this_present_watched && that_present_watched)) - return false; - if (this.watched != that.watched) - return false; - } - - boolean this_present_asyncContext = true && this.isSetAsyncContext(); - boolean that_present_asyncContext = true && that.isSetAsyncContext(); - if (this_present_asyncContext || that_present_asyncContext) { - if (!(this_present_asyncContext && that_present_asyncContext)) - return false; - if (!this.asyncContext.equals(that.asyncContext)) - return false; - } - - boolean this_present_decompressed = true; - boolean that_present_decompressed = true; - if (this_present_decompressed || that_present_decompressed) { - if (!(this_present_decompressed && that_present_decompressed)) - return false; - if (this.decompressed != that.decompressed) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(GetDataSpec other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetWatched()).compareTo(other.isSetWatched()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetWatched()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.watched, other.watched); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAsyncContext()).compareTo(other.isSetAsyncContext()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAsyncContext()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asyncContext, other.asyncContext); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDecompressed()).compareTo(other.isSetDecompressed()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDecompressed()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.decompressed, other.decompressed); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("GetDataSpec("); - boolean first = true; - - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - if (!first) sb.append(", "); - sb.append("watched:"); - sb.append(this.watched); - first = false; - if (!first) sb.append(", "); - sb.append("asyncContext:"); - if (this.asyncContext == null) { - sb.append("null"); - } else { - sb.append(this.asyncContext); - } - first = false; - if (!first) sb.append(", "); - sb.append("decompressed:"); - sb.append(this.decompressed); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class GetDataSpecStandardSchemeFactory implements SchemeFactory { - public GetDataSpecStandardScheme getScheme() { - return new GetDataSpecStandardScheme(); - } - } - - private static class GetDataSpecStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, GetDataSpec struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // WATCHED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.watched = iprot.readBool(); - struct.setWatchedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // ASYNC_CONTEXT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.asyncContext = iprot.readString(); - struct.setAsyncContextIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // DECOMPRESSED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.decompressed = iprot.readBool(); - struct.setDecompressedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, GetDataSpec struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(WATCHED_FIELD_DESC); - oprot.writeBool(struct.watched); - oprot.writeFieldEnd(); - if (struct.asyncContext != null) { - oprot.writeFieldBegin(ASYNC_CONTEXT_FIELD_DESC); - oprot.writeString(struct.asyncContext); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(DECOMPRESSED_FIELD_DESC); - oprot.writeBool(struct.decompressed); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class GetDataSpecTupleSchemeFactory implements SchemeFactory { - public GetDataSpecTupleScheme getScheme() { - return new GetDataSpecTupleScheme(); - } - } - - private static class GetDataSpecTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, GetDataSpec struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPath()) { - optionals.set(0); - } - if (struct.isSetWatched()) { - optionals.set(1); - } - if (struct.isSetAsyncContext()) { - optionals.set(2); - } - if (struct.isSetDecompressed()) { - optionals.set(3); - } - oprot.writeBitSet(optionals, 4); - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetWatched()) { - oprot.writeBool(struct.watched); - } - if (struct.isSetAsyncContext()) { - oprot.writeString(struct.asyncContext); - } - if (struct.isSetDecompressed()) { - oprot.writeBool(struct.decompressed); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, GetDataSpec struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(4); - if (incoming.get(0)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - if (incoming.get(1)) { - struct.watched = iprot.readBool(); - struct.setWatchedIsSet(true); - } - if (incoming.get(2)) { - struct.asyncContext = iprot.readString(); - struct.setAsyncContextIsSet(true); - } - if (incoming.get(3)) { - struct.decompressed = iprot.readBool(); - struct.setDecompressedIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/Id.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/Id.java deleted file mode 100644 index 247de18d6b..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/Id.java +++ /dev/null @@ -1,488 +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 Id implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Id"); - - private static final org.apache.thrift.protocol.TField SCHEME_FIELD_DESC = new org.apache.thrift.protocol.TField("scheme", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new IdStandardSchemeFactory()); - schemes.put(TupleScheme.class, new IdTupleSchemeFactory()); - } - - public String scheme; // required - public String id; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - SCHEME((short)1, "scheme"), - ID((short)2, "id"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // SCHEME - return SCHEME; - case 2: // ID - return ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.SCHEME, new org.apache.thrift.meta_data.FieldMetaData("scheme", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Id.class, metaDataMap); - } - - public Id() { - } - - public Id( - String scheme, - String id) - { - this(); - this.scheme = scheme; - this.id = id; - } - - /** - * Performs a deep copy on other. - */ - public Id(Id other) { - if (other.isSetScheme()) { - this.scheme = other.scheme; - } - if (other.isSetId()) { - this.id = other.id; - } - } - - public Id deepCopy() { - return new Id(this); - } - - @Override - public void clear() { - this.scheme = null; - this.id = null; - } - - public String getScheme() { - return this.scheme; - } - - public Id setScheme(String scheme) { - this.scheme = scheme; - return this; - } - - public void unsetScheme() { - this.scheme = null; - } - - /** Returns true if field scheme is set (has been assigned a value) and false otherwise */ - public boolean isSetScheme() { - return this.scheme != null; - } - - public void setSchemeIsSet(boolean value) { - if (!value) { - this.scheme = null; - } - } - - public String getId() { - return this.id; - } - - public Id setId(String id) { - this.id = id; - return this; - } - - public void unsetId() { - this.id = null; - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return this.id != null; - } - - public void setIdIsSet(boolean value) { - if (!value) { - this.id = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case SCHEME: - if (value == null) { - unsetScheme(); - } else { - setScheme((String)value); - } - break; - - case ID: - if (value == null) { - unsetId(); - } else { - setId((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case SCHEME: - return getScheme(); - - case ID: - return getId(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case SCHEME: - return isSetScheme(); - case ID: - return isSetId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Id) - return this.equals((Id)that); - return false; - } - - public boolean equals(Id that) { - if (that == null) - return false; - - boolean this_present_scheme = true && this.isSetScheme(); - boolean that_present_scheme = true && that.isSetScheme(); - if (this_present_scheme || that_present_scheme) { - if (!(this_present_scheme && that_present_scheme)) - return false; - if (!this.scheme.equals(that.scheme)) - return false; - } - - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (!this.id.equals(that.id)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(Id other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetScheme()).compareTo(other.isSetScheme()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetScheme()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scheme, other.scheme); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Id("); - boolean first = true; - - sb.append("scheme:"); - if (this.scheme == null) { - sb.append("null"); - } else { - sb.append(this.scheme); - } - first = false; - if (!first) sb.append(", "); - sb.append("id:"); - if (this.id == null) { - sb.append("null"); - } else { - sb.append(this.id); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class IdStandardSchemeFactory implements SchemeFactory { - public IdStandardScheme getScheme() { - return new IdStandardScheme(); - } - } - - private static class IdStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, Id struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // SCHEME - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.scheme = iprot.readString(); - struct.setSchemeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, Id struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.scheme != null) { - oprot.writeFieldBegin(SCHEME_FIELD_DESC); - oprot.writeString(struct.scheme); - oprot.writeFieldEnd(); - } - if (struct.id != null) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeString(struct.id); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class IdTupleSchemeFactory implements SchemeFactory { - public IdTupleScheme getScheme() { - return new IdTupleScheme(); - } - } - - private static class IdTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, Id struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetScheme()) { - optionals.set(0); - } - if (struct.isSetId()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetScheme()) { - oprot.writeString(struct.scheme); - } - if (struct.isSetId()) { - oprot.writeString(struct.id); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, Id struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.scheme = iprot.readString(); - struct.setSchemeIsSet(true); - } - if (incoming.get(1)) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/KeeperState.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/KeeperState.java deleted file mode 100644 index cd945ee2f4..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/KeeperState.java +++ /dev/null @@ -1,63 +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 java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum KeeperState implements org.apache.thrift.TEnum { - Unknown(0), - Disconnected(1), - NoSyncConnected(2), - SyncConnected(3), - AuthFailed(4), - ConnectedReadOnly(5), - SaslAuthenticated(6), - Expired(7); - - private final int value; - - private KeeperState(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static KeeperState findByValue(int value) { - switch (value) { - case 0: - return Unknown; - case 1: - return Disconnected; - case 2: - return NoSyncConnected; - case 3: - return SyncConnected; - case 4: - return AuthFailed; - case 5: - return ConnectedReadOnly; - case 6: - return SaslAuthenticated; - case 7: - return Expired; - default: - return null; - } - } -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/LeaderEvent.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/LeaderEvent.java deleted file mode 100644 index 3cfcbae063..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/LeaderEvent.java +++ /dev/null @@ -1,586 +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 LeaderEvent implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LeaderEvent"); - - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField PARTICIPANT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("participantId", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField IS_LEADER_FIELD_DESC = new org.apache.thrift.protocol.TField("isLeader", org.apache.thrift.protocol.TType.BOOL, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new LeaderEventStandardSchemeFactory()); - schemes.put(TupleScheme.class, new LeaderEventTupleSchemeFactory()); - } - - public String path; // required - public String participantId; // required - public boolean isLeader; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PATH((short)1, "path"), - PARTICIPANT_ID((short)2, "participantId"), - IS_LEADER((short)3, "isLeader"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PATH - return PATH; - case 2: // PARTICIPANT_ID - return PARTICIPANT_ID; - case 3: // IS_LEADER - return IS_LEADER; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ISLEADER_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.PARTICIPANT_ID, new org.apache.thrift.meta_data.FieldMetaData("participantId", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.IS_LEADER, new org.apache.thrift.meta_data.FieldMetaData("isLeader", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LeaderEvent.class, metaDataMap); - } - - public LeaderEvent() { - } - - public LeaderEvent( - String path, - String participantId, - boolean isLeader) - { - this(); - this.path = path; - this.participantId = participantId; - this.isLeader = isLeader; - setIsLeaderIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public LeaderEvent(LeaderEvent other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetPath()) { - this.path = other.path; - } - if (other.isSetParticipantId()) { - this.participantId = other.participantId; - } - this.isLeader = other.isLeader; - } - - public LeaderEvent deepCopy() { - return new LeaderEvent(this); - } - - @Override - public void clear() { - this.path = null; - this.participantId = null; - setIsLeaderIsSet(false); - this.isLeader = false; - } - - public String getPath() { - return this.path; - } - - public LeaderEvent setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public String getParticipantId() { - return this.participantId; - } - - public LeaderEvent setParticipantId(String participantId) { - this.participantId = participantId; - return this; - } - - public void unsetParticipantId() { - this.participantId = null; - } - - /** Returns true if field participantId is set (has been assigned a value) and false otherwise */ - public boolean isSetParticipantId() { - return this.participantId != null; - } - - public void setParticipantIdIsSet(boolean value) { - if (!value) { - this.participantId = null; - } - } - - public boolean isIsLeader() { - return this.isLeader; - } - - public LeaderEvent setIsLeader(boolean isLeader) { - this.isLeader = isLeader; - setIsLeaderIsSet(true); - return this; - } - - public void unsetIsLeader() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISLEADER_ISSET_ID); - } - - /** Returns true if field isLeader is set (has been assigned a value) and false otherwise */ - public boolean isSetIsLeader() { - return EncodingUtils.testBit(__isset_bitfield, __ISLEADER_ISSET_ID); - } - - public void setIsLeaderIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISLEADER_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case PARTICIPANT_ID: - if (value == null) { - unsetParticipantId(); - } else { - setParticipantId((String)value); - } - break; - - case IS_LEADER: - if (value == null) { - unsetIsLeader(); - } else { - setIsLeader((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PATH: - return getPath(); - - case PARTICIPANT_ID: - return getParticipantId(); - - case IS_LEADER: - return Boolean.valueOf(isIsLeader()); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PATH: - return isSetPath(); - case PARTICIPANT_ID: - return isSetParticipantId(); - case IS_LEADER: - return isSetIsLeader(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof LeaderEvent) - return this.equals((LeaderEvent)that); - return false; - } - - public boolean equals(LeaderEvent that) { - if (that == null) - return false; - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_participantId = true && this.isSetParticipantId(); - boolean that_present_participantId = true && that.isSetParticipantId(); - if (this_present_participantId || that_present_participantId) { - if (!(this_present_participantId && that_present_participantId)) - return false; - if (!this.participantId.equals(that.participantId)) - return false; - } - - boolean this_present_isLeader = true; - boolean that_present_isLeader = true; - if (this_present_isLeader || that_present_isLeader) { - if (!(this_present_isLeader && that_present_isLeader)) - return false; - if (this.isLeader != that.isLeader) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(LeaderEvent other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetParticipantId()).compareTo(other.isSetParticipantId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetParticipantId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.participantId, other.participantId); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIsLeader()).compareTo(other.isSetIsLeader()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsLeader()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isLeader, other.isLeader); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("LeaderEvent("); - boolean first = true; - - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - if (!first) sb.append(", "); - sb.append("participantId:"); - if (this.participantId == null) { - sb.append("null"); - } else { - sb.append(this.participantId); - } - first = false; - if (!first) sb.append(", "); - sb.append("isLeader:"); - sb.append(this.isLeader); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class LeaderEventStandardSchemeFactory implements SchemeFactory { - public LeaderEventStandardScheme getScheme() { - return new LeaderEventStandardScheme(); - } - } - - private static class LeaderEventStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, LeaderEvent struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // PARTICIPANT_ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.participantId = iprot.readString(); - struct.setParticipantIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // IS_LEADER - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isLeader = iprot.readBool(); - struct.setIsLeaderIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, LeaderEvent struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - if (struct.participantId != null) { - oprot.writeFieldBegin(PARTICIPANT_ID_FIELD_DESC); - oprot.writeString(struct.participantId); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(IS_LEADER_FIELD_DESC); - oprot.writeBool(struct.isLeader); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class LeaderEventTupleSchemeFactory implements SchemeFactory { - public LeaderEventTupleScheme getScheme() { - return new LeaderEventTupleScheme(); - } - } - - private static class LeaderEventTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, LeaderEvent struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPath()) { - optionals.set(0); - } - if (struct.isSetParticipantId()) { - optionals.set(1); - } - if (struct.isSetIsLeader()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetParticipantId()) { - oprot.writeString(struct.participantId); - } - if (struct.isSetIsLeader()) { - oprot.writeBool(struct.isLeader); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, LeaderEvent struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - if (incoming.get(1)) { - struct.participantId = iprot.readString(); - struct.setParticipantIdIsSet(true); - } - if (incoming.get(2)) { - struct.isLeader = iprot.readBool(); - struct.setIsLeaderIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/LeaderProjection.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/LeaderProjection.java deleted file mode 100644 index e5ddff9564..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/LeaderProjection.java +++ /dev/null @@ -1,388 +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 LeaderProjection implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LeaderProjection"); - - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new LeaderProjectionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new LeaderProjectionTupleSchemeFactory()); - } - - public String id; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ID((short)1, "id"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ID - return ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LeaderProjection.class, metaDataMap); - } - - public LeaderProjection() { - } - - public LeaderProjection( - String id) - { - this(); - this.id = id; - } - - /** - * Performs a deep copy on other. - */ - public LeaderProjection(LeaderProjection other) { - if (other.isSetId()) { - this.id = other.id; - } - } - - public LeaderProjection deepCopy() { - return new LeaderProjection(this); - } - - @Override - public void clear() { - this.id = null; - } - - public String getId() { - return this.id; - } - - public LeaderProjection setId(String id) { - this.id = id; - return this; - } - - public void unsetId() { - this.id = null; - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return this.id != null; - } - - public void setIdIsSet(boolean value) { - if (!value) { - this.id = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ID: - if (value == null) { - unsetId(); - } else { - setId((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ID: - return getId(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ID: - return isSetId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof LeaderProjection) - return this.equals((LeaderProjection)that); - return false; - } - - public boolean equals(LeaderProjection that) { - if (that == null) - return false; - - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (!this.id.equals(that.id)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(LeaderProjection other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("LeaderProjection("); - boolean first = true; - - sb.append("id:"); - if (this.id == null) { - sb.append("null"); - } else { - sb.append(this.id); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class LeaderProjectionStandardSchemeFactory implements SchemeFactory { - public LeaderProjectionStandardScheme getScheme() { - return new LeaderProjectionStandardScheme(); - } - } - - private static class LeaderProjectionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, LeaderProjection struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, LeaderProjection struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.id != null) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeString(struct.id); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class LeaderProjectionTupleSchemeFactory implements SchemeFactory { - public LeaderProjectionTupleScheme getScheme() { - return new LeaderProjectionTupleScheme(); - } - } - - private static class LeaderProjectionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, LeaderProjection struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetId()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetId()) { - oprot.writeString(struct.id); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, LeaderProjection struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/LeaderResult.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/LeaderResult.java deleted file mode 100644 index 4fba9d6e39..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/LeaderResult.java +++ /dev/null @@ -1,491 +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 LeaderResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LeaderResult"); - - private static final org.apache.thrift.protocol.TField PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("projection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - private static final org.apache.thrift.protocol.TField IS_LEADER_FIELD_DESC = new org.apache.thrift.protocol.TField("isLeader", org.apache.thrift.protocol.TType.BOOL, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new LeaderResultStandardSchemeFactory()); - schemes.put(TupleScheme.class, new LeaderResultTupleSchemeFactory()); - } - - public LeaderProjection projection; // required - public boolean isLeader; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PROJECTION((short)1, "projection"), - IS_LEADER((short)2, "isLeader"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PROJECTION - return PROJECTION; - case 2: // IS_LEADER - return IS_LEADER; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ISLEADER_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("projection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LeaderProjection.class))); - tmpMap.put(_Fields.IS_LEADER, new org.apache.thrift.meta_data.FieldMetaData("isLeader", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LeaderResult.class, metaDataMap); - } - - public LeaderResult() { - } - - public LeaderResult( - LeaderProjection projection, - boolean isLeader) - { - this(); - this.projection = projection; - this.isLeader = isLeader; - setIsLeaderIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public LeaderResult(LeaderResult other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetProjection()) { - this.projection = new LeaderProjection(other.projection); - } - this.isLeader = other.isLeader; - } - - public LeaderResult deepCopy() { - return new LeaderResult(this); - } - - @Override - public void clear() { - this.projection = null; - setIsLeaderIsSet(false); - this.isLeader = false; - } - - public LeaderProjection getProjection() { - return this.projection; - } - - public LeaderResult setProjection(LeaderProjection projection) { - this.projection = projection; - return this; - } - - public void unsetProjection() { - this.projection = null; - } - - /** Returns true if field projection is set (has been assigned a value) and false otherwise */ - public boolean isSetProjection() { - return this.projection != null; - } - - public void setProjectionIsSet(boolean value) { - if (!value) { - this.projection = null; - } - } - - public boolean isIsLeader() { - return this.isLeader; - } - - public LeaderResult setIsLeader(boolean isLeader) { - this.isLeader = isLeader; - setIsLeaderIsSet(true); - return this; - } - - public void unsetIsLeader() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISLEADER_ISSET_ID); - } - - /** Returns true if field isLeader is set (has been assigned a value) and false otherwise */ - public boolean isSetIsLeader() { - return EncodingUtils.testBit(__isset_bitfield, __ISLEADER_ISSET_ID); - } - - public void setIsLeaderIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISLEADER_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PROJECTION: - if (value == null) { - unsetProjection(); - } else { - setProjection((LeaderProjection)value); - } - break; - - case IS_LEADER: - if (value == null) { - unsetIsLeader(); - } else { - setIsLeader((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PROJECTION: - return getProjection(); - - case IS_LEADER: - return Boolean.valueOf(isIsLeader()); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PROJECTION: - return isSetProjection(); - case IS_LEADER: - return isSetIsLeader(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof LeaderResult) - return this.equals((LeaderResult)that); - return false; - } - - public boolean equals(LeaderResult that) { - if (that == null) - return false; - - boolean this_present_projection = true && this.isSetProjection(); - boolean that_present_projection = true && that.isSetProjection(); - if (this_present_projection || that_present_projection) { - if (!(this_present_projection && that_present_projection)) - return false; - if (!this.projection.equals(that.projection)) - return false; - } - - boolean this_present_isLeader = true; - boolean that_present_isLeader = true; - if (this_present_isLeader || that_present_isLeader) { - if (!(this_present_isLeader && that_present_isLeader)) - return false; - if (this.isLeader != that.isLeader) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(LeaderResult other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetProjection()).compareTo(other.isSetProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.projection, other.projection); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIsLeader()).compareTo(other.isSetIsLeader()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsLeader()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isLeader, other.isLeader); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("LeaderResult("); - boolean first = true; - - sb.append("projection:"); - if (this.projection == null) { - sb.append("null"); - } else { - sb.append(this.projection); - } - first = false; - if (!first) sb.append(", "); - sb.append("isLeader:"); - sb.append(this.isLeader); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (projection != null) { - projection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class LeaderResultStandardSchemeFactory implements SchemeFactory { - public LeaderResultStandardScheme getScheme() { - return new LeaderResultStandardScheme(); - } - } - - private static class LeaderResultStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, LeaderResult struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.projection = new LeaderProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // IS_LEADER - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isLeader = iprot.readBool(); - struct.setIsLeaderIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, LeaderResult struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.projection != null) { - oprot.writeFieldBegin(PROJECTION_FIELD_DESC); - struct.projection.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(IS_LEADER_FIELD_DESC); - oprot.writeBool(struct.isLeader); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class LeaderResultTupleSchemeFactory implements SchemeFactory { - public LeaderResultTupleScheme getScheme() { - return new LeaderResultTupleScheme(); - } - } - - private static class LeaderResultTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, LeaderResult struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetProjection()) { - optionals.set(0); - } - if (struct.isSetIsLeader()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetProjection()) { - struct.projection.write(oprot); - } - if (struct.isSetIsLeader()) { - oprot.writeBool(struct.isLeader); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, LeaderResult struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.projection = new LeaderProjection(); - struct.projection.read(iprot); - struct.setProjectionIsSet(true); - } - if (incoming.get(1)) { - struct.isLeader = iprot.readBool(); - struct.setIsLeaderIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/LeaseProjection.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/LeaseProjection.java deleted file mode 100644 index d14f14dea4..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/LeaseProjection.java +++ /dev/null @@ -1,388 +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 LeaseProjection implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LeaseProjection"); - - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new LeaseProjectionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new LeaseProjectionTupleSchemeFactory()); - } - - public String id; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ID((short)1, "id"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ID - return ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LeaseProjection.class, metaDataMap); - } - - public LeaseProjection() { - } - - public LeaseProjection( - String id) - { - this(); - this.id = id; - } - - /** - * Performs a deep copy on other. - */ - public LeaseProjection(LeaseProjection other) { - if (other.isSetId()) { - this.id = other.id; - } - } - - public LeaseProjection deepCopy() { - return new LeaseProjection(this); - } - - @Override - public void clear() { - this.id = null; - } - - public String getId() { - return this.id; - } - - public LeaseProjection setId(String id) { - this.id = id; - return this; - } - - public void unsetId() { - this.id = null; - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return this.id != null; - } - - public void setIdIsSet(boolean value) { - if (!value) { - this.id = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ID: - if (value == null) { - unsetId(); - } else { - setId((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ID: - return getId(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ID: - return isSetId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof LeaseProjection) - return this.equals((LeaseProjection)that); - return false; - } - - public boolean equals(LeaseProjection that) { - if (that == null) - return false; - - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (!this.id.equals(that.id)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(LeaseProjection other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("LeaseProjection("); - boolean first = true; - - sb.append("id:"); - if (this.id == null) { - sb.append("null"); - } else { - sb.append(this.id); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class LeaseProjectionStandardSchemeFactory implements SchemeFactory { - public LeaseProjectionStandardScheme getScheme() { - return new LeaseProjectionStandardScheme(); - } - } - - private static class LeaseProjectionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, LeaseProjection struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, LeaseProjection struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.id != null) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeString(struct.id); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class LeaseProjectionTupleSchemeFactory implements SchemeFactory { - public LeaseProjectionTupleScheme getScheme() { - return new LeaseProjectionTupleScheme(); - } - } - - private static class LeaseProjectionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, LeaseProjection struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetId()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetId()) { - oprot.writeString(struct.id); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, LeaseProjection struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/LockProjection.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/LockProjection.java deleted file mode 100644 index 4927e72e7b..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/LockProjection.java +++ /dev/null @@ -1,388 +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 LockProjection implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LockProjection"); - - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new LockProjectionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new LockProjectionTupleSchemeFactory()); - } - - public String id; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ID((short)1, "id"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ID - return ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LockProjection.class, metaDataMap); - } - - public LockProjection() { - } - - public LockProjection( - String id) - { - this(); - this.id = id; - } - - /** - * Performs a deep copy on other. - */ - public LockProjection(LockProjection other) { - if (other.isSetId()) { - this.id = other.id; - } - } - - public LockProjection deepCopy() { - return new LockProjection(this); - } - - @Override - public void clear() { - this.id = null; - } - - public String getId() { - return this.id; - } - - public LockProjection setId(String id) { - this.id = id; - return this; - } - - public void unsetId() { - this.id = null; - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return this.id != null; - } - - public void setIdIsSet(boolean value) { - if (!value) { - this.id = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ID: - if (value == null) { - unsetId(); - } else { - setId((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ID: - return getId(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ID: - return isSetId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof LockProjection) - return this.equals((LockProjection)that); - return false; - } - - public boolean equals(LockProjection that) { - if (that == null) - return false; - - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (!this.id.equals(that.id)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(LockProjection other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("LockProjection("); - boolean first = true; - - sb.append("id:"); - if (this.id == null) { - sb.append("null"); - } else { - sb.append(this.id); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class LockProjectionStandardSchemeFactory implements SchemeFactory { - public LockProjectionStandardScheme getScheme() { - return new LockProjectionStandardScheme(); - } - } - - private static class LockProjectionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, LockProjection struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, LockProjection struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.id != null) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeString(struct.id); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class LockProjectionTupleSchemeFactory implements SchemeFactory { - public LockProjectionTupleScheme getScheme() { - return new LockProjectionTupleScheme(); - } - } - - private static class LockProjectionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, LockProjection struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetId()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetId()) { - oprot.writeString(struct.id); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, LockProjection struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/NodeCacheProjection.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/NodeCacheProjection.java deleted file mode 100644 index c5f6df9775..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/NodeCacheProjection.java +++ /dev/null @@ -1,388 +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 NodeCacheProjection implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NodeCacheProjection"); - - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new NodeCacheProjectionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new NodeCacheProjectionTupleSchemeFactory()); - } - - public String id; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ID((short)1, "id"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ID - return ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NodeCacheProjection.class, metaDataMap); - } - - public NodeCacheProjection() { - } - - public NodeCacheProjection( - String id) - { - this(); - this.id = id; - } - - /** - * Performs a deep copy on other. - */ - public NodeCacheProjection(NodeCacheProjection other) { - if (other.isSetId()) { - this.id = other.id; - } - } - - public NodeCacheProjection deepCopy() { - return new NodeCacheProjection(this); - } - - @Override - public void clear() { - this.id = null; - } - - public String getId() { - return this.id; - } - - public NodeCacheProjection setId(String id) { - this.id = id; - return this; - } - - public void unsetId() { - this.id = null; - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return this.id != null; - } - - public void setIdIsSet(boolean value) { - if (!value) { - this.id = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ID: - if (value == null) { - unsetId(); - } else { - setId((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ID: - return getId(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ID: - return isSetId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof NodeCacheProjection) - return this.equals((NodeCacheProjection)that); - return false; - } - - public boolean equals(NodeCacheProjection that) { - if (that == null) - return false; - - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (!this.id.equals(that.id)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(NodeCacheProjection other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("NodeCacheProjection("); - boolean first = true; - - sb.append("id:"); - if (this.id == null) { - sb.append("null"); - } else { - sb.append(this.id); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class NodeCacheProjectionStandardSchemeFactory implements SchemeFactory { - public NodeCacheProjectionStandardScheme getScheme() { - return new NodeCacheProjectionStandardScheme(); - } - } - - private static class NodeCacheProjectionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, NodeCacheProjection struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, NodeCacheProjection struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.id != null) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeString(struct.id); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class NodeCacheProjectionTupleSchemeFactory implements SchemeFactory { - public NodeCacheProjectionTupleScheme getScheme() { - return new NodeCacheProjectionTupleScheme(); - } - } - - private static class NodeCacheProjectionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, NodeCacheProjection struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetId()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetId()) { - oprot.writeString(struct.id); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, NodeCacheProjection struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/NodeExceptionType.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/NodeExceptionType.java deleted file mode 100644 index fb2a98948e..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/NodeExceptionType.java +++ /dev/null @@ -1,51 +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 java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum NodeExceptionType implements org.apache.thrift.TEnum { - NONODE(0), - BADVERSION(1), - NODEEXISTS(2), - NOTEMPTY(3); - - private final int value; - - private NodeExceptionType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static NodeExceptionType findByValue(int value) { - switch (value) { - case 0: - return NONODE; - case 1: - return BADVERSION; - case 2: - return NODEEXISTS; - case 3: - return NOTEMPTY; - default: - return null; - } - } -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalChildrenList.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalChildrenList.java deleted file mode 100644 index e052215dee..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalChildrenList.java +++ /dev/null @@ -1,437 +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 OptionalChildrenList implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OptionalChildrenList"); - - private static final org.apache.thrift.protocol.TField CHILDREN_FIELD_DESC = new org.apache.thrift.protocol.TField("children", org.apache.thrift.protocol.TType.LIST, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new OptionalChildrenListStandardSchemeFactory()); - schemes.put(TupleScheme.class, new OptionalChildrenListTupleSchemeFactory()); - } - - public List children; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - CHILDREN((short)1, "children"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // CHILDREN - return CHILDREN; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.CHILDREN, new org.apache.thrift.meta_data.FieldMetaData("children", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OptionalChildrenList.class, metaDataMap); - } - - public OptionalChildrenList() { - } - - public OptionalChildrenList( - List children) - { - this(); - this.children = children; - } - - /** - * Performs a deep copy on other. - */ - public OptionalChildrenList(OptionalChildrenList other) { - if (other.isSetChildren()) { - List __this__children = new ArrayList(other.children); - this.children = __this__children; - } - } - - public OptionalChildrenList deepCopy() { - return new OptionalChildrenList(this); - } - - @Override - public void clear() { - this.children = null; - } - - public int getChildrenSize() { - return (this.children == null) ? 0 : this.children.size(); - } - - public java.util.Iterator getChildrenIterator() { - return (this.children == null) ? null : this.children.iterator(); - } - - public void addToChildren(String elem) { - if (this.children == null) { - this.children = new ArrayList(); - } - this.children.add(elem); - } - - public List getChildren() { - return this.children; - } - - public OptionalChildrenList setChildren(List children) { - this.children = children; - return this; - } - - public void unsetChildren() { - this.children = null; - } - - /** Returns true if field children is set (has been assigned a value) and false otherwise */ - public boolean isSetChildren() { - return this.children != null; - } - - public void setChildrenIsSet(boolean value) { - if (!value) { - this.children = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case CHILDREN: - if (value == null) { - unsetChildren(); - } else { - setChildren((List)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case CHILDREN: - return getChildren(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case CHILDREN: - return isSetChildren(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof OptionalChildrenList) - return this.equals((OptionalChildrenList)that); - return false; - } - - public boolean equals(OptionalChildrenList that) { - if (that == null) - return false; - - boolean this_present_children = true && this.isSetChildren(); - boolean that_present_children = true && that.isSetChildren(); - if (this_present_children || that_present_children) { - if (!(this_present_children && that_present_children)) - return false; - if (!this.children.equals(that.children)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(OptionalChildrenList other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetChildren()).compareTo(other.isSetChildren()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetChildren()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.children, other.children); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("OptionalChildrenList("); - boolean first = true; - - sb.append("children:"); - if (this.children == null) { - sb.append("null"); - } else { - sb.append(this.children); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class OptionalChildrenListStandardSchemeFactory implements SchemeFactory { - public OptionalChildrenListStandardScheme getScheme() { - return new OptionalChildrenListStandardScheme(); - } - } - - private static class OptionalChildrenListStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, OptionalChildrenList struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // CHILDREN - if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { - { - org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); - struct.children = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - String _elem2; - _elem2 = iprot.readString(); - struct.children.add(_elem2); - } - iprot.readListEnd(); - } - struct.setChildrenIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, OptionalChildrenList struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.children != null) { - oprot.writeFieldBegin(CHILDREN_FIELD_DESC); - { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.children.size())); - for (String _iter3 : struct.children) - { - oprot.writeString(_iter3); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class OptionalChildrenListTupleSchemeFactory implements SchemeFactory { - public OptionalChildrenListTupleScheme getScheme() { - return new OptionalChildrenListTupleScheme(); - } - } - - private static class OptionalChildrenListTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, OptionalChildrenList struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetChildren()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetChildren()) { - { - oprot.writeI32(struct.children.size()); - for (String _iter4 : struct.children) - { - oprot.writeString(_iter4); - } - } - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, OptionalChildrenList struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - { - org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.children = new ArrayList(_list5.size); - for (int _i6 = 0; _i6 < _list5.size; ++_i6) - { - String _elem7; - _elem7 = iprot.readString(); - struct.children.add(_elem7); - } - } - struct.setChildrenIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalData.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalData.java deleted file mode 100644 index c9b720b961..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalData.java +++ /dev/null @@ -1,399 +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 OptionalData implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OptionalData"); - - private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new OptionalDataStandardSchemeFactory()); - schemes.put(TupleScheme.class, new OptionalDataTupleSchemeFactory()); - } - - public ByteBuffer data; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - DATA((short)1, "data"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // DATA - return DATA; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OptionalData.class, metaDataMap); - } - - public OptionalData() { - } - - public OptionalData( - ByteBuffer data) - { - this(); - this.data = data; - } - - /** - * Performs a deep copy on other. - */ - public OptionalData(OptionalData other) { - if (other.isSetData()) { - this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data); -; - } - } - - public OptionalData deepCopy() { - return new OptionalData(this); - } - - @Override - public void clear() { - this.data = null; - } - - public byte[] getData() { - setData(org.apache.thrift.TBaseHelper.rightSize(data)); - return data == null ? null : data.array(); - } - - public ByteBuffer bufferForData() { - return data; - } - - public OptionalData setData(byte[] data) { - setData(data == null ? (ByteBuffer)null : ByteBuffer.wrap(data)); - return this; - } - - public OptionalData setData(ByteBuffer data) { - this.data = data; - return this; - } - - public void unsetData() { - this.data = null; - } - - /** Returns true if field data is set (has been assigned a value) and false otherwise */ - public boolean isSetData() { - return this.data != null; - } - - public void setDataIsSet(boolean value) { - if (!value) { - this.data = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case DATA: - if (value == null) { - unsetData(); - } else { - setData((ByteBuffer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case DATA: - return getData(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case DATA: - return isSetData(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof OptionalData) - return this.equals((OptionalData)that); - return false; - } - - public boolean equals(OptionalData that) { - if (that == null) - return false; - - boolean this_present_data = true && this.isSetData(); - boolean that_present_data = true && that.isSetData(); - if (this_present_data || that_present_data) { - if (!(this_present_data && that_present_data)) - return false; - if (!this.data.equals(that.data)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(OptionalData other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("OptionalData("); - boolean first = true; - - sb.append("data:"); - if (this.data == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.data, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class OptionalDataStandardSchemeFactory implements SchemeFactory { - public OptionalDataStandardScheme getScheme() { - return new OptionalDataStandardScheme(); - } - } - - private static class OptionalDataStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, OptionalData struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // DATA - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.data = iprot.readBinary(); - struct.setDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, OptionalData struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.data != null) { - oprot.writeFieldBegin(DATA_FIELD_DESC); - oprot.writeBinary(struct.data); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class OptionalDataTupleSchemeFactory implements SchemeFactory { - public OptionalDataTupleScheme getScheme() { - return new OptionalDataTupleScheme(); - } - } - - private static class OptionalDataTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, OptionalData struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetData()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetData()) { - oprot.writeBinary(struct.data); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, OptionalData struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.data = iprot.readBinary(); - struct.setDataIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalLockProjection.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalLockProjection.java deleted file mode 100644 index 8e9c6291e8..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalLockProjection.java +++ /dev/null @@ -1,393 +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 OptionalLockProjection implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OptionalLockProjection"); - - private static final org.apache.thrift.protocol.TField LOCK_PROJECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("lockProjection", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new OptionalLockProjectionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new OptionalLockProjectionTupleSchemeFactory()); - } - - public LockProjection lockProjection; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - LOCK_PROJECTION((short)1, "lockProjection"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // LOCK_PROJECTION - return LOCK_PROJECTION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.LOCK_PROJECTION, new org.apache.thrift.meta_data.FieldMetaData("lockProjection", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LockProjection.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OptionalLockProjection.class, metaDataMap); - } - - public OptionalLockProjection() { - } - - public OptionalLockProjection( - LockProjection lockProjection) - { - this(); - this.lockProjection = lockProjection; - } - - /** - * Performs a deep copy on other. - */ - public OptionalLockProjection(OptionalLockProjection other) { - if (other.isSetLockProjection()) { - this.lockProjection = new LockProjection(other.lockProjection); - } - } - - public OptionalLockProjection deepCopy() { - return new OptionalLockProjection(this); - } - - @Override - public void clear() { - this.lockProjection = null; - } - - public LockProjection getLockProjection() { - return this.lockProjection; - } - - public OptionalLockProjection setLockProjection(LockProjection lockProjection) { - this.lockProjection = lockProjection; - return this; - } - - public void unsetLockProjection() { - this.lockProjection = null; - } - - /** Returns true if field lockProjection is set (has been assigned a value) and false otherwise */ - public boolean isSetLockProjection() { - return this.lockProjection != null; - } - - public void setLockProjectionIsSet(boolean value) { - if (!value) { - this.lockProjection = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case LOCK_PROJECTION: - if (value == null) { - unsetLockProjection(); - } else { - setLockProjection((LockProjection)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case LOCK_PROJECTION: - return getLockProjection(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case LOCK_PROJECTION: - return isSetLockProjection(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof OptionalLockProjection) - return this.equals((OptionalLockProjection)that); - return false; - } - - public boolean equals(OptionalLockProjection that) { - if (that == null) - return false; - - boolean this_present_lockProjection = true && this.isSetLockProjection(); - boolean that_present_lockProjection = true && that.isSetLockProjection(); - if (this_present_lockProjection || that_present_lockProjection) { - if (!(this_present_lockProjection && that_present_lockProjection)) - return false; - if (!this.lockProjection.equals(that.lockProjection)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(OptionalLockProjection other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetLockProjection()).compareTo(other.isSetLockProjection()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetLockProjection()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lockProjection, other.lockProjection); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("OptionalLockProjection("); - boolean first = true; - - sb.append("lockProjection:"); - if (this.lockProjection == null) { - sb.append("null"); - } else { - sb.append(this.lockProjection); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (lockProjection != null) { - lockProjection.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class OptionalLockProjectionStandardSchemeFactory implements SchemeFactory { - public OptionalLockProjectionStandardScheme getScheme() { - return new OptionalLockProjectionStandardScheme(); - } - } - - private static class OptionalLockProjectionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, OptionalLockProjection struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // LOCK_PROJECTION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.lockProjection = new LockProjection(); - struct.lockProjection.read(iprot); - struct.setLockProjectionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, OptionalLockProjection struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.lockProjection != null) { - oprot.writeFieldBegin(LOCK_PROJECTION_FIELD_DESC); - struct.lockProjection.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class OptionalLockProjectionTupleSchemeFactory implements SchemeFactory { - public OptionalLockProjectionTupleScheme getScheme() { - return new OptionalLockProjectionTupleScheme(); - } - } - - private static class OptionalLockProjectionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, OptionalLockProjection struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetLockProjection()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetLockProjection()) { - struct.lockProjection.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, OptionalLockProjection struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.lockProjection = new LockProjection(); - struct.lockProjection.read(iprot); - struct.setLockProjectionIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalPath.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalPath.java deleted file mode 100644 index e4d8bcd0bd..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalPath.java +++ /dev/null @@ -1,388 +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 OptionalPath implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OptionalPath"); - - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new OptionalPathStandardSchemeFactory()); - schemes.put(TupleScheme.class, new OptionalPathTupleSchemeFactory()); - } - - public String path; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PATH((short)1, "path"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PATH - return PATH; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OptionalPath.class, metaDataMap); - } - - public OptionalPath() { - } - - public OptionalPath( - String path) - { - this(); - this.path = path; - } - - /** - * Performs a deep copy on other. - */ - public OptionalPath(OptionalPath other) { - if (other.isSetPath()) { - this.path = other.path; - } - } - - public OptionalPath deepCopy() { - return new OptionalPath(this); - } - - @Override - public void clear() { - this.path = null; - } - - public String getPath() { - return this.path; - } - - public OptionalPath setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PATH: - return getPath(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PATH: - return isSetPath(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof OptionalPath) - return this.equals((OptionalPath)that); - return false; - } - - public boolean equals(OptionalPath that) { - if (that == null) - return false; - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(OptionalPath other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("OptionalPath("); - boolean first = true; - - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class OptionalPathStandardSchemeFactory implements SchemeFactory { - public OptionalPathStandardScheme getScheme() { - return new OptionalPathStandardScheme(); - } - } - - private static class OptionalPathStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, OptionalPath struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, OptionalPath struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class OptionalPathTupleSchemeFactory implements SchemeFactory { - public OptionalPathTupleScheme getScheme() { - return new OptionalPathTupleScheme(); - } - } - - private static class OptionalPathTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, OptionalPath struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPath()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, OptionalPath struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalStat.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalStat.java deleted file mode 100644 index c06929aa89..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/OptionalStat.java +++ /dev/null @@ -1,393 +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 OptionalStat implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OptionalStat"); - - private static final org.apache.thrift.protocol.TField STAT_FIELD_DESC = new org.apache.thrift.protocol.TField("stat", org.apache.thrift.protocol.TType.STRUCT, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new OptionalStatStandardSchemeFactory()); - schemes.put(TupleScheme.class, new OptionalStatTupleSchemeFactory()); - } - - public Stat stat; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - STAT((short)1, "stat"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // STAT - return STAT; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.STAT, new org.apache.thrift.meta_data.FieldMetaData("stat", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Stat.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OptionalStat.class, metaDataMap); - } - - public OptionalStat() { - } - - public OptionalStat( - Stat stat) - { - this(); - this.stat = stat; - } - - /** - * Performs a deep copy on other. - */ - public OptionalStat(OptionalStat other) { - if (other.isSetStat()) { - this.stat = new Stat(other.stat); - } - } - - public OptionalStat deepCopy() { - return new OptionalStat(this); - } - - @Override - public void clear() { - this.stat = null; - } - - public Stat getStat() { - return this.stat; - } - - public OptionalStat setStat(Stat stat) { - this.stat = stat; - return this; - } - - public void unsetStat() { - this.stat = null; - } - - /** Returns true if field stat is set (has been assigned a value) and false otherwise */ - public boolean isSetStat() { - return this.stat != null; - } - - public void setStatIsSet(boolean value) { - if (!value) { - this.stat = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case STAT: - if (value == null) { - unsetStat(); - } else { - setStat((Stat)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case STAT: - return getStat(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case STAT: - return isSetStat(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof OptionalStat) - return this.equals((OptionalStat)that); - return false; - } - - public boolean equals(OptionalStat that) { - if (that == null) - return false; - - boolean this_present_stat = true && this.isSetStat(); - boolean that_present_stat = true && that.isSetStat(); - if (this_present_stat || that_present_stat) { - if (!(this_present_stat && that_present_stat)) - return false; - if (!this.stat.equals(that.stat)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(OptionalStat other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetStat()).compareTo(other.isSetStat()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetStat()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stat, other.stat); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("OptionalStat("); - boolean first = true; - - sb.append("stat:"); - if (this.stat == null) { - sb.append("null"); - } else { - sb.append(this.stat); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (stat != null) { - stat.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class OptionalStatStandardSchemeFactory implements SchemeFactory { - public OptionalStatStandardScheme getScheme() { - return new OptionalStatStandardScheme(); - } - } - - private static class OptionalStatStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, OptionalStat struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // STAT - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.stat = new Stat(); - struct.stat.read(iprot); - struct.setStatIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, OptionalStat struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.stat != null) { - oprot.writeFieldBegin(STAT_FIELD_DESC); - struct.stat.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class OptionalStatTupleSchemeFactory implements SchemeFactory { - public OptionalStatTupleScheme getScheme() { - return new OptionalStatTupleScheme(); - } - } - - private static class OptionalStatTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, OptionalStat struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetStat()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetStat()) { - struct.stat.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, OptionalStat struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.stat = new Stat(); - struct.stat.read(iprot); - struct.setStatIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/Participant.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/Participant.java deleted file mode 100644 index d93b645462..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/Participant.java +++ /dev/null @@ -1,486 +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 Participant implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Participant"); - - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField IS_LEADER_FIELD_DESC = new org.apache.thrift.protocol.TField("isLeader", org.apache.thrift.protocol.TType.BOOL, (short)2); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new ParticipantStandardSchemeFactory()); - schemes.put(TupleScheme.class, new ParticipantTupleSchemeFactory()); - } - - public String id; // required - public boolean isLeader; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ID((short)1, "id"), - IS_LEADER((short)2, "isLeader"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ID - return ID; - case 2: // IS_LEADER - return IS_LEADER; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __ISLEADER_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.IS_LEADER, new org.apache.thrift.meta_data.FieldMetaData("isLeader", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Participant.class, metaDataMap); - } - - public Participant() { - } - - public Participant( - String id, - boolean isLeader) - { - this(); - this.id = id; - this.isLeader = isLeader; - setIsLeaderIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public Participant(Participant other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetId()) { - this.id = other.id; - } - this.isLeader = other.isLeader; - } - - public Participant deepCopy() { - return new Participant(this); - } - - @Override - public void clear() { - this.id = null; - setIsLeaderIsSet(false); - this.isLeader = false; - } - - public String getId() { - return this.id; - } - - public Participant setId(String id) { - this.id = id; - return this; - } - - public void unsetId() { - this.id = null; - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return this.id != null; - } - - public void setIdIsSet(boolean value) { - if (!value) { - this.id = null; - } - } - - public boolean isIsLeader() { - return this.isLeader; - } - - public Participant setIsLeader(boolean isLeader) { - this.isLeader = isLeader; - setIsLeaderIsSet(true); - return this; - } - - public void unsetIsLeader() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISLEADER_ISSET_ID); - } - - /** Returns true if field isLeader is set (has been assigned a value) and false otherwise */ - public boolean isSetIsLeader() { - return EncodingUtils.testBit(__isset_bitfield, __ISLEADER_ISSET_ID); - } - - public void setIsLeaderIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISLEADER_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ID: - if (value == null) { - unsetId(); - } else { - setId((String)value); - } - break; - - case IS_LEADER: - if (value == null) { - unsetIsLeader(); - } else { - setIsLeader((Boolean)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ID: - return getId(); - - case IS_LEADER: - return Boolean.valueOf(isIsLeader()); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ID: - return isSetId(); - case IS_LEADER: - return isSetIsLeader(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Participant) - return this.equals((Participant)that); - return false; - } - - public boolean equals(Participant that) { - if (that == null) - return false; - - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (!this.id.equals(that.id)) - return false; - } - - boolean this_present_isLeader = true; - boolean that_present_isLeader = true; - if (this_present_isLeader || that_present_isLeader) { - if (!(this_present_isLeader && that_present_isLeader)) - return false; - if (this.isLeader != that.isLeader) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(Participant other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetIsLeader()).compareTo(other.isSetIsLeader()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetIsLeader()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isLeader, other.isLeader); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Participant("); - boolean first = true; - - sb.append("id:"); - if (this.id == null) { - sb.append("null"); - } else { - sb.append(this.id); - } - first = false; - if (!first) sb.append(", "); - sb.append("isLeader:"); - sb.append(this.isLeader); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class ParticipantStandardSchemeFactory implements SchemeFactory { - public ParticipantStandardScheme getScheme() { - return new ParticipantStandardScheme(); - } - } - - private static class ParticipantStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, Participant struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // IS_LEADER - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.isLeader = iprot.readBool(); - struct.setIsLeaderIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, Participant struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.id != null) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeString(struct.id); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(IS_LEADER_FIELD_DESC); - oprot.writeBool(struct.isLeader); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class ParticipantTupleSchemeFactory implements SchemeFactory { - public ParticipantTupleScheme getScheme() { - return new ParticipantTupleScheme(); - } - } - - private static class ParticipantTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, Participant struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetId()) { - optionals.set(0); - } - if (struct.isSetIsLeader()) { - optionals.set(1); - } - oprot.writeBitSet(optionals, 2); - if (struct.isSetId()) { - oprot.writeString(struct.id); - } - if (struct.isSetIsLeader()) { - oprot.writeBool(struct.isLeader); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, Participant struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); - if (incoming.get(0)) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } - if (incoming.get(1)) { - struct.isLeader = iprot.readBool(); - struct.setIsLeaderIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheEvent.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheEvent.java deleted file mode 100644 index 053259282d..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheEvent.java +++ /dev/null @@ -1,609 +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 PathChildrenCacheEvent implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PathChildrenCacheEvent"); - - private static final org.apache.thrift.protocol.TField CACHED_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("cachedPath", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)2); - private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRUCT, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new PathChildrenCacheEventStandardSchemeFactory()); - schemes.put(TupleScheme.class, new PathChildrenCacheEventTupleSchemeFactory()); - } - - public String cachedPath; // required - /** - * - * @see PathChildrenCacheEventType - */ - public PathChildrenCacheEventType type; // required - public ChildData data; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - CACHED_PATH((short)1, "cachedPath"), - /** - * - * @see PathChildrenCacheEventType - */ - TYPE((short)2, "type"), - DATA((short)3, "data"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // CACHED_PATH - return CACHED_PATH; - case 2: // TYPE - return TYPE; - case 3: // DATA - return DATA; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.CACHED_PATH, new org.apache.thrift.meta_data.FieldMetaData("cachedPath", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PathChildrenCacheEventType.class))); - tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ChildData.class))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PathChildrenCacheEvent.class, metaDataMap); - } - - public PathChildrenCacheEvent() { - } - - public PathChildrenCacheEvent( - String cachedPath, - PathChildrenCacheEventType type, - ChildData data) - { - this(); - this.cachedPath = cachedPath; - this.type = type; - this.data = data; - } - - /** - * Performs a deep copy on other. - */ - public PathChildrenCacheEvent(PathChildrenCacheEvent other) { - if (other.isSetCachedPath()) { - this.cachedPath = other.cachedPath; - } - if (other.isSetType()) { - this.type = other.type; - } - if (other.isSetData()) { - this.data = new ChildData(other.data); - } - } - - public PathChildrenCacheEvent deepCopy() { - return new PathChildrenCacheEvent(this); - } - - @Override - public void clear() { - this.cachedPath = null; - this.type = null; - this.data = null; - } - - public String getCachedPath() { - return this.cachedPath; - } - - public PathChildrenCacheEvent setCachedPath(String cachedPath) { - this.cachedPath = cachedPath; - return this; - } - - public void unsetCachedPath() { - this.cachedPath = null; - } - - /** Returns true if field cachedPath is set (has been assigned a value) and false otherwise */ - public boolean isSetCachedPath() { - return this.cachedPath != null; - } - - public void setCachedPathIsSet(boolean value) { - if (!value) { - this.cachedPath = null; - } - } - - /** - * - * @see PathChildrenCacheEventType - */ - public PathChildrenCacheEventType getType() { - return this.type; - } - - /** - * - * @see PathChildrenCacheEventType - */ - public PathChildrenCacheEvent setType(PathChildrenCacheEventType type) { - this.type = type; - return this; - } - - public void unsetType() { - this.type = null; - } - - /** Returns true if field type is set (has been assigned a value) and false otherwise */ - public boolean isSetType() { - return this.type != null; - } - - public void setTypeIsSet(boolean value) { - if (!value) { - this.type = null; - } - } - - public ChildData getData() { - return this.data; - } - - public PathChildrenCacheEvent setData(ChildData data) { - this.data = data; - return this; - } - - public void unsetData() { - this.data = null; - } - - /** Returns true if field data is set (has been assigned a value) and false otherwise */ - public boolean isSetData() { - return this.data != null; - } - - public void setDataIsSet(boolean value) { - if (!value) { - this.data = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case CACHED_PATH: - if (value == null) { - unsetCachedPath(); - } else { - setCachedPath((String)value); - } - break; - - case TYPE: - if (value == null) { - unsetType(); - } else { - setType((PathChildrenCacheEventType)value); - } - break; - - case DATA: - if (value == null) { - unsetData(); - } else { - setData((ChildData)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case CACHED_PATH: - return getCachedPath(); - - case TYPE: - return getType(); - - case DATA: - return getData(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case CACHED_PATH: - return isSetCachedPath(); - case TYPE: - return isSetType(); - case DATA: - return isSetData(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PathChildrenCacheEvent) - return this.equals((PathChildrenCacheEvent)that); - return false; - } - - public boolean equals(PathChildrenCacheEvent that) { - if (that == null) - return false; - - boolean this_present_cachedPath = true && this.isSetCachedPath(); - boolean that_present_cachedPath = true && that.isSetCachedPath(); - if (this_present_cachedPath || that_present_cachedPath) { - if (!(this_present_cachedPath && that_present_cachedPath)) - return false; - if (!this.cachedPath.equals(that.cachedPath)) - return false; - } - - boolean this_present_type = true && this.isSetType(); - boolean that_present_type = true && that.isSetType(); - if (this_present_type || that_present_type) { - if (!(this_present_type && that_present_type)) - return false; - if (!this.type.equals(that.type)) - return false; - } - - boolean this_present_data = true && this.isSetData(); - boolean that_present_data = true && that.isSetData(); - if (this_present_data || that_present_data) { - if (!(this_present_data && that_present_data)) - return false; - if (!this.data.equals(that.data)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(PathChildrenCacheEvent other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetCachedPath()).compareTo(other.isSetCachedPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCachedPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cachedPath, other.cachedPath); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("PathChildrenCacheEvent("); - boolean first = true; - - sb.append("cachedPath:"); - if (this.cachedPath == null) { - sb.append("null"); - } else { - sb.append(this.cachedPath); - } - first = false; - if (!first) sb.append(", "); - sb.append("type:"); - if (this.type == null) { - sb.append("null"); - } else { - sb.append(this.type); - } - first = false; - if (!first) sb.append(", "); - sb.append("data:"); - if (this.data == null) { - sb.append("null"); - } else { - sb.append(this.data); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (data != null) { - data.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class PathChildrenCacheEventStandardSchemeFactory implements SchemeFactory { - public PathChildrenCacheEventStandardScheme getScheme() { - return new PathChildrenCacheEventStandardScheme(); - } - } - - private static class PathChildrenCacheEventStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, PathChildrenCacheEvent struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // CACHED_PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.cachedPath = iprot.readString(); - struct.setCachedPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.type = PathChildrenCacheEventType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // DATA - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.data = new ChildData(); - struct.data.read(iprot); - struct.setDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, PathChildrenCacheEvent struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.cachedPath != null) { - oprot.writeFieldBegin(CACHED_PATH_FIELD_DESC); - oprot.writeString(struct.cachedPath); - oprot.writeFieldEnd(); - } - if (struct.type != null) { - oprot.writeFieldBegin(TYPE_FIELD_DESC); - oprot.writeI32(struct.type.getValue()); - oprot.writeFieldEnd(); - } - if (struct.data != null) { - oprot.writeFieldBegin(DATA_FIELD_DESC); - struct.data.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class PathChildrenCacheEventTupleSchemeFactory implements SchemeFactory { - public PathChildrenCacheEventTupleScheme getScheme() { - return new PathChildrenCacheEventTupleScheme(); - } - } - - private static class PathChildrenCacheEventTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, PathChildrenCacheEvent struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetCachedPath()) { - optionals.set(0); - } - if (struct.isSetType()) { - optionals.set(1); - } - if (struct.isSetData()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetCachedPath()) { - oprot.writeString(struct.cachedPath); - } - if (struct.isSetType()) { - oprot.writeI32(struct.type.getValue()); - } - if (struct.isSetData()) { - struct.data.write(oprot); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, PathChildrenCacheEvent struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.cachedPath = iprot.readString(); - struct.setCachedPathIsSet(true); - } - if (incoming.get(1)) { - struct.type = PathChildrenCacheEventType.findByValue(iprot.readI32()); - struct.setTypeIsSet(true); - } - if (incoming.get(2)) { - struct.data = new ChildData(); - struct.data.read(iprot); - struct.setDataIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheEventType.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheEventType.java deleted file mode 100644 index ad105580fa..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheEventType.java +++ /dev/null @@ -1,60 +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 java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum PathChildrenCacheEventType implements org.apache.thrift.TEnum { - CHILD_ADDED(0), - CHILD_UPDATED(1), - CHILD_REMOVED(2), - CONNECTION_SUSPENDED(3), - CONNECTION_RECONNECTED(4), - CONNECTION_LOST(5), - INITIALIZED(6); - - private final int value; - - private PathChildrenCacheEventType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static PathChildrenCacheEventType findByValue(int value) { - switch (value) { - case 0: - return CHILD_ADDED; - case 1: - return CHILD_UPDATED; - case 2: - return CHILD_REMOVED; - case 3: - return CONNECTION_SUSPENDED; - case 4: - return CONNECTION_RECONNECTED; - case 5: - return CONNECTION_LOST; - case 6: - return INITIALIZED; - default: - return null; - } - } -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheProjection.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheProjection.java deleted file mode 100644 index 555540a1a9..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheProjection.java +++ /dev/null @@ -1,388 +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 PathChildrenCacheProjection implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PathChildrenCacheProjection"); - - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new PathChildrenCacheProjectionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new PathChildrenCacheProjectionTupleSchemeFactory()); - } - - public String id; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ID((short)1, "id"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ID - return ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PathChildrenCacheProjection.class, metaDataMap); - } - - public PathChildrenCacheProjection() { - } - - public PathChildrenCacheProjection( - String id) - { - this(); - this.id = id; - } - - /** - * Performs a deep copy on other. - */ - public PathChildrenCacheProjection(PathChildrenCacheProjection other) { - if (other.isSetId()) { - this.id = other.id; - } - } - - public PathChildrenCacheProjection deepCopy() { - return new PathChildrenCacheProjection(this); - } - - @Override - public void clear() { - this.id = null; - } - - public String getId() { - return this.id; - } - - public PathChildrenCacheProjection setId(String id) { - this.id = id; - return this; - } - - public void unsetId() { - this.id = null; - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return this.id != null; - } - - public void setIdIsSet(boolean value) { - if (!value) { - this.id = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ID: - if (value == null) { - unsetId(); - } else { - setId((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ID: - return getId(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ID: - return isSetId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PathChildrenCacheProjection) - return this.equals((PathChildrenCacheProjection)that); - return false; - } - - public boolean equals(PathChildrenCacheProjection that) { - if (that == null) - return false; - - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (!this.id.equals(that.id)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(PathChildrenCacheProjection other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("PathChildrenCacheProjection("); - boolean first = true; - - sb.append("id:"); - if (this.id == null) { - sb.append("null"); - } else { - sb.append(this.id); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class PathChildrenCacheProjectionStandardSchemeFactory implements SchemeFactory { - public PathChildrenCacheProjectionStandardScheme getScheme() { - return new PathChildrenCacheProjectionStandardScheme(); - } - } - - private static class PathChildrenCacheProjectionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, PathChildrenCacheProjection struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, PathChildrenCacheProjection struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.id != null) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeString(struct.id); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class PathChildrenCacheProjectionTupleSchemeFactory implements SchemeFactory { - public PathChildrenCacheProjectionTupleScheme getScheme() { - return new PathChildrenCacheProjectionTupleScheme(); - } - } - - private static class PathChildrenCacheProjectionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, PathChildrenCacheProjection struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetId()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetId()) { - oprot.writeString(struct.id); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, PathChildrenCacheProjection struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheStartMode.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheStartMode.java deleted file mode 100644 index 757200c779..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/PathChildrenCacheStartMode.java +++ /dev/null @@ -1,48 +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 java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum PathChildrenCacheStartMode implements org.apache.thrift.TEnum { - NORMAL(0), - BUILD_INITIAL_CACHE(1), - POST_INITIALIZED_EVENT(2); - - private final int value; - - private PathChildrenCacheStartMode(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static PathChildrenCacheStartMode findByValue(int value) { - switch (value) { - case 0: - return NORMAL; - case 1: - return BUILD_INITIAL_CACHE; - case 2: - return POST_INITIALIZED_EVENT; - default: - return null; - } - } -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/PersistentEphemeralNodeMode.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/PersistentEphemeralNodeMode.java deleted file mode 100644 index 422d35ff86..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/PersistentEphemeralNodeMode.java +++ /dev/null @@ -1,51 +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 java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum PersistentEphemeralNodeMode implements org.apache.thrift.TEnum { - EPHEMERAL(0), - EPHEMERAL_SEQUENTIAL(1), - PROTECTED_EPHEMERAL(2), - PROTECTED_EPHEMERAL_SEQUENTIAL(3); - - private final int value; - - private PersistentEphemeralNodeMode(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static PersistentEphemeralNodeMode findByValue(int value) { - switch (value) { - case 0: - return EPHEMERAL; - case 1: - return EPHEMERAL_SEQUENTIAL; - case 2: - return PROTECTED_EPHEMERAL; - case 3: - return PROTECTED_EPHEMERAL_SEQUENTIAL; - default: - return null; - } - } -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/PersistentEphemeralNodeProjection.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/PersistentEphemeralNodeProjection.java deleted file mode 100644 index 607f247fe7..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/PersistentEphemeralNodeProjection.java +++ /dev/null @@ -1,388 +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 PersistentEphemeralNodeProjection implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PersistentEphemeralNodeProjection"); - - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new PersistentEphemeralNodeProjectionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new PersistentEphemeralNodeProjectionTupleSchemeFactory()); - } - - public String id; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ID((short)1, "id"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // ID - return ID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PersistentEphemeralNodeProjection.class, metaDataMap); - } - - public PersistentEphemeralNodeProjection() { - } - - public PersistentEphemeralNodeProjection( - String id) - { - this(); - this.id = id; - } - - /** - * Performs a deep copy on other. - */ - public PersistentEphemeralNodeProjection(PersistentEphemeralNodeProjection other) { - if (other.isSetId()) { - this.id = other.id; - } - } - - public PersistentEphemeralNodeProjection deepCopy() { - return new PersistentEphemeralNodeProjection(this); - } - - @Override - public void clear() { - this.id = null; - } - - public String getId() { - return this.id; - } - - public PersistentEphemeralNodeProjection setId(String id) { - this.id = id; - return this; - } - - public void unsetId() { - this.id = null; - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return this.id != null; - } - - public void setIdIsSet(boolean value) { - if (!value) { - this.id = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case ID: - if (value == null) { - unsetId(); - } else { - setId((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case ID: - return getId(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case ID: - return isSetId(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof PersistentEphemeralNodeProjection) - return this.equals((PersistentEphemeralNodeProjection)that); - return false; - } - - public boolean equals(PersistentEphemeralNodeProjection that) { - if (that == null) - return false; - - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (!this.id.equals(that.id)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(PersistentEphemeralNodeProjection other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("PersistentEphemeralNodeProjection("); - boolean first = true; - - sb.append("id:"); - if (this.id == null) { - sb.append("null"); - } else { - sb.append(this.id); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class PersistentEphemeralNodeProjectionStandardSchemeFactory implements SchemeFactory { - public PersistentEphemeralNodeProjectionStandardScheme getScheme() { - return new PersistentEphemeralNodeProjectionStandardScheme(); - } - } - - private static class PersistentEphemeralNodeProjectionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, PersistentEphemeralNodeProjection struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, PersistentEphemeralNodeProjection struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.id != null) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeString(struct.id); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class PersistentEphemeralNodeProjectionTupleSchemeFactory implements SchemeFactory { - public PersistentEphemeralNodeProjectionTupleScheme getScheme() { - return new PersistentEphemeralNodeProjectionTupleScheme(); - } - } - - private static class PersistentEphemeralNodeProjectionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, PersistentEphemeralNodeProjection struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetId()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetId()) { - oprot.writeString(struct.id); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, PersistentEphemeralNodeProjection struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.id = iprot.readString(); - struct.setIdIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/ProviderStrategyType.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/ProviderStrategyType.java deleted file mode 100644 index d34ddab753..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/ProviderStrategyType.java +++ /dev/null @@ -1,51 +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 java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum ProviderStrategyType implements org.apache.thrift.TEnum { - RANDOM(0), - STICKY_RANDOM(1), - STICKY_ROUND_ROBIN(2), - ROUND_ROBIN(3); - - private final int value; - - private ProviderStrategyType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static ProviderStrategyType findByValue(int value) { - switch (value) { - case 0: - return RANDOM; - case 1: - return STICKY_RANDOM; - case 2: - return STICKY_ROUND_ROBIN; - case 3: - return ROUND_ROBIN; - default: - return null; - } - } -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/SetDataSpec.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/SetDataSpec.java deleted file mode 100644 index 49c60e4d88..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/SetDataSpec.java +++ /dev/null @@ -1,896 +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 SetDataSpec implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SetDataSpec"); - - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField WATCHED_FIELD_DESC = new org.apache.thrift.protocol.TField("watched", org.apache.thrift.protocol.TType.BOOL, (short)2); - private static final org.apache.thrift.protocol.TField ASYNC_CONTEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("asyncContext", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField COMPRESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("compressed", org.apache.thrift.protocol.TType.BOOL, (short)4); - private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.STRUCT, (short)5); - private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)6); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new SetDataSpecStandardSchemeFactory()); - schemes.put(TupleScheme.class, new SetDataSpecTupleSchemeFactory()); - } - - public String path; // required - public boolean watched; // required - public String asyncContext; // required - public boolean compressed; // required - public Version version; // required - public ByteBuffer data; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - PATH((short)1, "path"), - WATCHED((short)2, "watched"), - ASYNC_CONTEXT((short)3, "asyncContext"), - COMPRESSED((short)4, "compressed"), - VERSION((short)5, "version"), - DATA((short)6, "data"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // PATH - return PATH; - case 2: // WATCHED - return WATCHED; - case 3: // ASYNC_CONTEXT - return ASYNC_CONTEXT; - case 4: // COMPRESSED - return COMPRESSED; - case 5: // VERSION - return VERSION; - case 6: // DATA - return DATA; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __WATCHED_ISSET_ID = 0; - private static final int __COMPRESSED_ISSET_ID = 1; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.WATCHED, new org.apache.thrift.meta_data.FieldMetaData("watched", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.ASYNC_CONTEXT, new org.apache.thrift.meta_data.FieldMetaData("asyncContext", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - tmpMap.put(_Fields.COMPRESSED, new org.apache.thrift.meta_data.FieldMetaData("compressed", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Version.class))); - tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SetDataSpec.class, metaDataMap); - } - - public SetDataSpec() { - } - - public SetDataSpec( - String path, - boolean watched, - String asyncContext, - boolean compressed, - Version version, - ByteBuffer data) - { - this(); - this.path = path; - this.watched = watched; - setWatchedIsSet(true); - this.asyncContext = asyncContext; - this.compressed = compressed; - setCompressedIsSet(true); - this.version = version; - this.data = data; - } - - /** - * Performs a deep copy on other. - */ - public SetDataSpec(SetDataSpec other) { - __isset_bitfield = other.__isset_bitfield; - if (other.isSetPath()) { - this.path = other.path; - } - this.watched = other.watched; - if (other.isSetAsyncContext()) { - this.asyncContext = other.asyncContext; - } - this.compressed = other.compressed; - if (other.isSetVersion()) { - this.version = new Version(other.version); - } - if (other.isSetData()) { - this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data); -; - } - } - - public SetDataSpec deepCopy() { - return new SetDataSpec(this); - } - - @Override - public void clear() { - this.path = null; - setWatchedIsSet(false); - this.watched = false; - this.asyncContext = null; - setCompressedIsSet(false); - this.compressed = false; - this.version = null; - this.data = null; - } - - public String getPath() { - return this.path; - } - - public SetDataSpec setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public boolean isWatched() { - return this.watched; - } - - public SetDataSpec setWatched(boolean watched) { - this.watched = watched; - setWatchedIsSet(true); - return this; - } - - public void unsetWatched() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __WATCHED_ISSET_ID); - } - - /** Returns true if field watched is set (has been assigned a value) and false otherwise */ - public boolean isSetWatched() { - return EncodingUtils.testBit(__isset_bitfield, __WATCHED_ISSET_ID); - } - - public void setWatchedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __WATCHED_ISSET_ID, value); - } - - public String getAsyncContext() { - return this.asyncContext; - } - - public SetDataSpec setAsyncContext(String asyncContext) { - this.asyncContext = asyncContext; - return this; - } - - public void unsetAsyncContext() { - this.asyncContext = null; - } - - /** Returns true if field asyncContext is set (has been assigned a value) and false otherwise */ - public boolean isSetAsyncContext() { - return this.asyncContext != null; - } - - public void setAsyncContextIsSet(boolean value) { - if (!value) { - this.asyncContext = null; - } - } - - public boolean isCompressed() { - return this.compressed; - } - - public SetDataSpec setCompressed(boolean compressed) { - this.compressed = compressed; - setCompressedIsSet(true); - return this; - } - - public void unsetCompressed() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __COMPRESSED_ISSET_ID); - } - - /** Returns true if field compressed is set (has been assigned a value) and false otherwise */ - public boolean isSetCompressed() { - return EncodingUtils.testBit(__isset_bitfield, __COMPRESSED_ISSET_ID); - } - - public void setCompressedIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __COMPRESSED_ISSET_ID, value); - } - - public Version getVersion() { - return this.version; - } - - public SetDataSpec setVersion(Version version) { - this.version = version; - return this; - } - - public void unsetVersion() { - this.version = null; - } - - /** Returns true if field version is set (has been assigned a value) and false otherwise */ - public boolean isSetVersion() { - return this.version != null; - } - - public void setVersionIsSet(boolean value) { - if (!value) { - this.version = null; - } - } - - public byte[] getData() { - setData(org.apache.thrift.TBaseHelper.rightSize(data)); - return data == null ? null : data.array(); - } - - public ByteBuffer bufferForData() { - return data; - } - - public SetDataSpec setData(byte[] data) { - setData(data == null ? (ByteBuffer)null : ByteBuffer.wrap(data)); - return this; - } - - public SetDataSpec setData(ByteBuffer data) { - this.data = data; - return this; - } - - public void unsetData() { - this.data = null; - } - - /** Returns true if field data is set (has been assigned a value) and false otherwise */ - public boolean isSetData() { - return this.data != null; - } - - public void setDataIsSet(boolean value) { - if (!value) { - this.data = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - case WATCHED: - if (value == null) { - unsetWatched(); - } else { - setWatched((Boolean)value); - } - break; - - case ASYNC_CONTEXT: - if (value == null) { - unsetAsyncContext(); - } else { - setAsyncContext((String)value); - } - break; - - case COMPRESSED: - if (value == null) { - unsetCompressed(); - } else { - setCompressed((Boolean)value); - } - break; - - case VERSION: - if (value == null) { - unsetVersion(); - } else { - setVersion((Version)value); - } - break; - - case DATA: - if (value == null) { - unsetData(); - } else { - setData((ByteBuffer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case PATH: - return getPath(); - - case WATCHED: - return Boolean.valueOf(isWatched()); - - case ASYNC_CONTEXT: - return getAsyncContext(); - - case COMPRESSED: - return Boolean.valueOf(isCompressed()); - - case VERSION: - return getVersion(); - - case DATA: - return getData(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case PATH: - return isSetPath(); - case WATCHED: - return isSetWatched(); - case ASYNC_CONTEXT: - return isSetAsyncContext(); - case COMPRESSED: - return isSetCompressed(); - case VERSION: - return isSetVersion(); - case DATA: - return isSetData(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof SetDataSpec) - return this.equals((SetDataSpec)that); - return false; - } - - public boolean equals(SetDataSpec that) { - if (that == null) - return false; - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - boolean this_present_watched = true; - boolean that_present_watched = true; - if (this_present_watched || that_present_watched) { - if (!(this_present_watched && that_present_watched)) - return false; - if (this.watched != that.watched) - return false; - } - - boolean this_present_asyncContext = true && this.isSetAsyncContext(); - boolean that_present_asyncContext = true && that.isSetAsyncContext(); - if (this_present_asyncContext || that_present_asyncContext) { - if (!(this_present_asyncContext && that_present_asyncContext)) - return false; - if (!this.asyncContext.equals(that.asyncContext)) - return false; - } - - boolean this_present_compressed = true; - boolean that_present_compressed = true; - if (this_present_compressed || that_present_compressed) { - if (!(this_present_compressed && that_present_compressed)) - return false; - if (this.compressed != that.compressed) - return false; - } - - boolean this_present_version = true && this.isSetVersion(); - boolean that_present_version = true && that.isSetVersion(); - if (this_present_version || that_present_version) { - if (!(this_present_version && that_present_version)) - return false; - if (!this.version.equals(that.version)) - return false; - } - - boolean this_present_data = true && this.isSetData(); - boolean that_present_data = true && that.isSetData(); - if (this_present_data || that_present_data) { - if (!(this_present_data && that_present_data)) - return false; - if (!this.data.equals(that.data)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(SetDataSpec other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetWatched()).compareTo(other.isSetWatched()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetWatched()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.watched, other.watched); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAsyncContext()).compareTo(other.isSetAsyncContext()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAsyncContext()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.asyncContext, other.asyncContext); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCompressed()).compareTo(other.isSetCompressed()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCompressed()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressed, other.compressed); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVersion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetData()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("SetDataSpec("); - boolean first = true; - - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - if (!first) sb.append(", "); - sb.append("watched:"); - sb.append(this.watched); - first = false; - if (!first) sb.append(", "); - sb.append("asyncContext:"); - if (this.asyncContext == null) { - sb.append("null"); - } else { - sb.append(this.asyncContext); - } - first = false; - if (!first) sb.append(", "); - sb.append("compressed:"); - sb.append(this.compressed); - first = false; - if (!first) sb.append(", "); - sb.append("version:"); - if (this.version == null) { - sb.append("null"); - } else { - sb.append(this.version); - } - first = false; - if (!first) sb.append(", "); - sb.append("data:"); - if (this.data == null) { - sb.append("null"); - } else { - org.apache.thrift.TBaseHelper.toString(this.data, sb); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - if (version != null) { - version.validate(); - } - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class SetDataSpecStandardSchemeFactory implements SchemeFactory { - public SetDataSpecStandardScheme getScheme() { - return new SetDataSpecStandardScheme(); - } - } - - private static class SetDataSpecStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, SetDataSpec struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // WATCHED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.watched = iprot.readBool(); - struct.setWatchedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // ASYNC_CONTEXT - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.asyncContext = iprot.readString(); - struct.setAsyncContextIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // COMPRESSED - if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { - struct.compressed = iprot.readBool(); - struct.setCompressedIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // VERSION - if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { - struct.version = new Version(); - struct.version.read(iprot); - struct.setVersionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // DATA - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.data = iprot.readBinary(); - struct.setDataIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, SetDataSpec struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(WATCHED_FIELD_DESC); - oprot.writeBool(struct.watched); - oprot.writeFieldEnd(); - if (struct.asyncContext != null) { - oprot.writeFieldBegin(ASYNC_CONTEXT_FIELD_DESC); - oprot.writeString(struct.asyncContext); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(COMPRESSED_FIELD_DESC); - oprot.writeBool(struct.compressed); - oprot.writeFieldEnd(); - if (struct.version != null) { - oprot.writeFieldBegin(VERSION_FIELD_DESC); - struct.version.write(oprot); - oprot.writeFieldEnd(); - } - if (struct.data != null) { - oprot.writeFieldBegin(DATA_FIELD_DESC); - oprot.writeBinary(struct.data); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class SetDataSpecTupleSchemeFactory implements SchemeFactory { - public SetDataSpecTupleScheme getScheme() { - return new SetDataSpecTupleScheme(); - } - } - - private static class SetDataSpecTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, SetDataSpec struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetPath()) { - optionals.set(0); - } - if (struct.isSetWatched()) { - optionals.set(1); - } - if (struct.isSetAsyncContext()) { - optionals.set(2); - } - if (struct.isSetCompressed()) { - optionals.set(3); - } - if (struct.isSetVersion()) { - optionals.set(4); - } - if (struct.isSetData()) { - optionals.set(5); - } - oprot.writeBitSet(optionals, 6); - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - if (struct.isSetWatched()) { - oprot.writeBool(struct.watched); - } - if (struct.isSetAsyncContext()) { - oprot.writeString(struct.asyncContext); - } - if (struct.isSetCompressed()) { - oprot.writeBool(struct.compressed); - } - if (struct.isSetVersion()) { - struct.version.write(oprot); - } - if (struct.isSetData()) { - oprot.writeBinary(struct.data); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, SetDataSpec struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(6); - if (incoming.get(0)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - if (incoming.get(1)) { - struct.watched = iprot.readBool(); - struct.setWatchedIsSet(true); - } - if (incoming.get(2)) { - struct.asyncContext = iprot.readString(); - struct.setAsyncContextIsSet(true); - } - if (incoming.get(3)) { - struct.compressed = iprot.readBool(); - struct.setCompressedIsSet(true); - } - if (incoming.get(4)) { - struct.version = new Version(); - struct.version.read(iprot); - struct.setVersionIsSet(true); - } - if (incoming.get(5)) { - struct.data = iprot.readBinary(); - struct.setDataIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/Stat.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/Stat.java deleted file mode 100644 index e8475c05b8..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/Stat.java +++ /dev/null @@ -1,1326 +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 Stat implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Stat"); - - private static final org.apache.thrift.protocol.TField CZXID_FIELD_DESC = new org.apache.thrift.protocol.TField("czxid", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField MZXID_FIELD_DESC = new org.apache.thrift.protocol.TField("mzxid", org.apache.thrift.protocol.TType.I64, (short)2); - private static final org.apache.thrift.protocol.TField CTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("ctime", org.apache.thrift.protocol.TType.I64, (short)3); - private static final org.apache.thrift.protocol.TField MTIME_FIELD_DESC = new org.apache.thrift.protocol.TField("mtime", org.apache.thrift.protocol.TType.I64, (short)4); - private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.I32, (short)5); - private static final org.apache.thrift.protocol.TField CVERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("cversion", org.apache.thrift.protocol.TType.I32, (short)6); - private static final org.apache.thrift.protocol.TField AVERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("aversion", org.apache.thrift.protocol.TType.I32, (short)7); - private static final org.apache.thrift.protocol.TField EPHEMERAL_OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("ephemeralOwner", org.apache.thrift.protocol.TType.I64, (short)8); - private static final org.apache.thrift.protocol.TField DATA_LENGTH_FIELD_DESC = new org.apache.thrift.protocol.TField("dataLength", org.apache.thrift.protocol.TType.I32, (short)9); - private static final org.apache.thrift.protocol.TField NUM_CHILDREN_FIELD_DESC = new org.apache.thrift.protocol.TField("numChildren", org.apache.thrift.protocol.TType.I32, (short)10); - private static final org.apache.thrift.protocol.TField PZXID_FIELD_DESC = new org.apache.thrift.protocol.TField("pzxid", org.apache.thrift.protocol.TType.I64, (short)11); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new StatStandardSchemeFactory()); - schemes.put(TupleScheme.class, new StatTupleSchemeFactory()); - } - - public long czxid; // required - public long mzxid; // required - public long ctime; // required - public long mtime; // required - public int version; // required - public int cversion; // required - public int aversion; // required - public long ephemeralOwner; // required - public int dataLength; // required - public int numChildren; // required - public long pzxid; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - CZXID((short)1, "czxid"), - MZXID((short)2, "mzxid"), - CTIME((short)3, "ctime"), - MTIME((short)4, "mtime"), - VERSION((short)5, "version"), - CVERSION((short)6, "cversion"), - AVERSION((short)7, "aversion"), - EPHEMERAL_OWNER((short)8, "ephemeralOwner"), - DATA_LENGTH((short)9, "dataLength"), - NUM_CHILDREN((short)10, "numChildren"), - PZXID((short)11, "pzxid"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // CZXID - return CZXID; - case 2: // MZXID - return MZXID; - case 3: // CTIME - return CTIME; - case 4: // MTIME - return MTIME; - case 5: // VERSION - return VERSION; - case 6: // CVERSION - return CVERSION; - case 7: // AVERSION - return AVERSION; - case 8: // EPHEMERAL_OWNER - return EPHEMERAL_OWNER; - case 9: // DATA_LENGTH - return DATA_LENGTH; - case 10: // NUM_CHILDREN - return NUM_CHILDREN; - case 11: // PZXID - return PZXID; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __CZXID_ISSET_ID = 0; - private static final int __MZXID_ISSET_ID = 1; - private static final int __CTIME_ISSET_ID = 2; - private static final int __MTIME_ISSET_ID = 3; - private static final int __VERSION_ISSET_ID = 4; - private static final int __CVERSION_ISSET_ID = 5; - private static final int __AVERSION_ISSET_ID = 6; - private static final int __EPHEMERALOWNER_ISSET_ID = 7; - private static final int __DATALENGTH_ISSET_ID = 8; - private static final int __NUMCHILDREN_ISSET_ID = 9; - private static final int __PZXID_ISSET_ID = 10; - private short __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.CZXID, new org.apache.thrift.meta_data.FieldMetaData("czxid", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.MZXID, new org.apache.thrift.meta_data.FieldMetaData("mzxid", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.CTIME, new org.apache.thrift.meta_data.FieldMetaData("ctime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.MTIME, new org.apache.thrift.meta_data.FieldMetaData("mtime", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.CVERSION, new org.apache.thrift.meta_data.FieldMetaData("cversion", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.AVERSION, new org.apache.thrift.meta_data.FieldMetaData("aversion", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.EPHEMERAL_OWNER, new org.apache.thrift.meta_data.FieldMetaData("ephemeralOwner", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - tmpMap.put(_Fields.DATA_LENGTH, new org.apache.thrift.meta_data.FieldMetaData("dataLength", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.NUM_CHILDREN, new org.apache.thrift.meta_data.FieldMetaData("numChildren", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - tmpMap.put(_Fields.PZXID, new org.apache.thrift.meta_data.FieldMetaData("pzxid", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Stat.class, metaDataMap); - } - - public Stat() { - } - - public Stat( - long czxid, - long mzxid, - long ctime, - long mtime, - int version, - int cversion, - int aversion, - long ephemeralOwner, - int dataLength, - int numChildren, - long pzxid) - { - this(); - this.czxid = czxid; - setCzxidIsSet(true); - this.mzxid = mzxid; - setMzxidIsSet(true); - this.ctime = ctime; - setCtimeIsSet(true); - this.mtime = mtime; - setMtimeIsSet(true); - this.version = version; - setVersionIsSet(true); - this.cversion = cversion; - setCversionIsSet(true); - this.aversion = aversion; - setAversionIsSet(true); - this.ephemeralOwner = ephemeralOwner; - setEphemeralOwnerIsSet(true); - this.dataLength = dataLength; - setDataLengthIsSet(true); - this.numChildren = numChildren; - setNumChildrenIsSet(true); - this.pzxid = pzxid; - setPzxidIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public Stat(Stat other) { - __isset_bitfield = other.__isset_bitfield; - this.czxid = other.czxid; - this.mzxid = other.mzxid; - this.ctime = other.ctime; - this.mtime = other.mtime; - this.version = other.version; - this.cversion = other.cversion; - this.aversion = other.aversion; - this.ephemeralOwner = other.ephemeralOwner; - this.dataLength = other.dataLength; - this.numChildren = other.numChildren; - this.pzxid = other.pzxid; - } - - public Stat deepCopy() { - return new Stat(this); - } - - @Override - public void clear() { - setCzxidIsSet(false); - this.czxid = 0; - setMzxidIsSet(false); - this.mzxid = 0; - setCtimeIsSet(false); - this.ctime = 0; - setMtimeIsSet(false); - this.mtime = 0; - setVersionIsSet(false); - this.version = 0; - setCversionIsSet(false); - this.cversion = 0; - setAversionIsSet(false); - this.aversion = 0; - setEphemeralOwnerIsSet(false); - this.ephemeralOwner = 0; - setDataLengthIsSet(false); - this.dataLength = 0; - setNumChildrenIsSet(false); - this.numChildren = 0; - setPzxidIsSet(false); - this.pzxid = 0; - } - - public long getCzxid() { - return this.czxid; - } - - public Stat setCzxid(long czxid) { - this.czxid = czxid; - setCzxidIsSet(true); - return this; - } - - public void unsetCzxid() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CZXID_ISSET_ID); - } - - /** Returns true if field czxid is set (has been assigned a value) and false otherwise */ - public boolean isSetCzxid() { - return EncodingUtils.testBit(__isset_bitfield, __CZXID_ISSET_ID); - } - - public void setCzxidIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CZXID_ISSET_ID, value); - } - - public long getMzxid() { - return this.mzxid; - } - - public Stat setMzxid(long mzxid) { - this.mzxid = mzxid; - setMzxidIsSet(true); - return this; - } - - public void unsetMzxid() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MZXID_ISSET_ID); - } - - /** Returns true if field mzxid is set (has been assigned a value) and false otherwise */ - public boolean isSetMzxid() { - return EncodingUtils.testBit(__isset_bitfield, __MZXID_ISSET_ID); - } - - public void setMzxidIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MZXID_ISSET_ID, value); - } - - public long getCtime() { - return this.ctime; - } - - public Stat setCtime(long ctime) { - this.ctime = ctime; - setCtimeIsSet(true); - return this; - } - - public void unsetCtime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CTIME_ISSET_ID); - } - - /** Returns true if field ctime is set (has been assigned a value) and false otherwise */ - public boolean isSetCtime() { - return EncodingUtils.testBit(__isset_bitfield, __CTIME_ISSET_ID); - } - - public void setCtimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CTIME_ISSET_ID, value); - } - - public long getMtime() { - return this.mtime; - } - - public Stat setMtime(long mtime) { - this.mtime = mtime; - setMtimeIsSet(true); - return this; - } - - public void unsetMtime() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MTIME_ISSET_ID); - } - - /** Returns true if field mtime is set (has been assigned a value) and false otherwise */ - public boolean isSetMtime() { - return EncodingUtils.testBit(__isset_bitfield, __MTIME_ISSET_ID); - } - - public void setMtimeIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MTIME_ISSET_ID, value); - } - - public int getVersion() { - return this.version; - } - - public Stat setVersion(int version) { - this.version = version; - setVersionIsSet(true); - return this; - } - - public void unsetVersion() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID); - } - - /** Returns true if field version is set (has been assigned a value) and false otherwise */ - public boolean isSetVersion() { - return EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID); - } - - public void setVersionIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value); - } - - public int getCversion() { - return this.cversion; - } - - public Stat setCversion(int cversion) { - this.cversion = cversion; - setCversionIsSet(true); - return this; - } - - public void unsetCversion() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CVERSION_ISSET_ID); - } - - /** Returns true if field cversion is set (has been assigned a value) and false otherwise */ - public boolean isSetCversion() { - return EncodingUtils.testBit(__isset_bitfield, __CVERSION_ISSET_ID); - } - - public void setCversionIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CVERSION_ISSET_ID, value); - } - - public int getAversion() { - return this.aversion; - } - - public Stat setAversion(int aversion) { - this.aversion = aversion; - setAversionIsSet(true); - return this; - } - - public void unsetAversion() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AVERSION_ISSET_ID); - } - - /** Returns true if field aversion is set (has been assigned a value) and false otherwise */ - public boolean isSetAversion() { - return EncodingUtils.testBit(__isset_bitfield, __AVERSION_ISSET_ID); - } - - public void setAversionIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AVERSION_ISSET_ID, value); - } - - public long getEphemeralOwner() { - return this.ephemeralOwner; - } - - public Stat setEphemeralOwner(long ephemeralOwner) { - this.ephemeralOwner = ephemeralOwner; - setEphemeralOwnerIsSet(true); - return this; - } - - public void unsetEphemeralOwner() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EPHEMERALOWNER_ISSET_ID); - } - - /** Returns true if field ephemeralOwner is set (has been assigned a value) and false otherwise */ - public boolean isSetEphemeralOwner() { - return EncodingUtils.testBit(__isset_bitfield, __EPHEMERALOWNER_ISSET_ID); - } - - public void setEphemeralOwnerIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EPHEMERALOWNER_ISSET_ID, value); - } - - public int getDataLength() { - return this.dataLength; - } - - public Stat setDataLength(int dataLength) { - this.dataLength = dataLength; - setDataLengthIsSet(true); - return this; - } - - public void unsetDataLength() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DATALENGTH_ISSET_ID); - } - - /** Returns true if field dataLength is set (has been assigned a value) and false otherwise */ - public boolean isSetDataLength() { - return EncodingUtils.testBit(__isset_bitfield, __DATALENGTH_ISSET_ID); - } - - public void setDataLengthIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DATALENGTH_ISSET_ID, value); - } - - public int getNumChildren() { - return this.numChildren; - } - - public Stat setNumChildren(int numChildren) { - this.numChildren = numChildren; - setNumChildrenIsSet(true); - return this; - } - - public void unsetNumChildren() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMCHILDREN_ISSET_ID); - } - - /** Returns true if field numChildren is set (has been assigned a value) and false otherwise */ - public boolean isSetNumChildren() { - return EncodingUtils.testBit(__isset_bitfield, __NUMCHILDREN_ISSET_ID); - } - - public void setNumChildrenIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMCHILDREN_ISSET_ID, value); - } - - public long getPzxid() { - return this.pzxid; - } - - public Stat setPzxid(long pzxid) { - this.pzxid = pzxid; - setPzxidIsSet(true); - return this; - } - - public void unsetPzxid() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PZXID_ISSET_ID); - } - - /** Returns true if field pzxid is set (has been assigned a value) and false otherwise */ - public boolean isSetPzxid() { - return EncodingUtils.testBit(__isset_bitfield, __PZXID_ISSET_ID); - } - - public void setPzxidIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PZXID_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case CZXID: - if (value == null) { - unsetCzxid(); - } else { - setCzxid((Long)value); - } - break; - - case MZXID: - if (value == null) { - unsetMzxid(); - } else { - setMzxid((Long)value); - } - break; - - case CTIME: - if (value == null) { - unsetCtime(); - } else { - setCtime((Long)value); - } - break; - - case MTIME: - if (value == null) { - unsetMtime(); - } else { - setMtime((Long)value); - } - break; - - case VERSION: - if (value == null) { - unsetVersion(); - } else { - setVersion((Integer)value); - } - break; - - case CVERSION: - if (value == null) { - unsetCversion(); - } else { - setCversion((Integer)value); - } - break; - - case AVERSION: - if (value == null) { - unsetAversion(); - } else { - setAversion((Integer)value); - } - break; - - case EPHEMERAL_OWNER: - if (value == null) { - unsetEphemeralOwner(); - } else { - setEphemeralOwner((Long)value); - } - break; - - case DATA_LENGTH: - if (value == null) { - unsetDataLength(); - } else { - setDataLength((Integer)value); - } - break; - - case NUM_CHILDREN: - if (value == null) { - unsetNumChildren(); - } else { - setNumChildren((Integer)value); - } - break; - - case PZXID: - if (value == null) { - unsetPzxid(); - } else { - setPzxid((Long)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case CZXID: - return Long.valueOf(getCzxid()); - - case MZXID: - return Long.valueOf(getMzxid()); - - case CTIME: - return Long.valueOf(getCtime()); - - case MTIME: - return Long.valueOf(getMtime()); - - case VERSION: - return Integer.valueOf(getVersion()); - - case CVERSION: - return Integer.valueOf(getCversion()); - - case AVERSION: - return Integer.valueOf(getAversion()); - - case EPHEMERAL_OWNER: - return Long.valueOf(getEphemeralOwner()); - - case DATA_LENGTH: - return Integer.valueOf(getDataLength()); - - case NUM_CHILDREN: - return Integer.valueOf(getNumChildren()); - - case PZXID: - return Long.valueOf(getPzxid()); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case CZXID: - return isSetCzxid(); - case MZXID: - return isSetMzxid(); - case CTIME: - return isSetCtime(); - case MTIME: - return isSetMtime(); - case VERSION: - return isSetVersion(); - case CVERSION: - return isSetCversion(); - case AVERSION: - return isSetAversion(); - case EPHEMERAL_OWNER: - return isSetEphemeralOwner(); - case DATA_LENGTH: - return isSetDataLength(); - case NUM_CHILDREN: - return isSetNumChildren(); - case PZXID: - return isSetPzxid(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Stat) - return this.equals((Stat)that); - return false; - } - - public boolean equals(Stat that) { - if (that == null) - return false; - - boolean this_present_czxid = true; - boolean that_present_czxid = true; - if (this_present_czxid || that_present_czxid) { - if (!(this_present_czxid && that_present_czxid)) - return false; - if (this.czxid != that.czxid) - return false; - } - - boolean this_present_mzxid = true; - boolean that_present_mzxid = true; - if (this_present_mzxid || that_present_mzxid) { - if (!(this_present_mzxid && that_present_mzxid)) - return false; - if (this.mzxid != that.mzxid) - return false; - } - - boolean this_present_ctime = true; - boolean that_present_ctime = true; - if (this_present_ctime || that_present_ctime) { - if (!(this_present_ctime && that_present_ctime)) - return false; - if (this.ctime != that.ctime) - return false; - } - - boolean this_present_mtime = true; - boolean that_present_mtime = true; - if (this_present_mtime || that_present_mtime) { - if (!(this_present_mtime && that_present_mtime)) - return false; - if (this.mtime != that.mtime) - return false; - } - - boolean this_present_version = true; - boolean that_present_version = true; - if (this_present_version || that_present_version) { - if (!(this_present_version && that_present_version)) - return false; - if (this.version != that.version) - return false; - } - - boolean this_present_cversion = true; - boolean that_present_cversion = true; - if (this_present_cversion || that_present_cversion) { - if (!(this_present_cversion && that_present_cversion)) - return false; - if (this.cversion != that.cversion) - return false; - } - - boolean this_present_aversion = true; - boolean that_present_aversion = true; - if (this_present_aversion || that_present_aversion) { - if (!(this_present_aversion && that_present_aversion)) - return false; - if (this.aversion != that.aversion) - return false; - } - - boolean this_present_ephemeralOwner = true; - boolean that_present_ephemeralOwner = true; - if (this_present_ephemeralOwner || that_present_ephemeralOwner) { - if (!(this_present_ephemeralOwner && that_present_ephemeralOwner)) - return false; - if (this.ephemeralOwner != that.ephemeralOwner) - return false; - } - - boolean this_present_dataLength = true; - boolean that_present_dataLength = true; - if (this_present_dataLength || that_present_dataLength) { - if (!(this_present_dataLength && that_present_dataLength)) - return false; - if (this.dataLength != that.dataLength) - return false; - } - - boolean this_present_numChildren = true; - boolean that_present_numChildren = true; - if (this_present_numChildren || that_present_numChildren) { - if (!(this_present_numChildren && that_present_numChildren)) - return false; - if (this.numChildren != that.numChildren) - return false; - } - - boolean this_present_pzxid = true; - boolean that_present_pzxid = true; - if (this_present_pzxid || that_present_pzxid) { - if (!(this_present_pzxid && that_present_pzxid)) - return false; - if (this.pzxid != that.pzxid) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(Stat other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetCzxid()).compareTo(other.isSetCzxid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCzxid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.czxid, other.czxid); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMzxid()).compareTo(other.isSetMzxid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMzxid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mzxid, other.mzxid); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCtime()).compareTo(other.isSetCtime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCtime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ctime, other.ctime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetMtime()).compareTo(other.isSetMtime()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetMtime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mtime, other.mtime); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVersion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetCversion()).compareTo(other.isSetCversion()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetCversion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cversion, other.cversion); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetAversion()).compareTo(other.isSetAversion()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetAversion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aversion, other.aversion); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEphemeralOwner()).compareTo(other.isSetEphemeralOwner()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEphemeralOwner()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ephemeralOwner, other.ephemeralOwner); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetDataLength()).compareTo(other.isSetDataLength()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetDataLength()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataLength, other.dataLength); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetNumChildren()).compareTo(other.isSetNumChildren()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetNumChildren()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numChildren, other.numChildren); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPzxid()).compareTo(other.isSetPzxid()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPzxid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pzxid, other.pzxid); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Stat("); - boolean first = true; - - sb.append("czxid:"); - sb.append(this.czxid); - first = false; - if (!first) sb.append(", "); - sb.append("mzxid:"); - sb.append(this.mzxid); - first = false; - if (!first) sb.append(", "); - sb.append("ctime:"); - sb.append(this.ctime); - first = false; - if (!first) sb.append(", "); - sb.append("mtime:"); - sb.append(this.mtime); - first = false; - if (!first) sb.append(", "); - sb.append("version:"); - sb.append(this.version); - first = false; - if (!first) sb.append(", "); - sb.append("cversion:"); - sb.append(this.cversion); - first = false; - if (!first) sb.append(", "); - sb.append("aversion:"); - sb.append(this.aversion); - first = false; - if (!first) sb.append(", "); - sb.append("ephemeralOwner:"); - sb.append(this.ephemeralOwner); - first = false; - if (!first) sb.append(", "); - sb.append("dataLength:"); - sb.append(this.dataLength); - first = false; - if (!first) sb.append(", "); - sb.append("numChildren:"); - sb.append(this.numChildren); - first = false; - if (!first) sb.append(", "); - sb.append("pzxid:"); - sb.append(this.pzxid); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class StatStandardSchemeFactory implements SchemeFactory { - public StatStandardScheme getScheme() { - return new StatStandardScheme(); - } - } - - private static class StatStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, Stat struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // CZXID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.czxid = iprot.readI64(); - struct.setCzxidIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // MZXID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.mzxid = iprot.readI64(); - struct.setMzxidIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // CTIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.ctime = iprot.readI64(); - struct.setCtimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 4: // MTIME - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.mtime = iprot.readI64(); - struct.setMtimeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 5: // VERSION - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.version = iprot.readI32(); - struct.setVersionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 6: // CVERSION - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.cversion = iprot.readI32(); - struct.setCversionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 7: // AVERSION - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.aversion = iprot.readI32(); - struct.setAversionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 8: // EPHEMERAL_OWNER - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.ephemeralOwner = iprot.readI64(); - struct.setEphemeralOwnerIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 9: // DATA_LENGTH - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.dataLength = iprot.readI32(); - struct.setDataLengthIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 10: // NUM_CHILDREN - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.numChildren = iprot.readI32(); - struct.setNumChildrenIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 11: // PZXID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.pzxid = iprot.readI64(); - struct.setPzxidIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, Stat struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(CZXID_FIELD_DESC); - oprot.writeI64(struct.czxid); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(MZXID_FIELD_DESC); - oprot.writeI64(struct.mzxid); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(CTIME_FIELD_DESC); - oprot.writeI64(struct.ctime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(MTIME_FIELD_DESC); - oprot.writeI64(struct.mtime); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(VERSION_FIELD_DESC); - oprot.writeI32(struct.version); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(CVERSION_FIELD_DESC); - oprot.writeI32(struct.cversion); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(AVERSION_FIELD_DESC); - oprot.writeI32(struct.aversion); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(EPHEMERAL_OWNER_FIELD_DESC); - oprot.writeI64(struct.ephemeralOwner); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(DATA_LENGTH_FIELD_DESC); - oprot.writeI32(struct.dataLength); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(NUM_CHILDREN_FIELD_DESC); - oprot.writeI32(struct.numChildren); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(PZXID_FIELD_DESC); - oprot.writeI64(struct.pzxid); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class StatTupleSchemeFactory implements SchemeFactory { - public StatTupleScheme getScheme() { - return new StatTupleScheme(); - } - } - - private static class StatTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, Stat struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetCzxid()) { - optionals.set(0); - } - if (struct.isSetMzxid()) { - optionals.set(1); - } - if (struct.isSetCtime()) { - optionals.set(2); - } - if (struct.isSetMtime()) { - optionals.set(3); - } - if (struct.isSetVersion()) { - optionals.set(4); - } - if (struct.isSetCversion()) { - optionals.set(5); - } - if (struct.isSetAversion()) { - optionals.set(6); - } - if (struct.isSetEphemeralOwner()) { - optionals.set(7); - } - if (struct.isSetDataLength()) { - optionals.set(8); - } - if (struct.isSetNumChildren()) { - optionals.set(9); - } - if (struct.isSetPzxid()) { - optionals.set(10); - } - oprot.writeBitSet(optionals, 11); - if (struct.isSetCzxid()) { - oprot.writeI64(struct.czxid); - } - if (struct.isSetMzxid()) { - oprot.writeI64(struct.mzxid); - } - if (struct.isSetCtime()) { - oprot.writeI64(struct.ctime); - } - if (struct.isSetMtime()) { - oprot.writeI64(struct.mtime); - } - if (struct.isSetVersion()) { - oprot.writeI32(struct.version); - } - if (struct.isSetCversion()) { - oprot.writeI32(struct.cversion); - } - if (struct.isSetAversion()) { - oprot.writeI32(struct.aversion); - } - if (struct.isSetEphemeralOwner()) { - oprot.writeI64(struct.ephemeralOwner); - } - if (struct.isSetDataLength()) { - oprot.writeI32(struct.dataLength); - } - if (struct.isSetNumChildren()) { - oprot.writeI32(struct.numChildren); - } - if (struct.isSetPzxid()) { - oprot.writeI64(struct.pzxid); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, Stat struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(11); - if (incoming.get(0)) { - struct.czxid = iprot.readI64(); - struct.setCzxidIsSet(true); - } - if (incoming.get(1)) { - struct.mzxid = iprot.readI64(); - struct.setMzxidIsSet(true); - } - if (incoming.get(2)) { - struct.ctime = iprot.readI64(); - struct.setCtimeIsSet(true); - } - if (incoming.get(3)) { - struct.mtime = iprot.readI64(); - struct.setMtimeIsSet(true); - } - if (incoming.get(4)) { - struct.version = iprot.readI32(); - struct.setVersionIsSet(true); - } - if (incoming.get(5)) { - struct.cversion = iprot.readI32(); - struct.setCversionIsSet(true); - } - if (incoming.get(6)) { - struct.aversion = iprot.readI32(); - struct.setAversionIsSet(true); - } - if (incoming.get(7)) { - struct.ephemeralOwner = iprot.readI64(); - struct.setEphemeralOwnerIsSet(true); - } - if (incoming.get(8)) { - struct.dataLength = iprot.readI32(); - struct.setDataLengthIsSet(true); - } - if (incoming.get(9)) { - struct.numChildren = iprot.readI32(); - struct.setNumChildrenIsSet(true); - } - if (incoming.get(10)) { - struct.pzxid = iprot.readI64(); - struct.setPzxidIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/Version.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/Version.java deleted file mode 100644 index d629635c4b..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/Version.java +++ /dev/null @@ -1,386 +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 Version implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Version"); - - private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.I32, (short)1); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new VersionStandardSchemeFactory()); - schemes.put(TupleScheme.class, new VersionTupleSchemeFactory()); - } - - public int version; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - VERSION((short)1, "version"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // VERSION - return VERSION; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - private static final int __VERSION_ISSET_ID = 0; - private byte __isset_bitfield = 0; - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Version.class, metaDataMap); - } - - public Version() { - } - - public Version( - int version) - { - this(); - this.version = version; - setVersionIsSet(true); - } - - /** - * Performs a deep copy on other. - */ - public Version(Version other) { - __isset_bitfield = other.__isset_bitfield; - this.version = other.version; - } - - public Version deepCopy() { - return new Version(this); - } - - @Override - public void clear() { - setVersionIsSet(false); - this.version = 0; - } - - public int getVersion() { - return this.version; - } - - public Version setVersion(int version) { - this.version = version; - setVersionIsSet(true); - return this; - } - - public void unsetVersion() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID); - } - - /** Returns true if field version is set (has been assigned a value) and false otherwise */ - public boolean isSetVersion() { - return EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID); - } - - public void setVersionIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value); - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case VERSION: - if (value == null) { - unsetVersion(); - } else { - setVersion((Integer)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case VERSION: - return Integer.valueOf(getVersion()); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case VERSION: - return isSetVersion(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Version) - return this.equals((Version)that); - return false; - } - - public boolean equals(Version that) { - if (that == null) - return false; - - boolean this_present_version = true; - boolean that_present_version = true; - if (this_present_version || that_present_version) { - if (!(this_present_version && that_present_version)) - return false; - if (this.version != that.version) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(Version other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetVersion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Version("); - boolean first = true; - - sb.append("version:"); - sb.append(this.version); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. - __isset_bitfield = 0; - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class VersionStandardSchemeFactory implements SchemeFactory { - public VersionStandardScheme getScheme() { - return new VersionStandardScheme(); - } - } - - private static class VersionStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, Version struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // VERSION - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.version = iprot.readI32(); - struct.setVersionIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, Version struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(VERSION_FIELD_DESC); - oprot.writeI32(struct.version); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class VersionTupleSchemeFactory implements SchemeFactory { - public VersionTupleScheme getScheme() { - return new VersionTupleScheme(); - } - } - - private static class VersionTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, Version struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetVersion()) { - optionals.set(0); - } - oprot.writeBitSet(optionals, 1); - if (struct.isSetVersion()) { - oprot.writeI32(struct.version); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, Version struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(1); - if (incoming.get(0)) { - struct.version = iprot.readI32(); - struct.setVersionIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/WatchedEvent.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/WatchedEvent.java deleted file mode 100644 index 025db2e506..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/WatchedEvent.java +++ /dev/null @@ -1,620 +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 WatchedEvent implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { - private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WatchedEvent"); - - private static final org.apache.thrift.protocol.TField KEEPER_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("keeperState", org.apache.thrift.protocol.TType.I32, (short)1); - private static final org.apache.thrift.protocol.TField EVENT_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("eventType", org.apache.thrift.protocol.TType.I32, (short)2); - private static final org.apache.thrift.protocol.TField PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("path", org.apache.thrift.protocol.TType.STRING, (short)3); - - private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); - static { - schemes.put(StandardScheme.class, new WatchedEventStandardSchemeFactory()); - schemes.put(TupleScheme.class, new WatchedEventTupleSchemeFactory()); - } - - /** - * - * @see KeeperState - */ - public KeeperState keeperState; // required - /** - * - * @see EventType - */ - public EventType eventType; // required - public String path; // required - - /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ - public enum _Fields implements org.apache.thrift.TFieldIdEnum { - /** - * - * @see KeeperState - */ - KEEPER_STATE((short)1, "keeperState"), - /** - * - * @see EventType - */ - EVENT_TYPE((short)2, "eventType"), - PATH((short)3, "path"); - - private static final Map byName = new HashMap(); - - static { - for (_Fields field : EnumSet.allOf(_Fields.class)) { - byName.put(field.getFieldName(), field); - } - } - - /** - * Find the _Fields constant that matches fieldId, or null if its not found. - */ - public static _Fields findByThriftId(int fieldId) { - switch(fieldId) { - case 1: // KEEPER_STATE - return KEEPER_STATE; - case 2: // EVENT_TYPE - return EVENT_TYPE; - case 3: // PATH - return PATH; - default: - return null; - } - } - - /** - * Find the _Fields constant that matches fieldId, throwing an exception - * if it is not found. - */ - public static _Fields findByThriftIdOrThrow(int fieldId) { - _Fields fields = findByThriftId(fieldId); - if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); - return fields; - } - - /** - * Find the _Fields constant that matches name, or null if its not found. - */ - public static _Fields findByName(String name) { - return byName.get(name); - } - - private final short _thriftId; - private final String _fieldName; - - _Fields(short thriftId, String fieldName) { - _thriftId = thriftId; - _fieldName = fieldName; - } - - public short getThriftFieldId() { - return _thriftId; - } - - public String getFieldName() { - return _fieldName; - } - } - - // isset id assignments - public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; - static { - Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.KEEPER_STATE, new org.apache.thrift.meta_data.FieldMetaData("keeperState", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, KeeperState.class))); - tmpMap.put(_Fields.EVENT_TYPE, new org.apache.thrift.meta_data.FieldMetaData("eventType", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, EventType.class))); - tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMap); - org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WatchedEvent.class, metaDataMap); - } - - public WatchedEvent() { - } - - public WatchedEvent( - KeeperState keeperState, - EventType eventType, - String path) - { - this(); - this.keeperState = keeperState; - this.eventType = eventType; - this.path = path; - } - - /** - * Performs a deep copy on other. - */ - public WatchedEvent(WatchedEvent other) { - if (other.isSetKeeperState()) { - this.keeperState = other.keeperState; - } - if (other.isSetEventType()) { - this.eventType = other.eventType; - } - if (other.isSetPath()) { - this.path = other.path; - } - } - - public WatchedEvent deepCopy() { - return new WatchedEvent(this); - } - - @Override - public void clear() { - this.keeperState = null; - this.eventType = null; - this.path = null; - } - - /** - * - * @see KeeperState - */ - public KeeperState getKeeperState() { - return this.keeperState; - } - - /** - * - * @see KeeperState - */ - public WatchedEvent setKeeperState(KeeperState keeperState) { - this.keeperState = keeperState; - return this; - } - - public void unsetKeeperState() { - this.keeperState = null; - } - - /** Returns true if field keeperState is set (has been assigned a value) and false otherwise */ - public boolean isSetKeeperState() { - return this.keeperState != null; - } - - public void setKeeperStateIsSet(boolean value) { - if (!value) { - this.keeperState = null; - } - } - - /** - * - * @see EventType - */ - public EventType getEventType() { - return this.eventType; - } - - /** - * - * @see EventType - */ - public WatchedEvent setEventType(EventType eventType) { - this.eventType = eventType; - return this; - } - - public void unsetEventType() { - this.eventType = null; - } - - /** Returns true if field eventType is set (has been assigned a value) and false otherwise */ - public boolean isSetEventType() { - return this.eventType != null; - } - - public void setEventTypeIsSet(boolean value) { - if (!value) { - this.eventType = null; - } - } - - public String getPath() { - return this.path; - } - - public WatchedEvent setPath(String path) { - this.path = path; - return this; - } - - public void unsetPath() { - this.path = null; - } - - /** Returns true if field path is set (has been assigned a value) and false otherwise */ - public boolean isSetPath() { - return this.path != null; - } - - public void setPathIsSet(boolean value) { - if (!value) { - this.path = null; - } - } - - public void setFieldValue(_Fields field, Object value) { - switch (field) { - case KEEPER_STATE: - if (value == null) { - unsetKeeperState(); - } else { - setKeeperState((KeeperState)value); - } - break; - - case EVENT_TYPE: - if (value == null) { - unsetEventType(); - } else { - setEventType((EventType)value); - } - break; - - case PATH: - if (value == null) { - unsetPath(); - } else { - setPath((String)value); - } - break; - - } - } - - public Object getFieldValue(_Fields field) { - switch (field) { - case KEEPER_STATE: - return getKeeperState(); - - case EVENT_TYPE: - return getEventType(); - - case PATH: - return getPath(); - - } - throw new IllegalStateException(); - } - - /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ - public boolean isSet(_Fields field) { - if (field == null) { - throw new IllegalArgumentException(); - } - - switch (field) { - case KEEPER_STATE: - return isSetKeeperState(); - case EVENT_TYPE: - return isSetEventType(); - case PATH: - return isSetPath(); - } - throw new IllegalStateException(); - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof WatchedEvent) - return this.equals((WatchedEvent)that); - return false; - } - - public boolean equals(WatchedEvent that) { - if (that == null) - return false; - - boolean this_present_keeperState = true && this.isSetKeeperState(); - boolean that_present_keeperState = true && that.isSetKeeperState(); - if (this_present_keeperState || that_present_keeperState) { - if (!(this_present_keeperState && that_present_keeperState)) - return false; - if (!this.keeperState.equals(that.keeperState)) - return false; - } - - boolean this_present_eventType = true && this.isSetEventType(); - boolean that_present_eventType = true && that.isSetEventType(); - if (this_present_eventType || that_present_eventType) { - if (!(this_present_eventType && that_present_eventType)) - return false; - if (!this.eventType.equals(that.eventType)) - return false; - } - - boolean this_present_path = true && this.isSetPath(); - boolean that_present_path = true && that.isSetPath(); - if (this_present_path || that_present_path) { - if (!(this_present_path && that_present_path)) - return false; - if (!this.path.equals(that.path)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - @Override - public int compareTo(WatchedEvent other) { - if (!getClass().equals(other.getClass())) { - return getClass().getName().compareTo(other.getClass().getName()); - } - - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetKeeperState()).compareTo(other.isSetKeeperState()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetKeeperState()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keeperState, other.keeperState); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetEventType()).compareTo(other.isSetEventType()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetEventType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventType, other.eventType); - if (lastComparison != 0) { - return lastComparison; - } - } - lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetPath()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path, other.path); - if (lastComparison != 0) { - return lastComparison; - } - } - return 0; - } - - public _Fields fieldForId(int fieldId) { - return _Fields.findByThriftId(fieldId); - } - - public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { - schemes.get(iprot.getScheme()).getScheme().read(iprot, this); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { - schemes.get(oprot.getScheme()).getScheme().write(oprot, this); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("WatchedEvent("); - boolean first = true; - - sb.append("keeperState:"); - if (this.keeperState == null) { - sb.append("null"); - } else { - sb.append(this.keeperState); - } - first = false; - if (!first) sb.append(", "); - sb.append("eventType:"); - if (this.eventType == null) { - sb.append("null"); - } else { - sb.append(this.eventType); - } - first = false; - if (!first) sb.append(", "); - sb.append("path:"); - if (this.path == null) { - sb.append("null"); - } else { - sb.append(this.path); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws org.apache.thrift.TException { - // check for required fields - // check for sub-struct validity - } - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - try { - write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - try { - read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); - } catch (org.apache.thrift.TException te) { - throw new java.io.IOException(te); - } - } - - private static class WatchedEventStandardSchemeFactory implements SchemeFactory { - public WatchedEventStandardScheme getScheme() { - return new WatchedEventStandardScheme(); - } - } - - private static class WatchedEventStandardScheme extends StandardScheme { - - public void read(org.apache.thrift.protocol.TProtocol iprot, WatchedEvent struct) throws org.apache.thrift.TException { - org.apache.thrift.protocol.TField schemeField; - iprot.readStructBegin(); - while (true) - { - schemeField = iprot.readFieldBegin(); - if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { - break; - } - switch (schemeField.id) { - case 1: // KEEPER_STATE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.keeperState = KeeperState.findByValue(iprot.readI32()); - struct.setKeeperStateIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // EVENT_TYPE - if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.eventType = EventType.findByValue(iprot.readI32()); - struct.setEventTypeIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 3: // PATH - if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - default: - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - // check for required fields of primitive type, which can't be checked in the validate method - struct.validate(); - } - - public void write(org.apache.thrift.protocol.TProtocol oprot, WatchedEvent struct) throws org.apache.thrift.TException { - struct.validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (struct.keeperState != null) { - oprot.writeFieldBegin(KEEPER_STATE_FIELD_DESC); - oprot.writeI32(struct.keeperState.getValue()); - oprot.writeFieldEnd(); - } - if (struct.eventType != null) { - oprot.writeFieldBegin(EVENT_TYPE_FIELD_DESC); - oprot.writeI32(struct.eventType.getValue()); - oprot.writeFieldEnd(); - } - if (struct.path != null) { - oprot.writeFieldBegin(PATH_FIELD_DESC); - oprot.writeString(struct.path); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - } - - private static class WatchedEventTupleSchemeFactory implements SchemeFactory { - public WatchedEventTupleScheme getScheme() { - return new WatchedEventTupleScheme(); - } - } - - private static class WatchedEventTupleScheme extends TupleScheme { - - @Override - public void write(org.apache.thrift.protocol.TProtocol prot, WatchedEvent struct) throws org.apache.thrift.TException { - TTupleProtocol oprot = (TTupleProtocol) prot; - BitSet optionals = new BitSet(); - if (struct.isSetKeeperState()) { - optionals.set(0); - } - if (struct.isSetEventType()) { - optionals.set(1); - } - if (struct.isSetPath()) { - optionals.set(2); - } - oprot.writeBitSet(optionals, 3); - if (struct.isSetKeeperState()) { - oprot.writeI32(struct.keeperState.getValue()); - } - if (struct.isSetEventType()) { - oprot.writeI32(struct.eventType.getValue()); - } - if (struct.isSetPath()) { - oprot.writeString(struct.path); - } - } - - @Override - public void read(org.apache.thrift.protocol.TProtocol prot, WatchedEvent struct) throws org.apache.thrift.TException { - TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(3); - if (incoming.get(0)) { - struct.keeperState = KeeperState.findByValue(iprot.readI32()); - struct.setKeeperStateIsSet(true); - } - if (incoming.get(1)) { - struct.eventType = EventType.findByValue(iprot.readI32()); - struct.setEventTypeIsSet(true); - } - if (incoming.get(2)) { - struct.path = iprot.readString(); - struct.setPathIsSet(true); - } - } - } - -} - diff --git a/curator-x-rpc/src/test/java/org/apache/curator/generated/ZooKeeperExceptionType.java b/curator-x-rpc/src/test/java/org/apache/curator/generated/ZooKeeperExceptionType.java deleted file mode 100644 index 2514d30f45..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/generated/ZooKeeperExceptionType.java +++ /dev/null @@ -1,90 +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 java.util.Map; -import java.util.HashMap; -import org.apache.thrift.TEnum; - -public enum ZooKeeperExceptionType implements org.apache.thrift.TEnum { - SYSTEMERROR(0), - RUNTIMEINCONSISTENCY(1), - DATAINCONSISTENCY(2), - CONNECTIONLOSS(3), - MARSHALLINGERROR(4), - UNIMPLEMENTED(5), - OPERATIONTIMEOUT(6), - BADARGUMENTS(7), - APIERROR(8), - NOAUTH(9), - NOCHILDRENFOREPHEMERALS(10), - INVALIDACL(11), - AUTHFAILED(12), - SESSIONEXPIRED(13), - INVALIDCALLBACK(14), - SESSIONMOVED(15), - NOTREADONLY(16); - - private final int value; - - private ZooKeeperExceptionType(int value) { - this.value = value; - } - - /** - * Get the integer value of this enum value, as defined in the Thrift IDL. - */ - public int getValue() { - return value; - } - - /** - * Find a the enum type by its integer value, as defined in the Thrift IDL. - * @return null if the value is not found. - */ - public static ZooKeeperExceptionType findByValue(int value) { - switch (value) { - case 0: - return SYSTEMERROR; - case 1: - return RUNTIMEINCONSISTENCY; - case 2: - return DATAINCONSISTENCY; - case 3: - return CONNECTIONLOSS; - case 4: - return MARSHALLINGERROR; - case 5: - return UNIMPLEMENTED; - case 6: - return OPERATIONTIMEOUT; - case 7: - return BADARGUMENTS; - case 8: - return APIERROR; - case 9: - return NOAUTH; - case 10: - return NOCHILDRENFOREPHEMERALS; - case 11: - return INVALIDACL; - case 12: - return AUTHFAILED; - case 13: - return SESSIONEXPIRED; - case 14: - return INVALIDCALLBACK; - case 15: - return SESSIONMOVED; - case 16: - return NOTREADONLY; - default: - return null; - } - } -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/x/rpc/RpcTests.java b/curator-x-rpc/src/test/java/org/apache/curator/x/rpc/RpcTests.java deleted file mode 100644 index 792eedd077..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/x/rpc/RpcTests.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc; - -import org.apache.curator.framework.CuratorFramework; -import org.apache.curator.framework.CuratorFrameworkFactory; -import org.apache.curator.generated.*; -import org.apache.curator.retry.RetryOneTime; -import org.apache.curator.test.BaseClassForTests; -import org.apache.curator.test.InstanceSpec; -import org.apache.curator.test.Timing; -import org.apache.curator.utils.CloseableUtils; -import org.apache.curator.utils.ThreadUtils; -import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.thrift.protocol.TProtocol; -import org.apache.thrift.transport.TSocket; -import org.apache.zookeeper.WatchedEvent; -import org.apache.zookeeper.Watcher; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.node.ArrayNode; -import org.codehaus.jackson.node.ObjectNode; -import org.testng.Assert; -import org.testng.annotations.AfterMethod; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; -import java.nio.ByteBuffer; -import java.util.concurrent.Callable; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.ExecutorCompletionService; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Future; -import java.util.concurrent.atomic.AtomicBoolean; - -public class RpcTests extends BaseClassForTests -{ - private Timing timing = new Timing(); - private CuratorProjectionServer thriftServer; - private CuratorService.Client curatorServiceClient; - private EventService.Client eventServiceClient; - private int thriftPort; - - @BeforeMethod - @Override - public void setup() throws Exception - { - super.setup(); - - ObjectMapper mapper = new ObjectMapper(); - - ObjectNode connectionNode = mapper.createObjectNode(); - connectionNode.put("name", "test"); - connectionNode.put("connectionString", server.getConnectString()); - - ObjectNode thriftNode = mapper.createObjectNode(); - thriftPort = InstanceSpec.getRandomPort(); - thriftNode.put("port", thriftPort); - - ArrayNode connections = mapper.createArrayNode(); - connections.add(connectionNode); - - ObjectNode node = mapper.createObjectNode(); - node.put("connections", connections); - node.put("thrift", thriftNode); - - final String configurationJson = mapper.writeValueAsString(node); - - thriftServer = CuratorProjectionServer.startServer(configurationJson); - - TSocket clientTransport = new TSocket("localhost", thriftPort); - clientTransport.setTimeout(timing.connection()); - clientTransport.open(); - TProtocol clientProtocol = new TBinaryProtocol(clientTransport); - curatorServiceClient = new CuratorService.Client(clientProtocol); - - TSocket eventTransport = new TSocket("localhost", thriftPort); - eventTransport.setTimeout(timing.connection()); - eventTransport.open(); - TProtocol eventProtocol = new TBinaryProtocol(eventTransport); - eventServiceClient = new EventService.Client(eventProtocol); - - } - - @AfterMethod - @Override - public void teardown() throws Exception - { - try - { - thriftServer.stop(); - } - finally - { - super.teardown(); - } - } - - @Test - public void testBasic() throws Exception - { - CuratorProjection curatorProjection = curatorServiceClient.newCuratorProjection("test"); - CreateSpec spec = new CreateSpec(); - spec.path = "/test"; - spec.data = ByteBuffer.wrap("value".getBytes()); - OptionalPath node = curatorServiceClient.createNode(curatorProjection, spec); - Assert.assertEquals(node.path, "/test"); - - GetDataSpec dataSpec = new GetDataSpec(); - dataSpec.path = "/test"; - OptionalData data = curatorServiceClient.getData(curatorProjection, dataSpec); - Assert.assertEquals(data.data, ByteBuffer.wrap("value".getBytes())); - } - - @Test - public void testEvents() throws Exception - { - final CuratorProjection curatorProjection = curatorServiceClient.newCuratorProjection("test"); - - final CountDownLatch connectedLatch = new CountDownLatch(1); - final CountDownLatch nodeCreatedLatch = new CountDownLatch(1); - Callable proc = new Callable() - { - @Override - public Void call() throws Exception - { - while ( !Thread.currentThread().isInterrupted() ) - { - CuratorEvent event = eventServiceClient.getNextEvent(curatorProjection); - if ( event.type == CuratorEventType.CONNECTION_CONNECTED ) - { - connectedLatch.countDown(); - } - else if ( event.type == CuratorEventType.WATCHED ) - { - if ( event.watchedEvent.eventType == EventType.NodeCreated ) - { - nodeCreatedLatch.countDown(); - } - } - } - return null; - } - }; - Future eventFuture = ThreadUtils.newSingleThreadExecutor("test").submit(proc); - - Assert.assertTrue(timing.awaitLatch(connectedLatch)); - - ExistsSpec spec = new ExistsSpec(); - spec.path = "/test"; - spec.watched = true; - curatorServiceClient.exists(curatorProjection, spec); - - CreateSpec createSpec = new CreateSpec(); - createSpec.path = "/test"; - curatorServiceClient.createNode(curatorProjection, createSpec); - - Assert.assertTrue(timing.awaitLatch(nodeCreatedLatch)); - - eventFuture.cancel(true); - } - - @Test - public void testLockMultiThread() throws Exception - { - final Timing timing = new Timing(); - - TSocket clientTransport = new TSocket("localhost", thriftPort); - clientTransport.setTimeout(timing.connection()); - clientTransport.open(); - TProtocol clientProtocol = new TBinaryProtocol(clientTransport); - final CuratorService.Client secondCuratorServiceClient = new CuratorService.Client(clientProtocol); - ExecutorService service = ThreadUtils.newFixedThreadPool(2, "test"); - ExecutorCompletionService completer = new ExecutorCompletionService(service); - - final CountDownLatch lockLatch = new CountDownLatch(2); - final AtomicBoolean hasTheLock = new AtomicBoolean(); - for ( int i = 0; i < 2; ++i ) - { - final CuratorService.Client client = (i == 0) ? curatorServiceClient : secondCuratorServiceClient; - Callable proc = new Callable() - { - @Override - public Void call() throws Exception - { - CuratorProjection curatorProjection = client.newCuratorProjection("test"); - OptionalLockProjection lockProjection = client.acquireLock(curatorProjection, "/lock", timing.forWaiting().milliseconds()); - if ( lockProjection.lockProjection == null ) - { - throw new Exception("Could not acquire lock"); - } - try - { - if ( !hasTheLock.compareAndSet(false, true) ) - { - throw new Exception("Two lockers"); - } - - timing.sleepABit(); - } - finally - { - hasTheLock.set(false); - lockLatch.countDown(); - client.closeGenericProjection(curatorProjection, lockProjection.lockProjection.id); - } - - return null; - } - }; - completer.submit(proc); - } - - completer.take().get(); - completer.take().get(); - - Assert.assertTrue(timing.awaitLatch(lockLatch)); - - service.shutdownNow(); - } - - @Test - public void testRecoverableException() throws Exception - { - CuratorProjection curatorProjection = curatorServiceClient.newCuratorProjection("test"); - CreateSpec spec = new CreateSpec(); - spec.path = "/this/wont/work"; - spec.data = ByteBuffer.wrap("value".getBytes()); - try - { - curatorServiceClient.createNode(curatorProjection, spec); - Assert.fail("Should have failed"); - } - catch ( CuratorException e ) - { - Assert.assertEquals(e.getType(), ExceptionType.NODE); - Assert.assertNotNull(e.nodeException); - Assert.assertEquals(e.nodeException, NodeExceptionType.NONODE); - } - } - - @Test - public void testEphemeralCleanup() throws Exception - { - CuratorProjection curatorProjection = curatorServiceClient.newCuratorProjection("test"); - CreateSpec spec = new CreateSpec(); - spec.path = "/test"; - spec.data = ByteBuffer.wrap("value".getBytes()); - spec.mode = CreateMode.EPHEMERAL; - OptionalPath node = curatorServiceClient.createNode(curatorProjection, spec); - System.out.println(node); - - final CountDownLatch latch = new CountDownLatch(1); - CuratorFramework client = CuratorFrameworkFactory.newClient(server.getConnectString(), new RetryOneTime(1)); - try - { - client.start(); - Watcher watcher = new Watcher() - { - @Override - public void process(WatchedEvent event) - { - if ( event.getType() == Event.EventType.NodeDeleted ) - { - latch.countDown(); - } - } - }; - client.checkExists().usingWatcher(watcher).forPath("/test"); - - curatorServiceClient.closeCuratorProjection(curatorProjection); - - Assert.assertTrue(timing.awaitLatch(latch)); - } - finally - { - CloseableUtils.closeQuietly(client); - } - } -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/x/rpc/TestClient.java b/curator-x-rpc/src/test/java/org/apache/curator/x/rpc/TestClient.java deleted file mode 100644 index e15351e6dd..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/x/rpc/TestClient.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc; - -import org.apache.curator.generated.*; -import org.apache.thrift.TException; -import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.thrift.protocol.TProtocol; -import org.apache.thrift.transport.TSocket; -import java.nio.ByteBuffer; -import java.util.List; -import java.util.concurrent.Executors; - -public class TestClient -{ - public static void main(String[] args) throws Exception - { - TSocket clientTransport = new TSocket("localhost", 8899); - clientTransport.open(); - TProtocol clientProtocol = new TBinaryProtocol(clientTransport); - final CuratorService.Client client = new CuratorService.Client(clientProtocol); - - TSocket eventTransport = new TSocket("localhost", 8899); - eventTransport.open(); - TProtocol eventProtocol = new TBinaryProtocol(eventTransport); - final EventService.Client serviceClient = new EventService.Client(eventProtocol); - - TSocket discoveryTransport = new TSocket("localhost", 8899); - discoveryTransport.open(); - TProtocol discoveryProtocol = new TBinaryProtocol(discoveryTransport); - final DiscoveryService.Client discoveryClient = new DiscoveryService.Client(discoveryProtocol); - - final CuratorProjection curatorProjection = client.newCuratorProjection("test"); - - Executors.newSingleThreadExecutor().submit - ( - new Runnable() - { - @Override - public void run() - { - try - { - //noinspection InfiniteLoopStatement - for(;;) - { - CuratorEvent nextEvent = serviceClient.getNextEvent(curatorProjection); - System.out.println(nextEvent); - } - } - catch ( TException e ) - { - e.printStackTrace(); - } - } - } - ); - - CreateSpec createSpec = new CreateSpec(); - createSpec.path = "/this/should/fail"; - createSpec.data = ByteBuffer.wrap("hey".getBytes()); - try - { - client.createNode(curatorProjection, createSpec); - } - catch ( CuratorException e ) - { - System.out.println("Ex: " + e); - } - - createSpec = new CreateSpec(); - createSpec.path = "/a/b/c"; - createSpec.creatingParentsIfNeeded = true; - createSpec.data = ByteBuffer.wrap("hey".getBytes()); - OptionalPath path = client.createNode(curatorProjection, createSpec); - System.out.println("Path: " + path); - - PathChildrenCacheProjection pathChildrenCacheProjection = client.startPathChildrenCache(curatorProjection, "/a/b", true, false, PathChildrenCacheStartMode.BUILD_INITIAL_CACHE); - - NodeCacheProjection nodeCache = client.startNodeCache(curatorProjection, "/a/b/c", false, true); - ChildData nodeCacheData = client.getNodeCacheData(curatorProjection, nodeCache); - System.out.println("nodeCacheData: " + nodeCacheData); - - List pathChildrenCacheData = client.getPathChildrenCacheData(curatorProjection, pathChildrenCacheProjection); - System.out.println("Child data: " + pathChildrenCacheData); - - GetChildrenSpec getChildrenSpec = new GetChildrenSpec(); - getChildrenSpec.path = "/a"; - OptionalChildrenList children = client.getChildren(curatorProjection, getChildrenSpec); - System.out.println("Children: " + children); - - ChildData pathChildrenCacheDataForPath = client.getPathChildrenCacheDataForPath(curatorProjection, pathChildrenCacheProjection, "/a/b/c"); - System.out.println(pathChildrenCacheDataForPath); - - OptionalLockProjection lockId = client.acquireLock(curatorProjection, "/mylock", 1000); - client.closeGenericProjection(curatorProjection, lockId.lockProjection.id); - - GetDataSpec getDataSpec = new GetDataSpec(); - getDataSpec.watched = true; - getDataSpec.path = "/a/b/c"; - getDataSpec.asyncContext = "hey"; - OptionalData optionalData = client.getData(curatorProjection, getDataSpec); - System.out.println("getData: " + optionalData); - - ExistsSpec existsSpec = new ExistsSpec(); - existsSpec.path = "/a/b/c"; - System.out.println("exists: " + client.exists(curatorProjection, existsSpec)); - - DeleteSpec deleteSpec = new DeleteSpec(); - deleteSpec.path = "/a/b/c"; - client.deleteNode(curatorProjection, deleteSpec); - - System.out.println("exists: " + client.exists(curatorProjection, existsSpec)); - - LeaderResult leader = client.startLeaderSelector(curatorProjection, "/leader", "me", 10000); - System.out.println("Has Leader: " + leader.isLeader); - - List leaderParticipants = client.getLeaderParticipants(curatorProjection, leader.projection); - System.out.println("Participants: " + leaderParticipants); - - boolean isLeader = client.isLeader(curatorProjection, leader.projection); - System.out.println("isLeader: " + isLeader); - - client.closeGenericProjection(curatorProjection, leader.projection.id); - - pathChildrenCacheData = client.getPathChildrenCacheData(curatorProjection, pathChildrenCacheProjection); - System.out.println("Child data: " + pathChildrenCacheData); - - nodeCacheData = client.getNodeCacheData(curatorProjection, nodeCache); - System.out.println("nodeCacheData: " + nodeCacheData); - - PersistentEphemeralNodeProjection node = client.startPersistentEphemeralNode(curatorProjection, "/my/path", ByteBuffer.wrap("hey".getBytes()), PersistentEphemeralNodeMode.EPHEMERAL); - existsSpec.path = "/my/path"; - OptionalStat nodeExists = client.exists(curatorProjection, existsSpec); - System.out.println("nodeExists: " + nodeExists); - client.closeGenericProjection(curatorProjection, node.id); - - List leaseProjections = client.acquireSemaphore(curatorProjection, "/semi", 3, 1000, 10); - System.out.println("leaseProjections: " + leaseProjections); - for ( LeaseProjection leaseProjection : leaseProjections ) - { - client.closeGenericProjection(curatorProjection, leaseProjection.id); - } - - DiscoveryInstance yourInstance = discoveryClient.makeDiscoveryInstance("mine", ByteBuffer.wrap(new byte[]{}), 8080); - DiscoveryProjection discovery = discoveryClient.startDiscovery(curatorProjection, "/discovery", yourInstance); - DiscoveryProviderProjection provider = discoveryClient.startProvider(curatorProjection, discovery, "mine", ProviderStrategyType.ROUND_ROBIN, 1000, 3); - - DiscoveryInstance instance = discoveryClient.getInstance(curatorProjection, provider); - System.out.println("Instance: " + instance); - } -} diff --git a/curator-x-rpc/src/test/java/org/apache/curator/x/rpc/TestServer.java b/curator-x-rpc/src/test/java/org/apache/curator/x/rpc/TestServer.java deleted file mode 100644 index 3564777565..0000000000 --- a/curator-x-rpc/src/test/java/org/apache/curator/x/rpc/TestServer.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.curator.x.rpc; - -import com.google.common.io.Resources; -import org.apache.curator.test.TestingServer; -import java.nio.charset.Charset; - -public class TestServer -{ - public static void main(String[] args) throws Exception - { - new TestingServer(2181); - - String configurationSource = Resources.toString(Resources.getResource("configuration/test.json"), Charset.defaultCharset()); - CuratorProjectionServer.main(new String[]{configurationSource}); - } -} diff --git a/curator-x-rpc/src/test/resources/configuration/connections.json b/curator-x-rpc/src/test/resources/configuration/connections.json deleted file mode 100644 index fb5f84a03e..0000000000 --- a/curator-x-rpc/src/test/resources/configuration/connections.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "connections": [ - { - "name": "test", - "connectionString": "one:1,two:2", - "sessionLength": "3m", - "connectionTimeout": "20s", - "retry": { - "type": "exponential-backoff", - "baseSleepTime": "1s", - "maxRetries": 10 - } - }, - - { - "name": "alt", - "connectionString": "three:3,four:4", - "sessionLength": "4m", - "connectionTimeout": "30s", - "retry": { - "type": "ntimes", - "sleepBetweenRetries": "1m", - "n": 10 - } - } - ] -} \ No newline at end of file diff --git a/curator-x-rpc/src/test/resources/configuration/logging.json b/curator-x-rpc/src/test/resources/configuration/logging.json deleted file mode 100644 index 970ef2074a..0000000000 --- a/curator-x-rpc/src/test/resources/configuration/logging.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "logging": { - "level": "INFO", - - "appenders": [ - { - "type": "file", - "currentLogFilename": "logs/foo.log", - "archivedLogFilenamePattern": "logs/foo-%d.log.gz", - "archivedFileCount": 10, - "timeZone": "UTC" - }, - - { - "type": "console" - } - ] - } -} \ No newline at end of file diff --git a/curator-x-rpc/src/test/resources/configuration/simple.json b/curator-x-rpc/src/test/resources/configuration/simple.json deleted file mode 100644 index ccb2925451..0000000000 --- a/curator-x-rpc/src/test/resources/configuration/simple.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "thrift": { - "port": 1234 - }, - - "pingTime": "10s" -} \ No newline at end of file diff --git a/curator-x-rpc/src/test/resources/configuration/test.json b/curator-x-rpc/src/test/resources/configuration/test.json deleted file mode 100644 index c9d6cb85d7..0000000000 --- a/curator-x-rpc/src/test/resources/configuration/test.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "projectionExpiration": "15s", - - "thrift": { - "port": 8899 - }, - - "connections": [ - { - "name": "test", - "connectionString": "localhost:2181" - } - ] -} \ No newline at end of file