From 2416eaef41a06049c577eee3f751eecb4e443192 Mon Sep 17 00:00:00 2001 From: Klay Date: Thu, 30 Sep 2021 11:02:20 -0700 Subject: [PATCH 1/6] initial commit for supporting ssl traffic --- .github/workflows/maven.yml | 2 + client/pom.xml | 6 + .../facebook/thrift/transport/TSocket.java | 31 ++ .../nebula/client/graph/NebulaPoolConfig.java | 24 + .../client/graph/data/CASignedSSLParam.java | 32 ++ .../nebula/client/graph/data/SSLParam.java | 25 ++ .../client/graph/data/SelfSignedSSLParam.java | 32 ++ .../client/graph/net/ConnObjectPool.java | 12 +- .../nebula/client/graph/net/Connection.java | 4 + .../nebula/client/graph/net/NebulaPool.java | 4 +- .../graph/net/RoundRobinLoadBalancer.java | 20 +- .../client/graph/net/SyncConnection.java | 54 ++- .../java/com/vesoft/nebula/util/SslUtil.java | 170 ++++++++ .../client/graph/data/TestDataFromServer.java | 89 ++++ .../resources/docker-compose-casigned.yaml | 410 ++++++++++++++++++ .../resources/docker-compose-selfsigned.yaml | 410 ++++++++++++++++++ client/src/test/resources/ssl/casigned.crt | 16 + client/src/test/resources/ssl/casigned.key | 27 ++ client/src/test/resources/ssl/casigned.pem | 24 + client/src/test/resources/ssl/selfsigned.key | 30 ++ .../test/resources/ssl/selfsigned.password | 1 + client/src/test/resources/ssl/selfsigned.pem | 24 + client/src/test/resources/ssl/test.ca.key | 30 ++ .../src/test/resources/ssl/test.ca.password | 1 + client/src/test/resources/ssl/test.ca.pem | 24 + client/src/test/resources/ssl/test.ca.srl | 1 + client/src/test/resources/ssl/test.derive.crt | 23 + client/src/test/resources/ssl/test.derive.csr | 19 + client/src/test/resources/ssl/test.derive.key | 27 ++ .../nebula/examples/GraphClientExample.java | 58 ++- examples/src/main/resources/ssl/casigned.crt | 16 + examples/src/main/resources/ssl/casigned.key | 27 ++ examples/src/main/resources/ssl/casigned.pem | 24 + .../src/main/resources/ssl/selfsigned.key | 30 ++ .../main/resources/ssl/selfsigned.password | 1 + .../src/main/resources/ssl/selfsigned.pem | 24 + 36 files changed, 1736 insertions(+), 16 deletions(-) create mode 100644 client/src/main/java/com/vesoft/nebula/client/graph/data/CASignedSSLParam.java create mode 100644 client/src/main/java/com/vesoft/nebula/client/graph/data/SSLParam.java create mode 100644 client/src/main/java/com/vesoft/nebula/client/graph/data/SelfSignedSSLParam.java create mode 100644 client/src/main/java/com/vesoft/nebula/util/SslUtil.java create mode 100644 client/src/test/resources/docker-compose-casigned.yaml create mode 100644 client/src/test/resources/docker-compose-selfsigned.yaml create mode 100644 client/src/test/resources/ssl/casigned.crt create mode 100644 client/src/test/resources/ssl/casigned.key create mode 100644 client/src/test/resources/ssl/casigned.pem create mode 100644 client/src/test/resources/ssl/selfsigned.key create mode 100644 client/src/test/resources/ssl/selfsigned.password create mode 100644 client/src/test/resources/ssl/selfsigned.pem create mode 100644 client/src/test/resources/ssl/test.ca.key create mode 100644 client/src/test/resources/ssl/test.ca.password create mode 100644 client/src/test/resources/ssl/test.ca.pem create mode 100644 client/src/test/resources/ssl/test.ca.srl create mode 100644 client/src/test/resources/ssl/test.derive.crt create mode 100644 client/src/test/resources/ssl/test.derive.csr create mode 100644 client/src/test/resources/ssl/test.derive.key create mode 100644 examples/src/main/resources/ssl/casigned.crt create mode 100644 examples/src/main/resources/ssl/casigned.key create mode 100644 examples/src/main/resources/ssl/casigned.pem create mode 100644 examples/src/main/resources/ssl/selfsigned.key create mode 100644 examples/src/main/resources/ssl/selfsigned.password create mode 100644 examples/src/main/resources/ssl/selfsigned.pem diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 9a28d7b4f..82ffec2ca 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -39,6 +39,8 @@ jobs: git clone https://github.com/vesoft-inc/nebula-docker-compose.git pushd nebula-docker-compose/ cp ../../client/src/test/resources/docker-compose.yaml . + cp ../../client/src/test/resources/docker-compose-casigned.yaml . + cp ../../client/src/test/resources/docker-compose-selfsigned.yaml . docker-compose up -d sleep 10 popd diff --git a/client/pom.xml b/client/pom.xml index 8e056ac68..a17bc85f7 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -22,6 +22,7 @@ 2.2 3.0.1 1.2.78 + 1.69 @@ -239,5 +240,10 @@ fastjson ${fastjson.version} + + org.bouncycastle + bcpkix-jdk15on + ${bouncycastle.version} + diff --git a/client/src/main/fbthrift/com/facebook/thrift/transport/TSocket.java b/client/src/main/fbthrift/com/facebook/thrift/transport/TSocket.java index 47160f930..e95168876 100644 --- a/client/src/main/fbthrift/com/facebook/thrift/transport/TSocket.java +++ b/client/src/main/fbthrift/com/facebook/thrift/transport/TSocket.java @@ -70,6 +70,37 @@ public TSocket(Socket socket) throws TTransportException { } } + /** + * Constructor that takes an already created socket that comes alone with timeout + * and connectionTimeout. + * + * @param socket Already created socket object + * @param timeout Socket timeout + * @param connectionTimeout Socket connection timeout + * @throws TTransportException if there is an error setting up the streams + */ + public TSocket(Socket socket, int timeout, int connectionTimeout) throws TTransportException { + socket_ = socket; + try { + socket_.setSoLinger(false, 0); + socket_.setTcpNoDelay(true); + socket_.setSoTimeout(timeout); + connectionTimeout_ = connectionTimeout; + } catch (SocketException sx) { + LOGGER.warn("Could not configure socket.", sx); + } + + if (isOpen()) { + try { + inputStream_ = new BufferedInputStream(socket_.getInputStream()); + outputStream_ = new BufferedOutputStream(socket_.getOutputStream()); + } catch (IOException iox) { + close(); + throw new TTransportException(TTransportException.NOT_OPEN, iox); + } + } + } + /** * Creates a new unconnected socket that will connect to the given host on the given port. * diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/NebulaPoolConfig.java b/client/src/main/java/com/vesoft/nebula/client/graph/NebulaPoolConfig.java index 3e1f70110..60bba75ea 100644 --- a/client/src/main/java/com/vesoft/nebula/client/graph/NebulaPoolConfig.java +++ b/client/src/main/java/com/vesoft/nebula/client/graph/NebulaPoolConfig.java @@ -6,6 +6,8 @@ package com.vesoft.nebula.client.graph; +import com.vesoft.nebula.client.graph.data.SSLParam; + public class NebulaPoolConfig { // The min connections in pool for all addresses private int minConnsSize = 0; @@ -27,6 +29,28 @@ public class NebulaPoolConfig { // the wait time to get idle connection, unit ms private int waitTime = 0; + // set to true to turn on ssl encrypted traffic + private boolean enableSsl = false; + + // ssl param is required if ssl is turned on + private SSLParam sslParam = null; + + public boolean isEnableSsl() { + return enableSsl; + } + + public void setEnableSsl(boolean enableSsl) { + this.enableSsl = enableSsl; + } + + public SSLParam getSslParam() { + return sslParam; + } + + public void setSslParam(SSLParam sslParam) { + this.sslParam = sslParam; + } + public int getMinConnSize() { return minConnsSize; } diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/data/CASignedSSLParam.java b/client/src/main/java/com/vesoft/nebula/client/graph/data/CASignedSSLParam.java new file mode 100644 index 000000000..eb9644857 --- /dev/null +++ b/client/src/main/java/com/vesoft/nebula/client/graph/data/CASignedSSLParam.java @@ -0,0 +1,32 @@ +/* Copyright (c) 2020 vesoft inc. All rights reserved. + * + * This source code is licensed under Apache 2.0 License, + * attached with Common Clause Condition 1.0, found in the LICENSES directory. + */ + +package com.vesoft.nebula.client.graph.data; + +public class CASignedSSLParam extends SSLParam { + private String caCrtFilePath; + private String crtFilePath; + private String keyFilePath; + + public CASignedSSLParam(String caCrtFilePath, String crtFilePath, String keyFilePath) { + super(SignMode.CA_SIGNED); + this.caCrtFilePath = caCrtFilePath; + this.crtFilePath = crtFilePath; + this.keyFilePath = keyFilePath; + } + + public String getCaCrtFilePath() { + return caCrtFilePath; + } + + public String getCrtFilePath() { + return crtFilePath; + } + + public String getKeyFilePath() { + return keyFilePath; + } +} diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/data/SSLParam.java b/client/src/main/java/com/vesoft/nebula/client/graph/data/SSLParam.java new file mode 100644 index 000000000..05c346578 --- /dev/null +++ b/client/src/main/java/com/vesoft/nebula/client/graph/data/SSLParam.java @@ -0,0 +1,25 @@ +/* Copyright (c) 2020 vesoft inc. All rights reserved. + * + * This source code is licensed under Apache 2.0 License, + * attached with Common Clause Condition 1.0, found in the LICENSES directory. + */ + +package com.vesoft.nebula.client.graph.data; + +public abstract class SSLParam { + public enum SignMode { + NONE, + SELF_SIGNED, + CA_SIGNED + } + + private SignMode signMode; + + public SSLParam(SignMode signMode) { + this.signMode = signMode; + } + + public SignMode getSignMode() { + return signMode; + } +} diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/data/SelfSignedSSLParam.java b/client/src/main/java/com/vesoft/nebula/client/graph/data/SelfSignedSSLParam.java new file mode 100644 index 000000000..26dddc82c --- /dev/null +++ b/client/src/main/java/com/vesoft/nebula/client/graph/data/SelfSignedSSLParam.java @@ -0,0 +1,32 @@ +/* Copyright (c) 2020 vesoft inc. All rights reserved. + * + * This source code is licensed under Apache 2.0 License, + * attached with Common Clause Condition 1.0, found in the LICENSES directory. + */ + +package com.vesoft.nebula.client.graph.data; + +public class SelfSignedSSLParam extends SSLParam { + private String crtFilePath; + private String keyFilePath; + private String password; + + public SelfSignedSSLParam(String crtFilePath, String keyFilePath, String password) { + super(SignMode.SELF_SIGNED); + this.crtFilePath = crtFilePath; + this.keyFilePath = keyFilePath; + this.password = password; + } + + public String getCrtFilePath() { + return crtFilePath; + } + + public String getKeyFilePath() { + return keyFilePath; + } + + public String getPassword() { + return password; + } +} diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/net/ConnObjectPool.java b/client/src/main/java/com/vesoft/nebula/client/graph/net/ConnObjectPool.java index ac043fa2d..9e2ebd4ab 100644 --- a/client/src/main/java/com/vesoft/nebula/client/graph/net/ConnObjectPool.java +++ b/client/src/main/java/com/vesoft/nebula/client/graph/net/ConnObjectPool.java @@ -9,7 +9,7 @@ public class ConnObjectPool extends BasePooledObjectFactory { private final NebulaPoolConfig config; - private LoadBalancer loadBalancer; + private final LoadBalancer loadBalancer; private static final int retryTime = 3; public ConnObjectPool(LoadBalancer loadBalancer, NebulaPoolConfig config) { @@ -28,7 +28,15 @@ public SyncConnection create() throws IOErrorException { SyncConnection conn = new SyncConnection(); while (retry-- > 0) { try { - conn.open(address, config.getTimeout()); + if (config.isEnableSsl()) { + if (config.getSslParam() == null) { + throw new IllegalArgumentException("SSL Param is required when enableSsl " + + "is set to true"); + } + conn.open(address, config.getTimeout(), config.getSslParam()); + } else { + conn.open(address, config.getTimeout()); + } return conn; } catch (IOErrorException e) { if (retry == 0) { diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/net/Connection.java b/client/src/main/java/com/vesoft/nebula/client/graph/net/Connection.java index 1cbd1ba3e..5f94f1c84 100644 --- a/client/src/main/java/com/vesoft/nebula/client/graph/net/Connection.java +++ b/client/src/main/java/com/vesoft/nebula/client/graph/net/Connection.java @@ -1,6 +1,7 @@ package com.vesoft.nebula.client.graph.net; import com.vesoft.nebula.client.graph.data.HostAddress; +import com.vesoft.nebula.client.graph.data.SSLParam; import com.vesoft.nebula.client.graph.exception.IOErrorException; public abstract class Connection { @@ -10,6 +11,9 @@ public HostAddress getServerAddress() { return this.serverAddr; } + public abstract void open(HostAddress address, int timeout, SSLParam sslParam) + throws IOErrorException; + public abstract void open(HostAddress address, int timeout) throws IOErrorException; public abstract void reopen() throws IOErrorException; diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/net/NebulaPool.java b/client/src/main/java/com/vesoft/nebula/client/graph/net/NebulaPool.java index b5c6cd567..a14c02a90 100644 --- a/client/src/main/java/com/vesoft/nebula/client/graph/net/NebulaPool.java +++ b/client/src/main/java/com/vesoft/nebula/client/graph/net/NebulaPool.java @@ -85,7 +85,9 @@ public boolean init(List addresses, NebulaPoolConfig config) checkConfig(config); this.waitTime = config.getWaitTime(); List newAddrs = hostToIp(addresses); - this.loadBalancer = new RoundRobinLoadBalancer(newAddrs, config.getTimeout()); + this.loadBalancer = config.isEnableSsl() + ? new RoundRobinLoadBalancer(newAddrs,config.getTimeout(), config.getSslParam()) + : new RoundRobinLoadBalancer(newAddrs,config.getTimeout()); ConnObjectPool objectPool = new ConnObjectPool(this.loadBalancer, config); this.objectPool = new GenericObjectPool<>(objectPool); GenericObjectPoolConfig objConfig = new GenericObjectPoolConfig(); diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/net/RoundRobinLoadBalancer.java b/client/src/main/java/com/vesoft/nebula/client/graph/net/RoundRobinLoadBalancer.java index 661dcaa80..e05e3a9df 100644 --- a/client/src/main/java/com/vesoft/nebula/client/graph/net/RoundRobinLoadBalancer.java +++ b/client/src/main/java/com/vesoft/nebula/client/graph/net/RoundRobinLoadBalancer.java @@ -1,6 +1,7 @@ package com.vesoft.nebula.client.graph.net; import com.vesoft.nebula.client.graph.data.HostAddress; +import com.vesoft.nebula.client.graph.data.SSLParam; import com.vesoft.nebula.client.graph.exception.IOErrorException; import java.util.ArrayList; import java.util.HashMap; @@ -21,6 +22,8 @@ public class RoundRobinLoadBalancer implements LoadBalancer { private final AtomicInteger pos = new AtomicInteger(0); private final int delayTime = 60; // unit seconds private final ScheduledExecutorService schedule = Executors.newScheduledThreadPool(1); + private SSLParam sslParam; + private boolean enabledSsl; public RoundRobinLoadBalancer(List addresses, int timeout) { this.timeout = timeout; @@ -31,6 +34,17 @@ public RoundRobinLoadBalancer(List addresses, int timeout) { schedule.scheduleAtFixedRate(this::scheduleTask, 0, delayTime, TimeUnit.SECONDS); } + public RoundRobinLoadBalancer(List addresses, int timeout, SSLParam sslParam) { + this.timeout = timeout; + this.sslParam = sslParam; + this.enabledSsl = true; + for (HostAddress addr : addresses) { + this.addresses.add(addr); + this.serversStatus.put(addr, S_BAD); + } + schedule.scheduleAtFixedRate(this::scheduleTask, 0, delayTime, TimeUnit.SECONDS); + } + public void close() { schedule.shutdownNow(); } @@ -63,7 +77,11 @@ public void updateServersStatus() { public boolean ping(HostAddress addr) { try { Connection connection = new SyncConnection(); - connection.open(addr, this.timeout); + if (enabledSsl) { + connection.open(addr, this.timeout, sslParam); + } else { + connection.open(addr, this.timeout); + } connection.close(); return true; } catch (IOErrorException e) { diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/net/SyncConnection.java b/client/src/main/java/com/vesoft/nebula/client/graph/net/SyncConnection.java index 08a5e0a3b..83f911b23 100644 --- a/client/src/main/java/com/vesoft/nebula/client/graph/net/SyncConnection.java +++ b/client/src/main/java/com/vesoft/nebula/client/graph/net/SyncConnection.java @@ -15,23 +15,68 @@ import com.facebook.thrift.transport.TTransportException; import com.facebook.thrift.utils.StandardCharsets; import com.vesoft.nebula.ErrorCode; +import com.vesoft.nebula.client.graph.data.CASignedSSLParam; import com.vesoft.nebula.client.graph.data.HostAddress; +import com.vesoft.nebula.client.graph.data.SSLParam; +import com.vesoft.nebula.client.graph.data.SelfSignedSSLParam; import com.vesoft.nebula.client.graph.exception.AuthFailedException; import com.vesoft.nebula.client.graph.exception.IOErrorException; import com.vesoft.nebula.graph.AuthResponse; import com.vesoft.nebula.graph.ExecutionResponse; import com.vesoft.nebula.graph.GraphService; +import com.vesoft.nebula.util.SslUtil; +import java.io.IOException; +import javax.net.ssl.SSLSocketFactory; public class SyncConnection extends Connection { protected TTransport transport = null; protected TProtocol protocol = null; private GraphService.Client client = null; private int timeout = 0; + private SSLParam sslParam = null; + private boolean enabledSsl = false; + + @Override + public void open(HostAddress address, int timeout, SSLParam sslParam) throws IOErrorException { + try { + SSLSocketFactory sslSocketFactory; + + this.sslParam = sslParam; + if (sslParam == null) { + open(address, timeout); + return; + } + this.serverAddr = address; + this.timeout = timeout <= 0 ? Integer.MAX_VALUE : timeout; + this.enabledSsl = true; + if (sslParam.getSignMode() == SSLParam.SignMode.CA_SIGNED) { + sslSocketFactory = + SslUtil.getSSLSocketFactoryWithCA((CASignedSSLParam) sslParam); + } else { + sslSocketFactory = + SslUtil.getSSLSocketFactoryWithoutCA((SelfSignedSSLParam) sslParam); + } + if (sslSocketFactory == null) { + throw new IOErrorException(IOErrorException.E_UNKNOWN, + "SSL Socket Factory Creation failed"); + } + this.transport = new TSocket( + sslSocketFactory.createSocket(address.getHost(), + address.getPort()), this.timeout, this.timeout); + this.protocol = new TCompactProtocol(transport); + client = new GraphService.Client(protocol); + } catch (TException e) { + throw new IOErrorException(IOErrorException.E_UNKNOWN, e.getMessage()); + } catch (IOException e) { + e.printStackTrace(); + } + } @Override public void open(HostAddress address, int timeout) throws IOErrorException { - this.serverAddr = address; try { + this.enabledSsl = false; + this.serverAddr = address; this.timeout = timeout <= 0 ? Integer.MAX_VALUE : timeout; this.transport = new TSocket( address.getHost(), address.getPort(), this.timeout, this.timeout); @@ -56,7 +101,11 @@ public void open(HostAddress address, int timeout) throws IOErrorException { @Override public void reopen() throws IOErrorException { close(); - open(serverAddr, timeout); + if (enabledSsl) { + open(serverAddr, timeout, sslParam); + } else { + open(serverAddr, timeout); + } } public AuthResult authenticate(String user, String password) @@ -143,6 +192,7 @@ public boolean ping() { execute(0, "YIELD 1;"); return true; } catch (IOErrorException e) { + e.printStackTrace(); return false; } } diff --git a/client/src/main/java/com/vesoft/nebula/util/SslUtil.java b/client/src/main/java/com/vesoft/nebula/util/SslUtil.java new file mode 100644 index 000000000..12b91b774 --- /dev/null +++ b/client/src/main/java/com/vesoft/nebula/util/SslUtil.java @@ -0,0 +1,170 @@ +/* Copyright (c) 2020 vesoft inc. All rights reserved. + * + * This source code is licensed under Apache 2.0 License, + * attached with Common Clause Condition 1.0, found in the LICENSES directory. + */ + +package com.vesoft.nebula.util; + +import com.vesoft.nebula.client.graph.data.CASignedSSLParam; +import com.vesoft.nebula.client.graph.data.SelfSignedSSLParam; +import java.io.FileReader; +import java.security.KeyPair; +import java.security.KeyStore; +import java.security.Security; +import java.security.cert.Certificate; +import java.security.cert.X509Certificate; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSocketFactory; +import javax.net.ssl.TrustManagerFactory; +import org.bouncycastle.cert.X509CertificateHolder; +import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter; +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.bouncycastle.openssl.PEMDecryptorProvider; +import org.bouncycastle.openssl.PEMEncryptedKeyPair; +import org.bouncycastle.openssl.PEMKeyPair; +import org.bouncycastle.openssl.PEMParser; +import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter; +import org.bouncycastle.openssl.jcajce.JcePEMDecryptorProviderBuilder; + +public class SslUtil { + + public static SSLSocketFactory getSSLSocketFactoryWithCA(CASignedSSLParam param) { + final String caCrtFile = param.getCaCrtFilePath(); + final String crtFile = param.getCrtFilePath(); + final String keyFile = param.getKeyFilePath(); + final String password = ""; + try { + //Add BouncyCastle as a Security Provider + Security.addProvider(new BouncyCastleProvider()); + + // Load client private key + PEMParser reader = new PEMParser(new FileReader(keyFile)); + Object keyObject = reader.readObject(); + reader.close(); + + PEMDecryptorProvider provider = + new JcePEMDecryptorProviderBuilder().build(password.toCharArray()); + JcaPEMKeyConverter keyConverter = new JcaPEMKeyConverter().setProvider("BC"); + + KeyPair key; + + if (keyObject instanceof PEMEncryptedKeyPair) { + key = keyConverter.getKeyPair(((PEMEncryptedKeyPair) keyObject) + .decryptKeyPair(provider)); + } else { + key = keyConverter.getKeyPair((PEMKeyPair) keyObject); + } + + // Load Certificate Authority (CA) certificate + reader = new PEMParser(new FileReader(caCrtFile)); + X509CertificateHolder caCertHolder = (X509CertificateHolder) reader.readObject(); + reader.close(); + + // CA certificate is used to authenticate server + JcaX509CertificateConverter certificateConverter = + new JcaX509CertificateConverter().setProvider("BC"); + KeyStore caKeyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + X509Certificate caCert = certificateConverter.getCertificate(caCertHolder); + caKeyStore.load(null, null); + caKeyStore.setCertificateEntry("ca-certificate", caCert); + + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance( + TrustManagerFactory.getDefaultAlgorithm()); + trustManagerFactory.init(caKeyStore); + + // Load client certificate + reader = new PEMParser(new FileReader(crtFile)); + X509CertificateHolder certHolder = (X509CertificateHolder) reader.readObject(); + reader.close(); + + // Client key and certificates are sent to server so it can authenticate the client + KeyStore clientKeyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + X509Certificate cert = certificateConverter.getCertificate(certHolder); + clientKeyStore.load(null, null); + clientKeyStore.setCertificateEntry("certificate", cert); + clientKeyStore.setKeyEntry("private-key", key.getPrivate(), password.toCharArray(), + new Certificate[]{cert}); + + KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance( + KeyManagerFactory.getDefaultAlgorithm()); + keyManagerFactory.init(clientKeyStore, password.toCharArray()); + + // Create SSL socket factory + SSLContext context = SSLContext.getInstance("TLSv1.3"); + context.init(keyManagerFactory.getKeyManagers(), + trustManagerFactory.getTrustManagers(), null); + + // Return the newly created socket factory object + return context.getSocketFactory(); + + } catch (Exception e) { + e.printStackTrace(); + } + + return null; + } + + public static SSLSocketFactory getSSLSocketFactoryWithoutCA(SelfSignedSSLParam param) { + final String crtFile = param.getCrtFilePath(); + final String keyFile = param.getKeyFilePath(); + final String password = param.getPassword(); + try { + // Add BouncyCastle as a Security Provider + Security.addProvider(new BouncyCastleProvider()); + + // Load client private key + PEMParser reader = new PEMParser(new FileReader(keyFile)); + Object keyObject = reader.readObject(); + reader.close(); + + PEMDecryptorProvider provider = + new JcePEMDecryptorProviderBuilder().build(password.toCharArray()); + JcaPEMKeyConverter keyConverter = new JcaPEMKeyConverter().setProvider("BC"); + + KeyPair key; + + if (keyObject instanceof PEMEncryptedKeyPair) { + key = keyConverter.getKeyPair(((PEMEncryptedKeyPair) keyObject) + .decryptKeyPair(provider)); + } else { + key = keyConverter.getKeyPair((PEMKeyPair) keyObject); + } + + // CA certificate is used to authenticate server + JcaX509CertificateConverter certificateConverter = + new JcaX509CertificateConverter().setProvider("BC"); + + // Load client certificate + reader = new PEMParser(new FileReader(crtFile)); + X509CertificateHolder certHolder = (X509CertificateHolder) reader.readObject(); + reader.close(); + + // Client key and certificates are sent to server so it can authenticate the client + KeyStore clientKeyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + X509Certificate cert = certificateConverter.getCertificate(certHolder); + + clientKeyStore.load(null, null); + clientKeyStore.setCertificateEntry("certificate", cert); + clientKeyStore.setKeyEntry("private-key", key.getPrivate(), password.toCharArray(), + new Certificate[]{cert}); + + KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance( + KeyManagerFactory.getDefaultAlgorithm()); + keyManagerFactory.init(clientKeyStore, password.toCharArray()); + + // Create SSL socket factory + SSLContext context = SSLContext.getInstance("TLSv1.3"); + context.init(keyManagerFactory.getKeyManagers(), + null, null); + + // Return the newly created socket factory object + return context.getSocketFactory(); + } catch (Exception e) { + e.printStackTrace(); + } + + return null; + } +} diff --git a/client/src/test/java/com/vesoft/nebula/client/graph/data/TestDataFromServer.java b/client/src/test/java/com/vesoft/nebula/client/graph/data/TestDataFromServer.java index aebb7ef88..8f73d7bd8 100644 --- a/client/src/test/java/com/vesoft/nebula/client/graph/data/TestDataFromServer.java +++ b/client/src/test/java/com/vesoft/nebula/client/graph/data/TestDataFromServer.java @@ -451,4 +451,93 @@ public void testErrorForJson() { assert false; } } + + @Test + public void testSelfSignedSsl() { + Session sslSession = null; + NebulaPool sslPool = new NebulaPool(); + try { + Runtime runtime = Runtime.getRuntime(); + runtime.exec("docker-compose down").waitFor(10, TimeUnit.SECONDS); + + // boot docker with ca signed yml + runtime.exec("docker-compose -f docker-compose-selfsigned.yaml up -d") + .waitFor(15,TimeUnit.SECONDS); + NebulaPoolConfig nebulaSslPoolConfig = new NebulaPoolConfig(); + nebulaSslPoolConfig.setMaxConnSize(100); + nebulaSslPoolConfig.setSslParam(new SelfSignedSSLParam( + "/share/resources/selfsigned.pem", + "/share/resources/selfsigned.key", + "vesoft")); + Assert.assertTrue(sslPool.init(Arrays.asList(new HostAddress("127.0.0.1", 9670)), + nebulaSslPoolConfig)); + sslSession = sslPool.getSession("root", "nebula", true); + + String ngql = "YIELD 1"; + JSONObject resp = JSON.parseObject(sslSession.executeJson(ngql)); + System.out.println(resp); + String rowData = resp.getJSONArray("results").getJSONObject(0).getJSONArray("data") + .getJSONObject(0).getJSONArray("row").toJSONString(); + String exp = "[1]"; + Assert.assertEquals(rowData, exp); + + runtime.exec("docker-compose -f docker-compose-selfsigned.yaml down") + .waitFor(15,TimeUnit.SECONDS); + + runtime.exec("docker-compose up -d") + .waitFor(10,TimeUnit.SECONDS); + } catch (Exception e) { + e.printStackTrace(); + assert false; + } finally { + if (sslSession != null) { + sslSession.release(); + } + sslPool.close(); + } + } + + @Test + public void testCASignedSsl() { + Session sslSession = null; + NebulaPool sslPool = new NebulaPool(); + try { + Runtime runtime = Runtime.getRuntime(); + runtime.exec("docker-compose down").waitFor(10, TimeUnit.SECONDS); + + // boot docker with ca signed yml + runtime.exec("docker-compose -f docker-compose-casigned.yaml up -d") + .waitFor(15,TimeUnit.SECONDS); + NebulaPoolConfig nebulaSslPoolConfig = new NebulaPoolConfig(); + nebulaSslPoolConfig.setMaxConnSize(100); + nebulaSslPoolConfig.setSslParam(new CASignedSSLParam( + "/share/resources/casigned.pem", + "/share/resources/casigned.crt", + "/share/resources/casigned.key")); + Assert.assertTrue(sslPool.init(Arrays.asList(new HostAddress("127.0.0.1", 9670)), + nebulaSslPoolConfig)); + sslSession = sslPool.getSession("root", "nebula", true); + + String ngql = "YIELD 1"; + JSONObject resp = JSON.parseObject(sslSession.executeJson(ngql)); + String rowData = resp.getJSONArray("results").getJSONObject(0).getJSONArray("data") + .getJSONObject(0).getJSONArray("row").toJSONString(); + String exp = "[1]"; + Assert.assertEquals(rowData, exp); + + runtime.exec("docker-compose -f docker-compose-casigned.yaml down") + .waitFor(15,TimeUnit.SECONDS); + + runtime.exec("docker-compose up -d") + .waitFor(10,TimeUnit.SECONDS); + } catch (Exception e) { + e.printStackTrace(); + assert false; + } finally { + if (sslSession != null) { + sslSession.release(); + } + sslPool.close(); + } + } } diff --git a/client/src/test/resources/docker-compose-casigned.yaml b/client/src/test/resources/docker-compose-casigned.yaml new file mode 100644 index 000000000..3351d068c --- /dev/null +++ b/client/src/test/resources/docker-compose-casigned.yaml @@ -0,0 +1,410 @@ +version: '3.4' +services: + metad0: + image: vesoft/nebula-metad:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --local_ip=172.28.1.1 + - --ws_ip=172.28.1.1 + - --port=9559 + - --data_path=/data/meta + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --expired_time_factor=2 + - --ws_h2_port=11000 + - --ca_path=/share/resources/test.ca.pem + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --enable_ssl=true + - --ca_signed=true + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.1.1:11000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9559:9559" + - 11000 + - 11002 + volumes: + - ./data/meta0:/data/meta:Z + - ./logs/meta0:/logs:Z + - ./ssl:/share/resources:Z + networks: + nebula-net: + ipv4_address: 172.28.1.1 + restart: on-failure + cap_add: + - SYS_PTRACE + + metad1: + image: vesoft/nebula-metad:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --local_ip=172.28.1.2 + - --ws_ip=172.28.1.2 + - --port=9559 + - --data_path=/data/meta + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --expired_time_factor=2 + - --ws_h2_port=11000 + - --ca_path=/share/resources/test.ca.pem + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --enable_ssl=true + - --ca_signed=true + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.1.2:11000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9560:9559" + - 11000 + - 11002 + volumes: + - ./data/meta1:/data/meta:Z + - ./logs/meta1:/logs:Z + - ./ssl:/share/resources:Z + networks: + nebula-net: + ipv4_address: 172.28.1.2 + restart: on-failure + cap_add: + - SYS_PTRACE + + metad2: + image: vesoft/nebula-metad:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --local_ip=172.28.1.3 + - --ws_ip=172.28.1.3 + - --port=9559 + - --data_path=/data/meta + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --expired_time_factor=2 + - --ws_h2_port=11000 + - --ca_path=/share/resources/test.ca.pem + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --enable_ssl=true + - --ca_signed=true + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.1.3:11000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9561:9559" + - 11000 + - 11002 + volumes: + - ./data/meta2:/data/meta:Z + - ./logs/meta2:/logs:Z + - ./ssl:/share/resources:Z + networks: + nebula-net: + ipv4_address: 172.28.1.3 + restart: on-failure + cap_add: + - SYS_PTRACE + + storaged0: + image: vesoft/nebula-storaged:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --local_ip=172.28.2.1 + - --ws_ip=172.28.2.1 + - --port=9779 + - --data_path=/data/storage + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --timezone_name=+08:00:00 + - --ws_h2_port=12000 + - --ca_path=/share/resources/test.ca.pem + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --enable_ssl=true + - --ca_signed=true + depends_on: + - metad0 + - metad1 + - metad2 + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.2.1:12000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9779:9779" + - 12000 + - 12002 + volumes: + - ./data/storage0:/data/storage:Z + - ./logs/storage0:/logs:Z + - ./ssl:/share/resources:Z + networks: + nebula-net: + ipv4_address: 172.28.2.1 + restart: on-failure + cap_add: + - SYS_PTRACE + + storaged1: + image: vesoft/nebula-storaged:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --local_ip=172.28.2.2 + - --ws_ip=172.28.2.2 + - --port=9779 + - --data_path=/data/storage + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --timezone_name=+08:00:00 + - --ws_h2_port=12000 + - --ca_path=/share/resources/test.ca.pem + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --enable_ssl=true + - --ca_signed=true + depends_on: + - metad0 + - metad1 + - metad2 + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.2.2:12000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9780:9779" + - 12000 + - 12002 + volumes: + - ./data/storage1:/data/storage:Z + - ./logs/storage1:/logs:Z + - ./ssl:/share/resources:Z + networks: + nebula-net: + ipv4_address: 172.28.2.2 + restart: on-failure + cap_add: + - SYS_PTRACE + + storaged2: + image: vesoft/nebula-storaged:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --local_ip=172.28.2.3 + - --ws_ip=172.28.2.3 + - --port=9779 + - --data_path=/data/storage + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --timezone_name=+08:00:00 + - --ws_h2_port=12000 + - --ca_path=/share/resources/test.ca.pem + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --enable_ssl=true + - --ca_signed=true + depends_on: + - metad0 + - metad1 + - metad2 + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.2.3:12000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9781:9779" + - 12000 + - 12002 + volumes: + - ./data/storage2:/data/storage:Z + - ./logs/storage2:/logs:Z + - ./ssl:/share/resources:Z + networks: + nebula-net: + ipv4_address: 172.28.2.3 + restart: on-failure + cap_add: + - SYS_PTRACE + + graphd0: + image: vesoft/nebula-graphd:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --port=9669 + - --ws_ip=172.28.3.1 + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --timezone_name=+08:00:00 + - --ws_h2_port=13000 + - --ca_path=/share/resources/test.ca.pem + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --enable_ssl=true + - --ca_signed=true + depends_on: + - metad0 + - metad1 + - metad2 + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.3.1:13000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9669:9669" + - 13000 + - 13002 + volumes: + - ./logs/graph0:/logs:Z + - ./ssl:/share/resources:Z + networks: + nebula-net: + ipv4_address: 172.28.3.1 + restart: on-failure + cap_add: + - SYS_PTRACE + + graphd1: + image: vesoft/nebula-graphd:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --port=9669 + - --ws_ip=172.28.3.2 + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --timezone_name=+08:00:00 + - --ws_h2_port=13000 + - --ca_path=/share/resources/test.ca.pem + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --enable_ssl=true + - --ca_signed=true + - ./ssl:/share/resources:Z + depends_on: + - metad0 + - metad1 + - metad2 + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.3.2:13000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9670:9669" + - 13000 + - 13002 + volumes: + - ./logs/graph1:/logs:Z + networks: + nebula-net: + ipv4_address: 172.28.3.2 + restart: on-failure + cap_add: + - SYS_PTRACE + + graphd2: + image: vesoft/nebula-graphd:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --port=9669 + - --ws_ip=172.28.3.3 + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --timezone_name=+08:00:00 + - --ws_h2_port=13000 + - --ca_path=/share/resources/test.ca.pem + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --enable_ssl=true + - --ca_signed=true + depends_on: + - metad0 + - metad1 + - metad2 + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.3.3:13000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9671:9669" + - 13000 + - 13002 + volumes: + - ./logs/graph2:/logs:Z + - ./ssl:/share/resources:Z + networks: + nebula-net: + ipv4_address: 172.28.3.3 + restart: on-failure + cap_add: + - SYS_PTRACE + +networks: + nebula-net: + ipam: + driver: default + config: + - subnet: 172.28.0.0/16 diff --git a/client/src/test/resources/docker-compose-selfsigned.yaml b/client/src/test/resources/docker-compose-selfsigned.yaml new file mode 100644 index 000000000..346336d00 --- /dev/null +++ b/client/src/test/resources/docker-compose-selfsigned.yaml @@ -0,0 +1,410 @@ +version: '3.4' +services: + metad0: + image: vesoft/nebula-metad:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --local_ip=172.28.1.1 + - --ws_ip=172.28.1.1 + - --port=9559 + - --data_path=/data/meta + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --expired_time_factor=2 + - --ws_h2_port=11000 + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --password_path=/share/resources/test.ca.password + - --enable_ssl=true + - --ca_signed=false + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.1.1:11000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9559:9559" + - 11000 + - 11002 + volumes: + - ./data/meta0:/data/meta:Z + - ./logs/meta0:/logs:Z + - ./ssl:/share/resources:Z + networks: + nebula-net: + ipv4_address: 172.28.1.1 + restart: on-failure + cap_add: + - SYS_PTRACE + + metad1: + image: vesoft/nebula-metad:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --local_ip=172.28.1.2 + - --ws_ip=172.28.1.2 + - --port=9559 + - --data_path=/data/meta + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --expired_time_factor=2 + - --ws_h2_port=11000 + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --password_path=/share/resources/test.ca.password + - --enable_ssl=true + - --ca_signed=false + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.1.2:11000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9560:9559" + - 11000 + - 11002 + volumes: + - ./data/meta1:/data/meta:Z + - ./logs/meta1:/logs:Z + - ./ssl:/share/resources:Z + networks: + nebula-net: + ipv4_address: 172.28.1.2 + restart: on-failure + cap_add: + - SYS_PTRACE + + metad2: + image: vesoft/nebula-metad:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --local_ip=172.28.1.3 + - --ws_ip=172.28.1.3 + - --port=9559 + - --data_path=/data/meta + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --expired_time_factor=2 + - --ws_h2_port=11000 + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --password_path=/share/resources/test.ca.password + - --enable_ssl=true + - --ca_signed=false + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.1.3:11000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9561:9559" + - 11000 + - 11002 + volumes: + - ./data/meta2:/data/meta:Z + - ./logs/meta2:/logs:Z + - ./ssl:/share/resources:Z + networks: + nebula-net: + ipv4_address: 172.28.1.3 + restart: on-failure + cap_add: + - SYS_PTRACE + + storaged0: + image: vesoft/nebula-storaged:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --local_ip=172.28.2.1 + - --ws_ip=172.28.2.1 + - --port=9779 + - --data_path=/data/storage + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --timezone_name=+08:00:00 + - --ws_h2_port=12000 + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --password_path=/share/resources/test.ca.password + - --enable_ssl=true + - --ca_signed=false + depends_on: + - metad0 + - metad1 + - metad2 + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.2.1:12000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9779:9779" + - 12000 + - 12002 + volumes: + - ./data/storage0:/data/storage:Z + - ./logs/storage0:/logs:Z + - ./ssl:/share/resources:Z + networks: + nebula-net: + ipv4_address: 172.28.2.1 + restart: on-failure + cap_add: + - SYS_PTRACE + + storaged1: + image: vesoft/nebula-storaged:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --local_ip=172.28.2.2 + - --ws_ip=172.28.2.2 + - --port=9779 + - --data_path=/data/storage + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --timezone_name=+08:00:00 + - --ws_h2_port=12000 + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --password_path=/share/resources/test.ca.password + - --enable_ssl=true + - --ca_signed=false + depends_on: + - metad0 + - metad1 + - metad2 + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.2.2:12000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9780:9779" + - 12000 + - 12002 + volumes: + - ./data/storage1:/data/storage:Z + - ./logs/storage1:/logs:Z + - ./ssl:/share/resources:Z + networks: + nebula-net: + ipv4_address: 172.28.2.2 + restart: on-failure + cap_add: + - SYS_PTRACE + + storaged2: + image: vesoft/nebula-storaged:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --local_ip=172.28.2.3 + - --ws_ip=172.28.2.3 + - --port=9779 + - --data_path=/data/storage + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --timezone_name=+08:00:00 + - --ws_h2_port=12000 + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --password_path=/share/resources/test.ca.password + - --enable_ssl=true + - --ca_signed=false + depends_on: + - metad0 + - metad1 + - metad2 + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.2.3:12000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9781:9779" + - 12000 + - 12002 + volumes: + - ./data/storage2:/data/storage:Z + - ./logs/storage2:/logs:Z + - ./ssl:/share/resources:Z + networks: + nebula-net: + ipv4_address: 172.28.2.3 + restart: on-failure + cap_add: + - SYS_PTRACE + + graphd0: + image: vesoft/nebula-graphd:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --port=9669 + - --ws_ip=172.28.3.1 + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --timezone_name=+08:00:00 + - --ws_h2_port=13000 + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --password_path=/share/resources/test.ca.password + - --enable_ssl=true + - --ca_signed=false + depends_on: + - metad0 + - metad1 + - metad2 + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.3.1:13000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9669:9669" + - 13000 + - 13002 + volumes: + - ./logs/graph0:/logs:Z + - ./ssl:/share/resources:Z + networks: + nebula-net: + ipv4_address: 172.28.3.1 + restart: on-failure + cap_add: + - SYS_PTRACE + + graphd1: + image: vesoft/nebula-graphd:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --port=9669 + - --ws_ip=172.28.3.2 + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --timezone_name=+08:00:00 + - --ws_h2_port=13000 + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --password_path=/share/resources/test.ca.password + - --enable_ssl=true + - --ca_signed=false + depends_on: + - metad0 + - metad1 + - metad2 + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.3.2:13000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9670:9669" + - 13000 + - 13002 + volumes: + - ./logs/graph1:/logs:Z + - ./ssl:/share/resources:Z + networks: + nebula-net: + ipv4_address: 172.28.3.2 + restart: on-failure + cap_add: + - SYS_PTRACE + + graphd2: + image: vesoft/nebula-graphd:nightly + environment: + USER: root + TZ: "${TZ}" + command: + - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 + - --port=9669 + - --ws_ip=172.28.3.3 + - --log_dir=/logs + - --v=0 + - --minloglevel=0 + - --heartbeat_interval_secs=2 + - --timezone_name=+08:00:00 + - --ws_h2_port=13000 + - --cert_path=/share/resources/test.derive.crt + - --key_path=/share/resources/test.derive.key + - --password_path=/share/resources/test.ca.password + - --enable_ssl=true + - --ca_signed=false + depends_on: + - metad0 + - metad1 + - metad2 + healthcheck: + test: ["CMD", "curl", "-f", "http://172.28.3.3:13000/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 20s + ports: + - "9671:9669" + - 13000 + - 13002 + volumes: + - ./logs/graph2:/logs:Z + - ./ssl:/share/resources:Z + networks: + nebula-net: + ipv4_address: 172.28.3.3 + restart: on-failure + cap_add: + - SYS_PTRACE + +networks: + nebula-net: + ipam: + driver: default + config: + - subnet: 172.28.0.0/16 diff --git a/client/src/test/resources/ssl/casigned.crt b/client/src/test/resources/ssl/casigned.crt new file mode 100644 index 000000000..fe1add667 --- /dev/null +++ b/client/src/test/resources/ssl/casigned.crt @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE----- +MIICljCCAX4CCQC9uuUY+ah8qzANBgkqhkiG9w0BAQsFADANMQswCQYDVQQGEwJD +TjAeFw0yMTA5MjkwNzM4MDRaFw0yNDAxMDIwNzM4MDRaMA0xCzAJBgNVBAYTAkNO +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuo7hKpcs+VQKbGRq0fUL ++GcSfPfJ8mARtIeI8WfU0j1vI5KNujI//G2olOGEueDCw4OO0UbdjnsFpgj2awAo +rj4ga2W6adQHK8qHY6q/Rdqv0oDCrcePMtQ8IwbFjNWOXC4bn7GcV7mzOkigdcj8 +UPkSeaqI9XxBRm3OoDX+T8h6cDLrm+ncKB8KKe/QApKH4frV3HYDqGtN49zuRs6F +iurFbXDGVAZEdFEJl38IQJdmE2ASOzEHZbxWKzO/DZr/Z2+L1CuycZIwuITcnddx +b2Byx/opwX4HlyODeUBbyDp+hd+GkasmIcpOlIDw9OXIvrcajKvzLEbqGt2ThsxX +QwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQAxzxtbYBQ2WgBGrpzOX4TxsuSaigqo +YJ5zbVEHtwbsbBTZ7UJvRc9IyhrOL5Ui4PJI85chh1GpGqOmMoYSaWdddaIroilQ +56bn5haB8ezAMnLXbPuf97UENO0RIkyzt63XPIUkDnwlzOukIq50qgsYEDuiioM/ +wpCqSbMJ4iK/SlSSUWw3cKuAHvFfLv7hkC6AhvT7yfaCNDs29xEQUCD12XlIdFGH +FjMgVMcvcIePQq5ZcmSfVMge9jPjPx/Nj9SVauF5z5pil9qHG4jyXPGThiiJ3CE4 +GU5d/Qfe7OeiYI3LaoVufZ5pZnR9nMnpzqU46w9gY7vgi6bAhNwsCDr3 +-----END CERTIFICATE----- diff --git a/client/src/test/resources/ssl/casigned.key b/client/src/test/resources/ssl/casigned.key new file mode 100644 index 000000000..3561e7ab8 --- /dev/null +++ b/client/src/test/resources/ssl/casigned.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEAuo7hKpcs+VQKbGRq0fUL+GcSfPfJ8mARtIeI8WfU0j1vI5KN +ujI//G2olOGEueDCw4OO0UbdjnsFpgj2awAorj4ga2W6adQHK8qHY6q/Rdqv0oDC +rcePMtQ8IwbFjNWOXC4bn7GcV7mzOkigdcj8UPkSeaqI9XxBRm3OoDX+T8h6cDLr +m+ncKB8KKe/QApKH4frV3HYDqGtN49zuRs6FiurFbXDGVAZEdFEJl38IQJdmE2AS +OzEHZbxWKzO/DZr/Z2+L1CuycZIwuITcnddxb2Byx/opwX4HlyODeUBbyDp+hd+G +kasmIcpOlIDw9OXIvrcajKvzLEbqGt2ThsxXQwIDAQABAoIBAH4SEBe4EaxsHp8h +PQ6linFTNis9SDuCsHRPIzv/7tIksfZYE27Ahn0Pndz+ibMTMIrvXJQQT6j5ede6 +NswYT2Vwlnf9Rvw9TJtLQjMYMCoEnsyiNu047oxq4DjLWrTRnGKuxfwlCoI9++Bn +NAhkyh3uM44EsIk0bugpTHj4A+PlbUPe7xdEI/6XpaZrRN9oiejJ4VxZAPgFGiTm +uNF5qg16+0900Pfj5Y/M4vXmn+gq39PO/y0FlTpaoEuYZiZZS3xHGmSVhlt8LIgI +8MdMRaKTfNeNITaqgOWh9pAW4xmK48/KfLgNPQgtDHjMJpgM0BbcBOayOY8Eio0x +Z66G2AECgYEA9vj/8Fm3CKn/ogNOO81y9kIs0iPcbjasMnQ3UXeOdD0z0+7TM86F +Xj3GK/z2ecvY7skWtO5ZUbbxp4aB7omW8Ke9+q8XPzMEmUuAOTzxQkAOxdr++HXP +TILy0hNX2cmiLQT1U60KoZHzPZ5o5hNIQPMt7hN12ERWcIfR/MUZa5UCgYEAwWCP +6Y7Zso1QxQR/qfjuILET3/xU+ZmqSRDvzJPEiGI3oeWNG4L6cKR+XTe0FWZBAmVk +Qq/1qXmdBnf5S7azffoJe2+H/m3kHJSprIiAAWlBN2e+kFlNfBhtkgia5NvsrjRw +al6mf/+weRD1FiPoZY3e1wBKoqro7aI8fE5gwXcCgYEAnEI05OROeyvb8qy2vf2i +JA8AfsBzwkPTNWT0bxX+yqrCdO/hLyEWnubk0IYPiEYibgpK1JUNbDcctErVQJBL +MN5gxBAt3C2yVi8/5HcbijgvYJ3LvnYDf7xGWAYnCkOZ2XQOqC+Oz2UhijYE1rUS +fQ2fXMdxQzERo8c7Y/tstvUCgYBuixy5jwezokUB20h/ieXWmmOaL00EQmutyRjM +AczfigXzbp3zlDRGIEJ8V1OCyClxjTR7SstMTlENWZgRSCfjZAP3pBJBx+AW1oUI +NB+4rsqxOYUeT26T+gLo8DJbkb0C+Mcqh2D22tuu2ZrBRVWceDVjAq+nvbvZ3Fxn +UwbMkQKBgQCxL3aA6ART6laIxT/ZqMhV0ZcaoDJogjF+4I4bhlO4ivWGWJ4RpEDn +ziFb6+M/4pe4vCou9yuAof6WTKM8JG4rok0yxhN3V6QGP49TjtrfkkrEPCtB2LSI +N1+YRSTrS5VDcl8h8JH7fpghRnXHONEyIqasYVqsbxKzNyLV/z2rkw== +-----END RSA PRIVATE KEY----- diff --git a/client/src/test/resources/ssl/casigned.pem b/client/src/test/resources/ssl/casigned.pem new file mode 100644 index 000000000..412ba3161 --- /dev/null +++ b/client/src/test/resources/ssl/casigned.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIIEGzCCAwOgAwIBAgIUDcmZFpL4PcdCXfLRBK8bR2vb39cwDQYJKoZIhvcNAQEL +BQAwgZwxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhaaGVqaWFuZzERMA8GA1UEBwwI +SGFuZ3pob3UxFDASBgNVBAoMC1Zlc29mdCBJbmMuMRAwDgYDVQQLDAdzZWN0aW9u +MRYwFAYDVQQDDA1zaHlsb2NrIGh1YW5nMScwJQYJKoZIhvcNAQkBFhhzaHlsb2Nr +Lmh1YW5nQHZlc29mdC5jb20wHhcNMjEwODE5MDkyNDQ3WhcNMjUwODE4MDkyNDQ3 +WjCBnDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFpoZWppYW5nMREwDwYDVQQHDAhI +YW5nemhvdTEUMBIGA1UECgwLVmVzb2Z0IEluYy4xEDAOBgNVBAsMB3NlY3Rpb24x +FjAUBgNVBAMMDXNoeWxvY2sgaHVhbmcxJzAlBgkqhkiG9w0BCQEWGHNoeWxvY2su +aHVhbmdAdmVzb2Z0LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +AMEAgpamCQHl+8JnUHI6/VmJHjDLYJLTliN/CwpFrhMqIVjJ8wG57WYLpXpn91Lz +eHu52LkVzcikybIJ2a+LOTvnhNFdbmTbqDtrb+s6wM/sO+nF6tU2Av4e5zhyKoeR +LL+rHMk3nymohbdN4djySFmOOU5A1O/4b0bZz4Ylu995kUawdiaEo13BzxxOC7Ik +Gge5RyDcm0uLXZqTAPy5Sjv/zpOyj0AqL1CJUH7XBN9OMRhVU0ZX9nHWl1vgLRld +J6XT17Y9QbbHhCNEdAmFE5kEFgCvZc+MungUYABlkvoj86TLmC/FMV6fWdxQssyd +hS+ssfJFLaTDaEFz5a/Tr48CAwEAAaNTMFEwHQYDVR0OBBYEFK0GVrQx+wX1GCHy +e+6fl4X+prmYMB8GA1UdIwQYMBaAFK0GVrQx+wX1GCHye+6fl4X+prmYMA8GA1Ud +EwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHqP8P+ZUHmngviHLSSN1ln5 +Mx4BCkVeFRUaFx0yFXytV/iLXcG2HpFg3A9rAFoYgCDwi1xpsERnBZ/ShTv/eFOc +IxBY5yggx3/lGi8tAgvUdarhd7mQO67UJ0V4YU3hAkbnZ8grHHXj+4hfgUpY4ok6 +yaed6HXwknBb9W8N1jZI8ginhkhjaeRCHdMiF+fBvNCtmeR1bCml1Uz7ailrpcaT +Mf84+5VYuFEnaRZYWFNsWNCOBlJ/6/b3V10vMXzMmYHqz3xgAq0M3fVTFTzopnAX +DLSzorL/dYVdqEDCQi5XI9YAlgWN4VeGzJI+glkLOCNzHxRNP6Qev+YI+7Uxz6I= +-----END CERTIFICATE----- diff --git a/client/src/test/resources/ssl/selfsigned.key b/client/src/test/resources/ssl/selfsigned.key new file mode 100644 index 000000000..533ac941e --- /dev/null +++ b/client/src/test/resources/ssl/selfsigned.key @@ -0,0 +1,30 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,6D12ED8559E80FA3 + +tv9epnwlt4dP6Q5ee0dACOyFA5BTwYTdoMykQRJrKGwfaNeXUXn+sQ/U/oFHp1Wx +O8VZE+z2aHpiFSTw+Eh6MPt86X5yVG3tpeVO6dErvr8Kd+NpuI8zn7rNoOFRh8wD +33EFcQMLQPneDl10O18hooIoi0qwp1pd63hYZPwEhB3eOrM5Mnv9OVJs65bzYfyf +Wku33YWYxeqlDvMCsou8PZnv/M2wYsr7+QoTcNmGKP45igMthMDBzwgF+q0p9ZZU +N11c6ojAs01kfuqFf3vKfHNYe6zsBiNhnUuEy8enXSxD5E7tR/OI8aEzPLdk7fmN +/UsMK2LE0Yd5iS3O1x/1ZjSBxJ+M/UzzCO692GTAiD6Hc13iJOavq/vt1mEPjfCD +neF38Bhb5DfFi+UAHrz6EHMreamGCzP82us2maIs7mSTq7nXDZfbBc7mBDLAUUnT +J6tlrTyc+DQXzkJa6jmbxJhcsWm6XvjIBEzSXVHxEDPLnZICQk3VXODjCXTD75Rg +0WaS78Ven7DW8wn07q3VzWAFDKaet3VI+TVTv7EfIavlfiA6LSshaENdFLeHahNE +s/V/j5K3Pg6+WQcZRgOsfqIwUCSQxY13R6TTdaaCkLay5BggF5iiAO3pkqsJiadf +w843Ak4USBptymJxoZgJyFtQHpQyNiFfsAbs9BaYbg2evvE7/VQhLk0gQ7HgQMeJ +wgxEQqZQKDCCSugSzY1YEGXKnrZYCKyipzyyH936mE15zNwhYp/Pi2020+gmtP3h +CDfcPs1yeLI2/1JuimafbuKsv9xchWa6ASU8p8Q7wTLtUj9ylLKyA4A/75pK0DXG +Hv/q0O+UfhAMD438SoPBle7RSvIsDU1VjUqstlNybBglBZxGIME7/18+Ms7U32wh +4xFkZwxT2nqFgyk37tXMdMz9UBh12/AXR9NU4XY37C3Ao2TDT7/0DvU6KdJhsDpv +rGcaC2zzhko+0CPrLlk52KbqP003JXiWvOSI+FylyPPDB/YGitmndJUuQblf3u/E +l+tGi9MeSBQeWKV6D3AVnO05AZjfTUzSK0vw4DgNh5YPNJvLy31B7kDAS88vyGI1 +t6MBwjW4/tz/nS/p1Go3mSzBhPkIsCrZE+ar7lH8p8JqkLl4fXIMaVKIfyfJdzyS +lkh3K7bOGDPegxxxaWdb+EnC7k+1R3EOU7uJFW61HyrGI3q6Y7kOl5aYSJ5Ge1Uv +PycFWHWVTHq/R7HRE6HIJzGe/PnLIbStXLDFeivjfcYq1YaSaF8Vl+xg+0u3ULOl +P6IuPTph6dlcgttRZVl3ETcF0T+2wfbUwgjf0ZiguCJfR2jLGhPl1KBg0Kd9cTSY +zI3YMMd2G8hApt/QFlm4Ry8CqaJUmDcjDNIJT3M+RldUgfz37NsX05cA5e9+I1AL +2406F/v5U9gWsYx7HuwJtQrDzYYDbl1GD4H+qHFJE5JYhPP4AyWYxJ1NR5dqyvrt ++3r5+xlwZrS76c10RsBWL7th8ZEzRxOZxbtLwbf4bG/tIGfQP2sTnWwA+qym6b2S +sRduqOTP+xwnhOq/ZKn8lfsDfhT8CPnKHBsd09kM9y/UWuxFe0upLydRLE/Wsb9s +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/client/src/test/resources/ssl/selfsigned.password b/client/src/test/resources/ssl/selfsigned.password new file mode 100644 index 000000000..60b7570cd --- /dev/null +++ b/client/src/test/resources/ssl/selfsigned.password @@ -0,0 +1 @@ +vesoft \ No newline at end of file diff --git a/client/src/test/resources/ssl/selfsigned.pem b/client/src/test/resources/ssl/selfsigned.pem new file mode 100644 index 000000000..0815f63d6 --- /dev/null +++ b/client/src/test/resources/ssl/selfsigned.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIIEGzCCAwOgAwIBAgIUDcmZFpL4PcdCXfLRBK8bR2vb39cwDQYJKoZIhvcNAQEL +BQAwgZwxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhaaGVqaWFuZzERMA8GA1UEBwwI +SGFuZ3pob3UxFDASBgNVBAoMC1Zlc29mdCBJbmMuMRAwDgYDVQQLDAdzZWN0aW9u +MRYwFAYDVQQDDA1zaHlsb2NrIGh1YW5nMScwJQYJKoZIhvcNAQkBFhhzaHlsb2Nr +Lmh1YW5nQHZlc29mdC5jb20wHhcNMjEwODE5MDkyNDQ3WhcNMjUwODE4MDkyNDQ3 +WjCBnDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFpoZWppYW5nMREwDwYDVQQHDAhI +YW5nemhvdTEUMBIGA1UECgwLVmVzb2Z0IEluYy4xEDAOBgNVBAsMB3NlY3Rpb24x +FjAUBgNVBAMMDXNoeWxvY2sgaHVhbmcxJzAlBgkqhkiG9w0BCQEWGHNoeWxvY2su +aHVhbmdAdmVzb2Z0LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +AMEAgpamCQHl+8JnUHI6/VmJHjDLYJLTliN/CwpFrhMqIVjJ8wG57WYLpXpn91Lz +eHu52LkVzcikybIJ2a+LOTvnhNFdbmTbqDtrb+s6wM/sO+nF6tU2Av4e5zhyKoeR +LL+rHMk3nymohbdN4djySFmOOU5A1O/4b0bZz4Ylu995kUawdiaEo13BzxxOC7Ik +Gge5RyDcm0uLXZqTAPy5Sjv/zpOyj0AqL1CJUH7XBN9OMRhVU0ZX9nHWl1vgLRld +J6XT17Y9QbbHhCNEdAmFE5kEFgCvZc+MungUYABlkvoj86TLmC/FMV6fWdxQssyd +hS+ssfJFLaTDaEFz5a/Tr48CAwEAAaNTMFEwHQYDVR0OBBYEFK0GVrQx+wX1GCHy +e+6fl4X+prmYMB8GA1UdIwQYMBaAFK0GVrQx+wX1GCHye+6fl4X+prmYMA8GA1Ud +EwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHqP8P+ZUHmngviHLSSN1ln5 +Mx4BCkVeFRUaFx0yFXytV/iLXcG2HpFg3A9rAFoYgCDwi1xpsERnBZ/ShTv/eFOc +IxBY5yggx3/lGi8tAgvUdarhd7mQO67UJ0V4YU3hAkbnZ8grHHXj+4hfgUpY4ok6 +yaed6HXwknBb9W8N1jZI8ginhkhjaeRCHdMiF+fBvNCtmeR1bCml1Uz7ailrpcaT +Mf84+5VYuFEnaRZYWFNsWNCOBlJ/6/b3V10vMXzMmYHqz3xgAq0M3fVTFTzopnAX +DLSzorL/dYVdqEDCQi5XI9YAlgWN4VeGzJI+glkLOCNzHxRNP6Qev+YI+7Uxz6I= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/client/src/test/resources/ssl/test.ca.key b/client/src/test/resources/ssl/test.ca.key new file mode 100644 index 000000000..6006d0f27 --- /dev/null +++ b/client/src/test/resources/ssl/test.ca.key @@ -0,0 +1,30 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,6D12ED8559E80FA3 + +tv9epnwlt4dP6Q5ee0dACOyFA5BTwYTdoMykQRJrKGwfaNeXUXn+sQ/U/oFHp1Wx +O8VZE+z2aHpiFSTw+Eh6MPt86X5yVG3tpeVO6dErvr8Kd+NpuI8zn7rNoOFRh8wD +33EFcQMLQPneDl10O18hooIoi0qwp1pd63hYZPwEhB3eOrM5Mnv9OVJs65bzYfyf +Wku33YWYxeqlDvMCsou8PZnv/M2wYsr7+QoTcNmGKP45igMthMDBzwgF+q0p9ZZU +N11c6ojAs01kfuqFf3vKfHNYe6zsBiNhnUuEy8enXSxD5E7tR/OI8aEzPLdk7fmN +/UsMK2LE0Yd5iS3O1x/1ZjSBxJ+M/UzzCO692GTAiD6Hc13iJOavq/vt1mEPjfCD +neF38Bhb5DfFi+UAHrz6EHMreamGCzP82us2maIs7mSTq7nXDZfbBc7mBDLAUUnT +J6tlrTyc+DQXzkJa6jmbxJhcsWm6XvjIBEzSXVHxEDPLnZICQk3VXODjCXTD75Rg +0WaS78Ven7DW8wn07q3VzWAFDKaet3VI+TVTv7EfIavlfiA6LSshaENdFLeHahNE +s/V/j5K3Pg6+WQcZRgOsfqIwUCSQxY13R6TTdaaCkLay5BggF5iiAO3pkqsJiadf +w843Ak4USBptymJxoZgJyFtQHpQyNiFfsAbs9BaYbg2evvE7/VQhLk0gQ7HgQMeJ +wgxEQqZQKDCCSugSzY1YEGXKnrZYCKyipzyyH936mE15zNwhYp/Pi2020+gmtP3h +CDfcPs1yeLI2/1JuimafbuKsv9xchWa6ASU8p8Q7wTLtUj9ylLKyA4A/75pK0DXG +Hv/q0O+UfhAMD438SoPBle7RSvIsDU1VjUqstlNybBglBZxGIME7/18+Ms7U32wh +4xFkZwxT2nqFgyk37tXMdMz9UBh12/AXR9NU4XY37C3Ao2TDT7/0DvU6KdJhsDpv +rGcaC2zzhko+0CPrLlk52KbqP003JXiWvOSI+FylyPPDB/YGitmndJUuQblf3u/E +l+tGi9MeSBQeWKV6D3AVnO05AZjfTUzSK0vw4DgNh5YPNJvLy31B7kDAS88vyGI1 +t6MBwjW4/tz/nS/p1Go3mSzBhPkIsCrZE+ar7lH8p8JqkLl4fXIMaVKIfyfJdzyS +lkh3K7bOGDPegxxxaWdb+EnC7k+1R3EOU7uJFW61HyrGI3q6Y7kOl5aYSJ5Ge1Uv +PycFWHWVTHq/R7HRE6HIJzGe/PnLIbStXLDFeivjfcYq1YaSaF8Vl+xg+0u3ULOl +P6IuPTph6dlcgttRZVl3ETcF0T+2wfbUwgjf0ZiguCJfR2jLGhPl1KBg0Kd9cTSY +zI3YMMd2G8hApt/QFlm4Ry8CqaJUmDcjDNIJT3M+RldUgfz37NsX05cA5e9+I1AL +2406F/v5U9gWsYx7HuwJtQrDzYYDbl1GD4H+qHFJE5JYhPP4AyWYxJ1NR5dqyvrt ++3r5+xlwZrS76c10RsBWL7th8ZEzRxOZxbtLwbf4bG/tIGfQP2sTnWwA+qym6b2S +sRduqOTP+xwnhOq/ZKn8lfsDfhT8CPnKHBsd09kM9y/UWuxFe0upLydRLE/Wsb9s +-----END RSA PRIVATE KEY----- diff --git a/client/src/test/resources/ssl/test.ca.password b/client/src/test/resources/ssl/test.ca.password new file mode 100644 index 000000000..60b7570cd --- /dev/null +++ b/client/src/test/resources/ssl/test.ca.password @@ -0,0 +1 @@ +vesoft \ No newline at end of file diff --git a/client/src/test/resources/ssl/test.ca.pem b/client/src/test/resources/ssl/test.ca.pem new file mode 100644 index 000000000..412ba3161 --- /dev/null +++ b/client/src/test/resources/ssl/test.ca.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIIEGzCCAwOgAwIBAgIUDcmZFpL4PcdCXfLRBK8bR2vb39cwDQYJKoZIhvcNAQEL +BQAwgZwxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhaaGVqaWFuZzERMA8GA1UEBwwI +SGFuZ3pob3UxFDASBgNVBAoMC1Zlc29mdCBJbmMuMRAwDgYDVQQLDAdzZWN0aW9u +MRYwFAYDVQQDDA1zaHlsb2NrIGh1YW5nMScwJQYJKoZIhvcNAQkBFhhzaHlsb2Nr +Lmh1YW5nQHZlc29mdC5jb20wHhcNMjEwODE5MDkyNDQ3WhcNMjUwODE4MDkyNDQ3 +WjCBnDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFpoZWppYW5nMREwDwYDVQQHDAhI +YW5nemhvdTEUMBIGA1UECgwLVmVzb2Z0IEluYy4xEDAOBgNVBAsMB3NlY3Rpb24x +FjAUBgNVBAMMDXNoeWxvY2sgaHVhbmcxJzAlBgkqhkiG9w0BCQEWGHNoeWxvY2su +aHVhbmdAdmVzb2Z0LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +AMEAgpamCQHl+8JnUHI6/VmJHjDLYJLTliN/CwpFrhMqIVjJ8wG57WYLpXpn91Lz +eHu52LkVzcikybIJ2a+LOTvnhNFdbmTbqDtrb+s6wM/sO+nF6tU2Av4e5zhyKoeR +LL+rHMk3nymohbdN4djySFmOOU5A1O/4b0bZz4Ylu995kUawdiaEo13BzxxOC7Ik +Gge5RyDcm0uLXZqTAPy5Sjv/zpOyj0AqL1CJUH7XBN9OMRhVU0ZX9nHWl1vgLRld +J6XT17Y9QbbHhCNEdAmFE5kEFgCvZc+MungUYABlkvoj86TLmC/FMV6fWdxQssyd +hS+ssfJFLaTDaEFz5a/Tr48CAwEAAaNTMFEwHQYDVR0OBBYEFK0GVrQx+wX1GCHy +e+6fl4X+prmYMB8GA1UdIwQYMBaAFK0GVrQx+wX1GCHye+6fl4X+prmYMA8GA1Ud +EwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHqP8P+ZUHmngviHLSSN1ln5 +Mx4BCkVeFRUaFx0yFXytV/iLXcG2HpFg3A9rAFoYgCDwi1xpsERnBZ/ShTv/eFOc +IxBY5yggx3/lGi8tAgvUdarhd7mQO67UJ0V4YU3hAkbnZ8grHHXj+4hfgUpY4ok6 +yaed6HXwknBb9W8N1jZI8ginhkhjaeRCHdMiF+fBvNCtmeR1bCml1Uz7ailrpcaT +Mf84+5VYuFEnaRZYWFNsWNCOBlJ/6/b3V10vMXzMmYHqz3xgAq0M3fVTFTzopnAX +DLSzorL/dYVdqEDCQi5XI9YAlgWN4VeGzJI+glkLOCNzHxRNP6Qev+YI+7Uxz6I= +-----END CERTIFICATE----- diff --git a/client/src/test/resources/ssl/test.ca.srl b/client/src/test/resources/ssl/test.ca.srl new file mode 100644 index 000000000..877d296b7 --- /dev/null +++ b/client/src/test/resources/ssl/test.ca.srl @@ -0,0 +1 @@ +4AF2EBB941EA7EE8358ECC7E51C2F1A38EE18873 diff --git a/client/src/test/resources/ssl/test.derive.crt b/client/src/test/resources/ssl/test.derive.crt new file mode 100644 index 000000000..8f03073e2 --- /dev/null +++ b/client/src/test/resources/ssl/test.derive.crt @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIIDvjCCAqYCFEry67lB6n7oNY7MflHC8aOO4YhzMA0GCSqGSIb3DQEBCwUAMIGc +MQswCQYDVQQGEwJDTjERMA8GA1UECAwIWmhlamlhbmcxETAPBgNVBAcMCEhhbmd6 +aG91MRQwEgYDVQQKDAtWZXNvZnQgSW5jLjEQMA4GA1UECwwHc2VjdGlvbjEWMBQG +A1UEAwwNc2h5bG9jayBodWFuZzEnMCUGCSqGSIb3DQEJARYYc2h5bG9jay5odWFu +Z0B2ZXNvZnQuY29tMB4XDTIxMDgyNDEwNTExMloXDTIzMTEyNzEwNTExMlowgZkx +CzAJBgNVBAYTAkNOMREwDwYDVQQIDAhaaGVqaWFuZzERMA8GA1UEBwwISGFuZ3po +b3UxFDASBgNVBAoMC1Zlc29mdCBJbmMuMRAwDgYDVQQLDAdzZWN0aW9uMRMwEQYD +VQQDDApTaHlsb2NrIEhnMScwJQYJKoZIhvcNAQkBFhhzaHlsb2NrLmh1YW5nQHZl +c29mdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDHk1PQtaCG +S31nvxKuT6pzVQuOsA2hEIDzBZuoBK3blezBB16fjUWG2wHG/r9Oss5YzOly4viL +1oFLsNdYg27EFH7pcGfdSUmZa6LHILegJTmLa1aB4lRG9EsvPIxNuo637CW2z6EW +ElVKXn2N1G1vW3fpKGxJ+d1ovaFfBliO0sK+myW+vYdKrNg70WqKKCoCIlIjEWw3 +vQdrmvhuhIBbG1bXkXbJwIepBdb4wGSx8qsgs93I6/je/K/iJaPJIqdH8loo6fSo +DBUiNA87ZsQdtbBeuk7QuF71SxD5+E8wCMtFMwRGmL0vYMPwkaurKxwEs49e8eTz +RvIrNtyYgVo7AgMBAAEwDQYJKoZIhvcNAQELBQADggEBAGBpm5OLXn02kWr1ENU5 +FOOVryD41SCmPy8hLwQ2MCXd446UfTXc5TTlllksaePn373ZANLUe78vUCoVPjOh +dU5GxyOKtubXovI+yuvMS11u00KtgiAd5qa+IhX3c/P60bh4+fdKZ9ViyLsG+IpQ ++XDYT2uekLyjXXJU6h1raW7M1VY9FcDC63moXz0WgWJ/9tJgB0ZQkVcL+2UpveoZ +Whf9P0xAzCmNSrR7CMhdeRN2vBQQaHXk/64wkHncdkz/NglVl00rh4MtBKZ6Cqze +uZvgrxOJNzB4aXBMHO7sWzw1VSfS79CZm4H39hBWGiVEkr3yZYQbboDRY6F5dQyc +BZc= +-----END CERTIFICATE----- diff --git a/client/src/test/resources/ssl/test.derive.csr b/client/src/test/resources/ssl/test.derive.csr new file mode 100644 index 000000000..89b26237e --- /dev/null +++ b/client/src/test/resources/ssl/test.derive.csr @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIDEjCCAfoCAQAwgZkxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhaaGVqaWFuZzER +MA8GA1UEBwwISGFuZ3pob3UxFDASBgNVBAoMC1Zlc29mdCBJbmMuMRAwDgYDVQQL +DAdzZWN0aW9uMRMwEQYDVQQDDApTaHlsb2NrIEhnMScwJQYJKoZIhvcNAQkBFhhz +aHlsb2NrLmh1YW5nQHZlc29mdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQDHk1PQtaCGS31nvxKuT6pzVQuOsA2hEIDzBZuoBK3blezBB16fjUWG +2wHG/r9Oss5YzOly4viL1oFLsNdYg27EFH7pcGfdSUmZa6LHILegJTmLa1aB4lRG +9EsvPIxNuo637CW2z6EWElVKXn2N1G1vW3fpKGxJ+d1ovaFfBliO0sK+myW+vYdK +rNg70WqKKCoCIlIjEWw3vQdrmvhuhIBbG1bXkXbJwIepBdb4wGSx8qsgs93I6/je +/K/iJaPJIqdH8loo6fSoDBUiNA87ZsQdtbBeuk7QuF71SxD5+E8wCMtFMwRGmL0v +YMPwkaurKxwEs49e8eTzRvIrNtyYgVo7AgMBAAGgMzAVBgkqhkiG9w0BCQcxCAwG +dmVzb2Z0MBoGCSqGSIb3DQEJAjENDAtWZXNvZnQgSW5jLjANBgkqhkiG9w0BAQsF +AAOCAQEAjmyCyxziJMR8NILRAwmfYcBB90CbTFMMEyWy402KxoXcyVZBGO2eukIq +gaF2ywuh6yuTPtGsdVMVTWDQ4RLYpoQoR5Blu+M8Or8rhZSfMYXi79Ne3abSF28E +eWjBmh2Ys0GtaThlufJBWE+vWPH2iEGrSRTg1fvBLBzAW6nXU2svoTrKfDcEoY5z +xB0CKhBoewoIZ2FPBmBAnIWHfXR/vQ76QIoNdfQ4nT8iXuLRoNjRlvVU4AUDwKtu +keRDrnmJ7A5eqTlleCMzra2MAp9Na9gojXlGQP9q9V8nFtSvbjYAoH0ezWpdWj4+ +Rtu9EK4JkDymmmZcneFapExZrRLt0A== +-----END CERTIFICATE REQUEST----- diff --git a/client/src/test/resources/ssl/test.derive.key b/client/src/test/resources/ssl/test.derive.key new file mode 100644 index 000000000..a011917b3 --- /dev/null +++ b/client/src/test/resources/ssl/test.derive.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAx5NT0LWghkt9Z78Srk+qc1ULjrANoRCA8wWbqASt25XswQde +n41FhtsBxv6/TrLOWMzpcuL4i9aBS7DXWINuxBR+6XBn3UlJmWuixyC3oCU5i2tW +geJURvRLLzyMTbqOt+wlts+hFhJVSl59jdRtb1t36ShsSfndaL2hXwZYjtLCvpsl +vr2HSqzYO9FqiigqAiJSIxFsN70Ha5r4boSAWxtW15F2ycCHqQXW+MBksfKrILPd +yOv43vyv4iWjySKnR/JaKOn0qAwVIjQPO2bEHbWwXrpO0Lhe9UsQ+fhPMAjLRTME +Rpi9L2DD8JGrqyscBLOPXvHk80byKzbcmIFaOwIDAQABAoIBAEZ50URHjzs9VziW +sdsaSN/XbXBi3T0+Xbr0BQatOFPtuqBjoNeJBL9dgWArP5Vj8RhMrDekzQ5cnmYD +OdiI+UmGz1ZSGmt7YOErsFzPQejsnEiOjArryMURqacxo34jXhi27I6E/aaUrMfJ +XF8EX+zOCSct3ie1c6l0JZMv43/zbzP2vMFEdfnVfZA2Kxo5l3I4rjuxHUEWHzrb +EgM4a2+y7LQrut75zP9zWEZAqim/VEIEj24Gqj+Vocb6cHlc31KzKaEz7Ra5ha2J +kN2CQRKCzoMupVL5E6dWMiDVjUyUXdUgjSCIW2H+E1ONgvxA78jJx7+Dzj+/bWxH +h/vr3dkCgYEA9Aev7PGoGF0eapZY3crehvtCn1v4YLheh0dk4EpbpbEx0rQaG3h7 +YYCf7euxMvoTsKPETHAUG/s/RZV1DNOjxs8GKgEIVaRYEf1VZeDXudtnyKBwCMAL +5CKHRBvfmNG9n+PpQQlrIAZGej7HU+/IzEVsrD2A5DeH9IVpMNvrX10CgYEA0V1r +aydbBP+Ma/fiG5UDa8l4GdLzvAoW2cY6ZhQX4NiLTK91MwA/QOQcVMvJAN2KpPHC +kGDRT7IhMs66cMxl0ImIJ2QSnv8HRNmBBSdUtJx1S6nV2u0VfgP61oNT/YbLR/Jk +CAIl1qe7Q8IsrMbPxCbt8g+D8Wr9C3pdYYqFvncCgYEAicGdKmDwx3Apr3nYCLxx +CjnkzhkZCWCK3EsNQyA2xD5XJd7NrhxBajU2ExUuHtzVKK4KLixG7dTTTvCj9u2y +UpSjoiqbDd2MaftcrfpTTXPyDmujUw02qT5kpaomexpLtWrvTeuHMbjZKEEwPM3r +yISYaFL/49UFRp/ZVd+P63ECgYAX1B0ctf77A6bUxwK6Buy7wNNlhQful+tf39rX +sWPCWIMKOFILevS4Cv5afFMlQRG9kjKFwi8wdeKnaLX5jpnr8StI6G/iHr6SDHtN +vds7Ly9+bBcF8sPmcseC0LGngkbyqljOPIhX9QEwRhJVm88b0R511WQ7/uRMASJN +rrloIwKBgCxYlu1xvvEuQNoIux/yKAEJ1h4Ta2zc5upjw0uDKMi0UNIbNhgdFOvj +LuVbxTRU8WktrLNk3T0rsopKsTbEZVg6Yuv8ZLkEiNYTzhUbn2Y5yM3bnoVwyOns +pTtqmBtvDZxaRCYdIQG3b09IvrewDk26AOtNHdeKw883G2muP/vA +-----END RSA PRIVATE KEY----- diff --git a/examples/src/main/java/com/vesoft/nebula/examples/GraphClientExample.java b/examples/src/main/java/com/vesoft/nebula/examples/GraphClientExample.java index 6b78cbb80..012cfefd3 100644 --- a/examples/src/main/java/com/vesoft/nebula/examples/GraphClientExample.java +++ b/examples/src/main/java/com/vesoft/nebula/examples/GraphClientExample.java @@ -9,8 +9,10 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.vesoft.nebula.client.graph.NebulaPoolConfig; +import com.vesoft.nebula.client.graph.data.CASignedSSLParam; import com.vesoft.nebula.client.graph.data.HostAddress; import com.vesoft.nebula.client.graph.data.ResultSet; +import com.vesoft.nebula.client.graph.data.SelfSignedSSLParam; import com.vesoft.nebula.client.graph.data.ValueWrapper; import com.vesoft.nebula.client.graph.net.NebulaPool; import com.vesoft.nebula.client.graph.net.Session; @@ -79,7 +81,7 @@ private static void printResult(ResultSet resultSet) throws UnsupportedEncodingE public static void main(String[] args) { NebulaPool pool = new NebulaPool(); - Session session = null; + Session session; try { NebulaPoolConfig nebulaPoolConfig = new NebulaPoolConfig(); nebulaPoolConfig.setMaxConnSize(100); @@ -146,22 +148,58 @@ public static void main(String[] args) { { String queryForJson = "YIELD 1"; String resp = session.executeJson(queryForJson); - JSONObject errors = JSON.parseObject(resp).getJSONArray("result").getJSONObject(0) - .getJSONObject("errors"); - if (!errors.getString("errorCode").equals("0")) { + JSONObject errors = JSON.parseObject(resp).getJSONArray("errors").getJSONObject(0); + if (errors.getInteger("code") != 0) { log.error(String.format("Execute: `%s', failed: %s", - queryForJson, errors.getString("errorMsg"))); + queryForJson, errors.getString("message"))); + System.exit(1); + } + System.out.println(resp); + } + + { + NebulaPool sslPool = new NebulaPool(); + NebulaPoolConfig nebulaSslPoolConfig = new NebulaPoolConfig(); + nebulaSslPoolConfig.setMaxConnSize(100); + nebulaSslPoolConfig.setSslParam(new CASignedSSLParam( + "examples/src/main/resources/ssl/casigned.pem", + "examples/src/main/resources/ssl/casigned.crt", + "examples/src/main/resources/ssl/casigned.key")); + sslPool.init(addresses, nebulaSslPoolConfig); + String queryForJson = "YIELD 1"; + Session sslSession = sslPool.getSession("root", "nebula", false); + String resp = sslSession.executeJson(queryForJson); + JSONObject errors = JSON.parseObject(resp).getJSONArray("errors").getJSONObject(0); + if (errors.getInteger("code") != 0) { + log.error(String.format("Execute: `%s', failed: %s", + queryForJson, errors.getString("message"))); + System.exit(1); + } + System.out.println(resp); + } + + { + NebulaPool sslPool = new NebulaPool(); + NebulaPoolConfig nebulaSslPoolConfig = new NebulaPoolConfig(); + nebulaSslPoolConfig.setMaxConnSize(100); + nebulaSslPoolConfig.setSslParam(new SelfSignedSSLParam( + "examples/src/main/resources/ssl/selfsigned.pem", + "examples/src/main/resources/ssl/selfsigned.key", + "vesoft")); + sslPool.init(addresses, nebulaSslPoolConfig); + String queryForJson = "YIELD 1"; + Session sslSession = sslPool.getSession("root", "nebula", false); + String resp = sslSession.executeJson(queryForJson); + JSONObject errors = JSON.parseObject(resp).getJSONArray("errors").getJSONObject(0); + if (errors.getInteger("code") != 0) { + log.error(String.format("Execute: `%s', failed: %s", + queryForJson, errors.getString("message"))); System.exit(1); } System.out.println(resp); } } catch (Exception e) { e.printStackTrace(); - } finally { - if (session != null) { - session.release(); - } - pool.close(); } } } diff --git a/examples/src/main/resources/ssl/casigned.crt b/examples/src/main/resources/ssl/casigned.crt new file mode 100644 index 000000000..fe1add667 --- /dev/null +++ b/examples/src/main/resources/ssl/casigned.crt @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE----- +MIICljCCAX4CCQC9uuUY+ah8qzANBgkqhkiG9w0BAQsFADANMQswCQYDVQQGEwJD +TjAeFw0yMTA5MjkwNzM4MDRaFw0yNDAxMDIwNzM4MDRaMA0xCzAJBgNVBAYTAkNO +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuo7hKpcs+VQKbGRq0fUL ++GcSfPfJ8mARtIeI8WfU0j1vI5KNujI//G2olOGEueDCw4OO0UbdjnsFpgj2awAo +rj4ga2W6adQHK8qHY6q/Rdqv0oDCrcePMtQ8IwbFjNWOXC4bn7GcV7mzOkigdcj8 +UPkSeaqI9XxBRm3OoDX+T8h6cDLrm+ncKB8KKe/QApKH4frV3HYDqGtN49zuRs6F +iurFbXDGVAZEdFEJl38IQJdmE2ASOzEHZbxWKzO/DZr/Z2+L1CuycZIwuITcnddx +b2Byx/opwX4HlyODeUBbyDp+hd+GkasmIcpOlIDw9OXIvrcajKvzLEbqGt2ThsxX +QwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQAxzxtbYBQ2WgBGrpzOX4TxsuSaigqo +YJ5zbVEHtwbsbBTZ7UJvRc9IyhrOL5Ui4PJI85chh1GpGqOmMoYSaWdddaIroilQ +56bn5haB8ezAMnLXbPuf97UENO0RIkyzt63XPIUkDnwlzOukIq50qgsYEDuiioM/ +wpCqSbMJ4iK/SlSSUWw3cKuAHvFfLv7hkC6AhvT7yfaCNDs29xEQUCD12XlIdFGH +FjMgVMcvcIePQq5ZcmSfVMge9jPjPx/Nj9SVauF5z5pil9qHG4jyXPGThiiJ3CE4 +GU5d/Qfe7OeiYI3LaoVufZ5pZnR9nMnpzqU46w9gY7vgi6bAhNwsCDr3 +-----END CERTIFICATE----- diff --git a/examples/src/main/resources/ssl/casigned.key b/examples/src/main/resources/ssl/casigned.key new file mode 100644 index 000000000..3561e7ab8 --- /dev/null +++ b/examples/src/main/resources/ssl/casigned.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEAuo7hKpcs+VQKbGRq0fUL+GcSfPfJ8mARtIeI8WfU0j1vI5KN +ujI//G2olOGEueDCw4OO0UbdjnsFpgj2awAorj4ga2W6adQHK8qHY6q/Rdqv0oDC +rcePMtQ8IwbFjNWOXC4bn7GcV7mzOkigdcj8UPkSeaqI9XxBRm3OoDX+T8h6cDLr +m+ncKB8KKe/QApKH4frV3HYDqGtN49zuRs6FiurFbXDGVAZEdFEJl38IQJdmE2AS +OzEHZbxWKzO/DZr/Z2+L1CuycZIwuITcnddxb2Byx/opwX4HlyODeUBbyDp+hd+G +kasmIcpOlIDw9OXIvrcajKvzLEbqGt2ThsxXQwIDAQABAoIBAH4SEBe4EaxsHp8h +PQ6linFTNis9SDuCsHRPIzv/7tIksfZYE27Ahn0Pndz+ibMTMIrvXJQQT6j5ede6 +NswYT2Vwlnf9Rvw9TJtLQjMYMCoEnsyiNu047oxq4DjLWrTRnGKuxfwlCoI9++Bn +NAhkyh3uM44EsIk0bugpTHj4A+PlbUPe7xdEI/6XpaZrRN9oiejJ4VxZAPgFGiTm +uNF5qg16+0900Pfj5Y/M4vXmn+gq39PO/y0FlTpaoEuYZiZZS3xHGmSVhlt8LIgI +8MdMRaKTfNeNITaqgOWh9pAW4xmK48/KfLgNPQgtDHjMJpgM0BbcBOayOY8Eio0x +Z66G2AECgYEA9vj/8Fm3CKn/ogNOO81y9kIs0iPcbjasMnQ3UXeOdD0z0+7TM86F +Xj3GK/z2ecvY7skWtO5ZUbbxp4aB7omW8Ke9+q8XPzMEmUuAOTzxQkAOxdr++HXP +TILy0hNX2cmiLQT1U60KoZHzPZ5o5hNIQPMt7hN12ERWcIfR/MUZa5UCgYEAwWCP +6Y7Zso1QxQR/qfjuILET3/xU+ZmqSRDvzJPEiGI3oeWNG4L6cKR+XTe0FWZBAmVk +Qq/1qXmdBnf5S7azffoJe2+H/m3kHJSprIiAAWlBN2e+kFlNfBhtkgia5NvsrjRw +al6mf/+weRD1FiPoZY3e1wBKoqro7aI8fE5gwXcCgYEAnEI05OROeyvb8qy2vf2i +JA8AfsBzwkPTNWT0bxX+yqrCdO/hLyEWnubk0IYPiEYibgpK1JUNbDcctErVQJBL +MN5gxBAt3C2yVi8/5HcbijgvYJ3LvnYDf7xGWAYnCkOZ2XQOqC+Oz2UhijYE1rUS +fQ2fXMdxQzERo8c7Y/tstvUCgYBuixy5jwezokUB20h/ieXWmmOaL00EQmutyRjM +AczfigXzbp3zlDRGIEJ8V1OCyClxjTR7SstMTlENWZgRSCfjZAP3pBJBx+AW1oUI +NB+4rsqxOYUeT26T+gLo8DJbkb0C+Mcqh2D22tuu2ZrBRVWceDVjAq+nvbvZ3Fxn +UwbMkQKBgQCxL3aA6ART6laIxT/ZqMhV0ZcaoDJogjF+4I4bhlO4ivWGWJ4RpEDn +ziFb6+M/4pe4vCou9yuAof6WTKM8JG4rok0yxhN3V6QGP49TjtrfkkrEPCtB2LSI +N1+YRSTrS5VDcl8h8JH7fpghRnXHONEyIqasYVqsbxKzNyLV/z2rkw== +-----END RSA PRIVATE KEY----- diff --git a/examples/src/main/resources/ssl/casigned.pem b/examples/src/main/resources/ssl/casigned.pem new file mode 100644 index 000000000..412ba3161 --- /dev/null +++ b/examples/src/main/resources/ssl/casigned.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIIEGzCCAwOgAwIBAgIUDcmZFpL4PcdCXfLRBK8bR2vb39cwDQYJKoZIhvcNAQEL +BQAwgZwxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhaaGVqaWFuZzERMA8GA1UEBwwI +SGFuZ3pob3UxFDASBgNVBAoMC1Zlc29mdCBJbmMuMRAwDgYDVQQLDAdzZWN0aW9u +MRYwFAYDVQQDDA1zaHlsb2NrIGh1YW5nMScwJQYJKoZIhvcNAQkBFhhzaHlsb2Nr +Lmh1YW5nQHZlc29mdC5jb20wHhcNMjEwODE5MDkyNDQ3WhcNMjUwODE4MDkyNDQ3 +WjCBnDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFpoZWppYW5nMREwDwYDVQQHDAhI +YW5nemhvdTEUMBIGA1UECgwLVmVzb2Z0IEluYy4xEDAOBgNVBAsMB3NlY3Rpb24x +FjAUBgNVBAMMDXNoeWxvY2sgaHVhbmcxJzAlBgkqhkiG9w0BCQEWGHNoeWxvY2su +aHVhbmdAdmVzb2Z0LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +AMEAgpamCQHl+8JnUHI6/VmJHjDLYJLTliN/CwpFrhMqIVjJ8wG57WYLpXpn91Lz +eHu52LkVzcikybIJ2a+LOTvnhNFdbmTbqDtrb+s6wM/sO+nF6tU2Av4e5zhyKoeR +LL+rHMk3nymohbdN4djySFmOOU5A1O/4b0bZz4Ylu995kUawdiaEo13BzxxOC7Ik +Gge5RyDcm0uLXZqTAPy5Sjv/zpOyj0AqL1CJUH7XBN9OMRhVU0ZX9nHWl1vgLRld +J6XT17Y9QbbHhCNEdAmFE5kEFgCvZc+MungUYABlkvoj86TLmC/FMV6fWdxQssyd +hS+ssfJFLaTDaEFz5a/Tr48CAwEAAaNTMFEwHQYDVR0OBBYEFK0GVrQx+wX1GCHy +e+6fl4X+prmYMB8GA1UdIwQYMBaAFK0GVrQx+wX1GCHye+6fl4X+prmYMA8GA1Ud +EwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHqP8P+ZUHmngviHLSSN1ln5 +Mx4BCkVeFRUaFx0yFXytV/iLXcG2HpFg3A9rAFoYgCDwi1xpsERnBZ/ShTv/eFOc +IxBY5yggx3/lGi8tAgvUdarhd7mQO67UJ0V4YU3hAkbnZ8grHHXj+4hfgUpY4ok6 +yaed6HXwknBb9W8N1jZI8ginhkhjaeRCHdMiF+fBvNCtmeR1bCml1Uz7ailrpcaT +Mf84+5VYuFEnaRZYWFNsWNCOBlJ/6/b3V10vMXzMmYHqz3xgAq0M3fVTFTzopnAX +DLSzorL/dYVdqEDCQi5XI9YAlgWN4VeGzJI+glkLOCNzHxRNP6Qev+YI+7Uxz6I= +-----END CERTIFICATE----- diff --git a/examples/src/main/resources/ssl/selfsigned.key b/examples/src/main/resources/ssl/selfsigned.key new file mode 100644 index 000000000..533ac941e --- /dev/null +++ b/examples/src/main/resources/ssl/selfsigned.key @@ -0,0 +1,30 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,6D12ED8559E80FA3 + +tv9epnwlt4dP6Q5ee0dACOyFA5BTwYTdoMykQRJrKGwfaNeXUXn+sQ/U/oFHp1Wx +O8VZE+z2aHpiFSTw+Eh6MPt86X5yVG3tpeVO6dErvr8Kd+NpuI8zn7rNoOFRh8wD +33EFcQMLQPneDl10O18hooIoi0qwp1pd63hYZPwEhB3eOrM5Mnv9OVJs65bzYfyf +Wku33YWYxeqlDvMCsou8PZnv/M2wYsr7+QoTcNmGKP45igMthMDBzwgF+q0p9ZZU +N11c6ojAs01kfuqFf3vKfHNYe6zsBiNhnUuEy8enXSxD5E7tR/OI8aEzPLdk7fmN +/UsMK2LE0Yd5iS3O1x/1ZjSBxJ+M/UzzCO692GTAiD6Hc13iJOavq/vt1mEPjfCD +neF38Bhb5DfFi+UAHrz6EHMreamGCzP82us2maIs7mSTq7nXDZfbBc7mBDLAUUnT +J6tlrTyc+DQXzkJa6jmbxJhcsWm6XvjIBEzSXVHxEDPLnZICQk3VXODjCXTD75Rg +0WaS78Ven7DW8wn07q3VzWAFDKaet3VI+TVTv7EfIavlfiA6LSshaENdFLeHahNE +s/V/j5K3Pg6+WQcZRgOsfqIwUCSQxY13R6TTdaaCkLay5BggF5iiAO3pkqsJiadf +w843Ak4USBptymJxoZgJyFtQHpQyNiFfsAbs9BaYbg2evvE7/VQhLk0gQ7HgQMeJ +wgxEQqZQKDCCSugSzY1YEGXKnrZYCKyipzyyH936mE15zNwhYp/Pi2020+gmtP3h +CDfcPs1yeLI2/1JuimafbuKsv9xchWa6ASU8p8Q7wTLtUj9ylLKyA4A/75pK0DXG +Hv/q0O+UfhAMD438SoPBle7RSvIsDU1VjUqstlNybBglBZxGIME7/18+Ms7U32wh +4xFkZwxT2nqFgyk37tXMdMz9UBh12/AXR9NU4XY37C3Ao2TDT7/0DvU6KdJhsDpv +rGcaC2zzhko+0CPrLlk52KbqP003JXiWvOSI+FylyPPDB/YGitmndJUuQblf3u/E +l+tGi9MeSBQeWKV6D3AVnO05AZjfTUzSK0vw4DgNh5YPNJvLy31B7kDAS88vyGI1 +t6MBwjW4/tz/nS/p1Go3mSzBhPkIsCrZE+ar7lH8p8JqkLl4fXIMaVKIfyfJdzyS +lkh3K7bOGDPegxxxaWdb+EnC7k+1R3EOU7uJFW61HyrGI3q6Y7kOl5aYSJ5Ge1Uv +PycFWHWVTHq/R7HRE6HIJzGe/PnLIbStXLDFeivjfcYq1YaSaF8Vl+xg+0u3ULOl +P6IuPTph6dlcgttRZVl3ETcF0T+2wfbUwgjf0ZiguCJfR2jLGhPl1KBg0Kd9cTSY +zI3YMMd2G8hApt/QFlm4Ry8CqaJUmDcjDNIJT3M+RldUgfz37NsX05cA5e9+I1AL +2406F/v5U9gWsYx7HuwJtQrDzYYDbl1GD4H+qHFJE5JYhPP4AyWYxJ1NR5dqyvrt ++3r5+xlwZrS76c10RsBWL7th8ZEzRxOZxbtLwbf4bG/tIGfQP2sTnWwA+qym6b2S +sRduqOTP+xwnhOq/ZKn8lfsDfhT8CPnKHBsd09kM9y/UWuxFe0upLydRLE/Wsb9s +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/examples/src/main/resources/ssl/selfsigned.password b/examples/src/main/resources/ssl/selfsigned.password new file mode 100644 index 000000000..60b7570cd --- /dev/null +++ b/examples/src/main/resources/ssl/selfsigned.password @@ -0,0 +1 @@ +vesoft \ No newline at end of file diff --git a/examples/src/main/resources/ssl/selfsigned.pem b/examples/src/main/resources/ssl/selfsigned.pem new file mode 100644 index 000000000..0815f63d6 --- /dev/null +++ b/examples/src/main/resources/ssl/selfsigned.pem @@ -0,0 +1,24 @@ +-----BEGIN CERTIFICATE----- +MIIEGzCCAwOgAwIBAgIUDcmZFpL4PcdCXfLRBK8bR2vb39cwDQYJKoZIhvcNAQEL +BQAwgZwxCzAJBgNVBAYTAkNOMREwDwYDVQQIDAhaaGVqaWFuZzERMA8GA1UEBwwI +SGFuZ3pob3UxFDASBgNVBAoMC1Zlc29mdCBJbmMuMRAwDgYDVQQLDAdzZWN0aW9u +MRYwFAYDVQQDDA1zaHlsb2NrIGh1YW5nMScwJQYJKoZIhvcNAQkBFhhzaHlsb2Nr +Lmh1YW5nQHZlc29mdC5jb20wHhcNMjEwODE5MDkyNDQ3WhcNMjUwODE4MDkyNDQ3 +WjCBnDELMAkGA1UEBhMCQ04xETAPBgNVBAgMCFpoZWppYW5nMREwDwYDVQQHDAhI +YW5nemhvdTEUMBIGA1UECgwLVmVzb2Z0IEluYy4xEDAOBgNVBAsMB3NlY3Rpb24x +FjAUBgNVBAMMDXNoeWxvY2sgaHVhbmcxJzAlBgkqhkiG9w0BCQEWGHNoeWxvY2su +aHVhbmdAdmVzb2Z0LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +AMEAgpamCQHl+8JnUHI6/VmJHjDLYJLTliN/CwpFrhMqIVjJ8wG57WYLpXpn91Lz +eHu52LkVzcikybIJ2a+LOTvnhNFdbmTbqDtrb+s6wM/sO+nF6tU2Av4e5zhyKoeR +LL+rHMk3nymohbdN4djySFmOOU5A1O/4b0bZz4Ylu995kUawdiaEo13BzxxOC7Ik +Gge5RyDcm0uLXZqTAPy5Sjv/zpOyj0AqL1CJUH7XBN9OMRhVU0ZX9nHWl1vgLRld +J6XT17Y9QbbHhCNEdAmFE5kEFgCvZc+MungUYABlkvoj86TLmC/FMV6fWdxQssyd +hS+ssfJFLaTDaEFz5a/Tr48CAwEAAaNTMFEwHQYDVR0OBBYEFK0GVrQx+wX1GCHy +e+6fl4X+prmYMB8GA1UdIwQYMBaAFK0GVrQx+wX1GCHye+6fl4X+prmYMA8GA1Ud +EwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHqP8P+ZUHmngviHLSSN1ln5 +Mx4BCkVeFRUaFx0yFXytV/iLXcG2HpFg3A9rAFoYgCDwi1xpsERnBZ/ShTv/eFOc +IxBY5yggx3/lGi8tAgvUdarhd7mQO67UJ0V4YU3hAkbnZ8grHHXj+4hfgUpY4ok6 +yaed6HXwknBb9W8N1jZI8ginhkhjaeRCHdMiF+fBvNCtmeR1bCml1Uz7ailrpcaT +Mf84+5VYuFEnaRZYWFNsWNCOBlJ/6/b3V10vMXzMmYHqz3xgAq0M3fVTFTzopnAX +DLSzorL/dYVdqEDCQi5XI9YAlgWN4VeGzJI+glkLOCNzHxRNP6Qev+YI+7Uxz6I= +-----END CERTIFICATE----- \ No newline at end of file From af03a67d011a86a3ff6608e8d5d3447487749bf0 Mon Sep 17 00:00:00 2001 From: Klay Date: Sat, 9 Oct 2021 01:48:39 -0700 Subject: [PATCH 2/6] update thrift generated java code --- .../com/vesoft/nebula/Constants.java | 23 + .../com/vesoft/nebula/ErrorCode.java | 5 + .../com/vesoft/nebula/Geography.java | 265 ++++ .../generated/com/vesoft/nebula/Value.java | 42 + .../com/vesoft/nebula/graph/GraphService.java | 570 +++++++- .../nebula/graph/VerifyClientVersionReq.java | 275 ++++ .../nebula/graph/VerifyClientVersionResp.java | 389 +++++ .../com/vesoft/nebula/meta/ColumnTypeDef.java | 114 +- .../com/vesoft/nebula/meta/GeoShape.java | 52 + .../com/vesoft/nebula/meta/MetaService.java | 1250 ++++++++++++----- .../com/vesoft/nebula/meta/PropertyType.java | 5 +- .../nebula/meta/VerifyClientVersionReq.java | 275 ++++ .../nebula/meta/VerifyClientVersionResp.java | 474 +++++++ .../nebula/storage/ChainAddEdgesRequest.java | 705 ++++++++++ .../storage/ChainUpdateEdgeRequest.java | 595 ++++++++ .../nebula/storage/GeneralStorageService.java | 24 +- .../nebula/storage/GetValueRequest.java | 439 ------ .../nebula/storage/GetValueResponse.java | 365 ----- .../nebula/storage/GraphStorageService.java | 724 ++++++++-- .../storage/InternalStorageService.java | 363 ++--- .../nebula/storage/InternalTxnRequest.java | 545 +++---- .../vesoft/nebula/storage/RequestCommon.java | 95 +- .../nebula/storage/StorageAdminService.java | 128 +- 23 files changed, 5862 insertions(+), 1860 deletions(-) create mode 100644 client/src/main/generated/com/vesoft/nebula/Constants.java create mode 100644 client/src/main/generated/com/vesoft/nebula/Geography.java create mode 100644 client/src/main/generated/com/vesoft/nebula/graph/VerifyClientVersionReq.java create mode 100644 client/src/main/generated/com/vesoft/nebula/graph/VerifyClientVersionResp.java create mode 100644 client/src/main/generated/com/vesoft/nebula/meta/GeoShape.java create mode 100644 client/src/main/generated/com/vesoft/nebula/meta/VerifyClientVersionReq.java create mode 100644 client/src/main/generated/com/vesoft/nebula/meta/VerifyClientVersionResp.java create mode 100644 client/src/main/generated/com/vesoft/nebula/storage/ChainAddEdgesRequest.java create mode 100644 client/src/main/generated/com/vesoft/nebula/storage/ChainUpdateEdgeRequest.java delete mode 100644 client/src/main/generated/com/vesoft/nebula/storage/GetValueRequest.java delete mode 100644 client/src/main/generated/com/vesoft/nebula/storage/GetValueResponse.java diff --git a/client/src/main/generated/com/vesoft/nebula/Constants.java b/client/src/main/generated/com/vesoft/nebula/Constants.java new file mode 100644 index 000000000..b83205264 --- /dev/null +++ b/client/src/main/generated/com/vesoft/nebula/Constants.java @@ -0,0 +1,23 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.vesoft.nebula; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.Set; +import java.util.HashSet; +import java.util.Collections; +import java.util.BitSet; +import java.util.Arrays; +@SuppressWarnings({ "unused" }) +public class Constants { + + public static final byte[] version = "2.6.0".getBytes(); + +} diff --git a/client/src/main/generated/com/vesoft/nebula/ErrorCode.java b/client/src/main/generated/com/vesoft/nebula/ErrorCode.java index b8ccc0b8f..c31b591bd 100644 --- a/client/src/main/generated/com/vesoft/nebula/ErrorCode.java +++ b/client/src/main/generated/com/vesoft/nebula/ErrorCode.java @@ -128,6 +128,11 @@ public enum ErrorCode implements com.facebook.thrift.TEnum { E_USER_CANCEL(-3052), E_TASK_EXECUTION_FAILED(-3053), E_PLAN_IS_KILLED(-3060), + E_NO_TERM(-3070), + E_OUTDATED_TERM(-3071), + E_OUTDATED_EDGE(-3072), + E_WRITE_WRITE_CONFLICT(-3073), + E_CLIENT_SERVER_INCOMPATIBLE(-3061), E_UNKNOWN(-8000); private static final Map INDEXED_VALUES = new HashMap(); diff --git a/client/src/main/generated/com/vesoft/nebula/Geography.java b/client/src/main/generated/com/vesoft/nebula/Geography.java new file mode 100644 index 000000000..1dbe57187 --- /dev/null +++ b/client/src/main/generated/com/vesoft/nebula/Geography.java @@ -0,0 +1,265 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.vesoft.nebula; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.Set; +import java.util.HashSet; +import java.util.Collections; +import java.util.BitSet; +import java.util.Arrays; +import com.facebook.thrift.*; +import com.facebook.thrift.annotations.*; +import com.facebook.thrift.async.*; +import com.facebook.thrift.meta_data.*; +import com.facebook.thrift.server.*; +import com.facebook.thrift.transport.*; +import com.facebook.thrift.protocol.*; + +@SuppressWarnings({ "unused", "serial" }) +public class Geography implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("Geography"); + private static final TField WKB_FIELD_DESC = new TField("wkb", TType.STRING, (short)1); + + public String wkb; + public static final int WKB = 1; + + // isset id assignments + + public static final Map metaDataMap; + + static { + Map tmpMetaDataMap = new HashMap(); + tmpMetaDataMap.put(WKB, new FieldMetaData("wkb", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(Geography.class, metaDataMap); + } + + public Geography() { + } + + public Geography( + String wkb) { + this(); + this.wkb = wkb; + } + + public static class Builder { + private String wkb; + + public Builder() { + } + + public Builder setWkb(final String wkb) { + this.wkb = wkb; + return this; + } + + public Geography build() { + Geography result = new Geography(); + result.setWkb(this.wkb); + return result; + } + } + + public static Builder builder() { + return new Builder(); + } + + /** + * Performs a deep copy on other. + */ + public Geography(Geography other) { + if (other.isSetWkb()) { + this.wkb = TBaseHelper.deepCopy(other.wkb); + } + } + + public Geography deepCopy() { + return new Geography(this); + } + + public String getWkb() { + return this.wkb; + } + + public Geography setWkb(String wkb) { + this.wkb = wkb; + return this; + } + + public void unsetWkb() { + this.wkb = null; + } + + // Returns true if field wkb is set (has been assigned a value) and false otherwise + public boolean isSetWkb() { + return this.wkb != null; + } + + public void setWkbIsSet(boolean __value) { + if (!__value) { + this.wkb = null; + } + } + + public void setFieldValue(int fieldID, Object __value) { + switch (fieldID) { + case WKB: + if (__value == null) { + unsetWkb(); + } else { + setWkb((String)__value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case WKB: + return getWkb(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object _that) { + if (_that == null) + return false; + if (this == _that) + return true; + if (!(_that instanceof Geography)) + return false; + Geography that = (Geography)_that; + + if (!TBaseHelper.equalsNobinary(this.isSetWkb(), that.isSetWkb(), this.wkb, that.wkb)) { return false; } + + return true; + } + + @Override + public int hashCode() { + return Arrays.deepHashCode(new Object[] {wkb}); + } + + @Override + public int compareTo(Geography other) { + if (other == null) { + // See java.lang.Comparable docs + throw new NullPointerException(); + } + + if (other == this) { + return 0; + } + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetWkb()).compareTo(other.isSetWkb()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(wkb, other.wkb); + if (lastComparison != 0) { + return lastComparison; + } + return 0; + } + + public void read(TProtocol iprot) throws TException { + TField __field; + iprot.readStructBegin(metaDataMap); + while (true) + { + __field = iprot.readFieldBegin(); + if (__field.type == TType.STOP) { + break; + } + switch (__field.id) + { + case WKB: + if (__field.type == TType.STRING) { + this.wkb = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + default: + TProtocolUtil.skip(iprot, __field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.wkb != null) { + oprot.writeFieldBegin(WKB_FIELD_DESC); + oprot.writeString(this.wkb); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + return toString(1, true); + } + + @Override + public String toString(int indent, boolean prettyPrint) { + String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; + String newLine = prettyPrint ? "\n" : ""; + String space = prettyPrint ? " " : ""; + StringBuilder sb = new StringBuilder("Geography"); + sb.append(space); + sb.append("("); + sb.append(newLine); + boolean first = true; + + sb.append(indentStr); + sb.append("wkb"); + sb.append(space); + sb.append(":").append(space); + if (this.getWkb() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getWkb(), indent + 1, prettyPrint)); + } + first = false; + sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git a/client/src/main/generated/com/vesoft/nebula/Value.java b/client/src/main/generated/com/vesoft/nebula/Value.java index 36d4ea691..628946385 100644 --- a/client/src/main/generated/com/vesoft/nebula/Value.java +++ b/client/src/main/generated/com/vesoft/nebula/Value.java @@ -41,6 +41,7 @@ public class Value extends TUnion { private static final TField M_VAL_FIELD_DESC = new TField("mVal", TType.STRUCT, (short)13); private static final TField U_VAL_FIELD_DESC = new TField("uVal", TType.STRUCT, (short)14); private static final TField G_VAL_FIELD_DESC = new TField("gVal", TType.STRUCT, (short)15); + private static final TField GG_VAL_FIELD_DESC = new TField("ggVal", TType.STRUCT, (short)16); public static final int NVAL = 1; public static final int BVAL = 2; @@ -57,6 +58,7 @@ public class Value extends TUnion { public static final int MVAL = 13; public static final int UVAL = 14; public static final int GVAL = 15; + public static final int GGVAL = 16; public static final Map metaDataMap; @@ -92,6 +94,8 @@ public class Value extends TUnion { new StructMetaData(TType.STRUCT, NSet.class))); tmpMetaDataMap.put(GVAL, new FieldMetaData("gVal", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, DataSet.class))); + tmpMetaDataMap.put(GGVAL, new FieldMetaData("ggVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Geography.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -201,6 +205,12 @@ public static Value gVal(DataSet __value) { return x; } + public static Value ggVal(Geography __value) { + Value x = new Value(); + x.setGgVal(__value); + return x; + } + @Override protected void checkType(short setField, Object __value) throws ClassCastException { @@ -280,6 +290,11 @@ protected void checkType(short setField, Object __value) throws ClassCastExcepti break; } throw new ClassCastException("Was expecting value of type DataSet for field 'gVal', but got " + __value.getClass().getSimpleName()); + case GGVAL: + if (__value instanceof Geography) { + break; + } + throw new ClassCastException("Was expecting value of type Geography for field 'ggVal', but got " + __value.getClass().getSimpleName()); default: throw new IllegalArgumentException("Unknown field id " + setField); } @@ -372,6 +387,11 @@ public void read(TProtocol iprot) throws TException { setField_ = __field.id; } break; + case GGVAL: + if (__field.type == GG_VAL_FIELD_DESC.type) { + setField_ = __field.id; + } + break; } } iprot.readFieldEnd(); @@ -501,6 +521,14 @@ protected Object readValue(TProtocol iprot, TField __field) throws TException { return gVal; } break; + case GGVAL: + if (__field.type == GG_VAL_FIELD_DESC.type) { + Geography ggVal; + ggVal = new Geography(); + ggVal.read(iprot); + return ggVal; + } + break; } TProtocolUtil.skip(iprot, __field.type); return null; @@ -569,6 +597,10 @@ protected void writeValue(TProtocol oprot, short setField, Object __value) throw DataSet gVal = (DataSet)getFieldValue(); gVal.write(oprot); return; + case GGVAL: + Geography ggVal = (Geography)getFieldValue(); + ggVal.write(oprot); + return; default: throw new IllegalStateException("Cannot write union with unknown field " + setField); } @@ -607,6 +639,8 @@ protected TField getFieldDesc(int setField) { return U_VAL_FIELD_DESC; case GVAL: return G_VAL_FIELD_DESC; + case GGVAL: + return GG_VAL_FIELD_DESC; default: throw new IllegalArgumentException("Unknown field id " + setField); } @@ -765,6 +799,14 @@ public void setGVal(DataSet __value) { __setValue(GVAL, __value); } + public Geography getGgVal() { + return (Geography) __getValue(GGVAL); + } + + public void setGgVal(Geography __value) { + __setValue(GGVAL, __value); + } + public boolean equals(Object other) { if (other instanceof Value) { return equals((Value)other); diff --git a/client/src/main/generated/com/vesoft/nebula/graph/GraphService.java b/client/src/main/generated/com/vesoft/nebula/graph/GraphService.java index 9db127bf8..4083c3390 100644 --- a/client/src/main/generated/com/vesoft/nebula/graph/GraphService.java +++ b/client/src/main/generated/com/vesoft/nebula/graph/GraphService.java @@ -39,6 +39,8 @@ public interface Iface { public byte[] executeJson(long sessionId, byte[] stmt) throws TException; + public VerifyClientVersionResp verifyClientVersion(VerifyClientVersionReq req) throws TException; + } public interface AsyncIface { @@ -51,6 +53,8 @@ public interface AsyncIface { public void executeJson(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler) throws TException; + public void verifyClientVersion(VerifyClientVersionReq req, AsyncMethodCallback resultHandler) throws TException; + } public static class Client extends EventHandlerBase implements Iface, TClientIf { @@ -241,6 +245,51 @@ public byte[] recv_executeJson() throws TException throw new TApplicationException(TApplicationException.MISSING_RESULT, "executeJson failed: unknown result"); } + public VerifyClientVersionResp verifyClientVersion(VerifyClientVersionReq req) throws TException + { + ContextStack ctx = getContextStack("GraphService.verifyClientVersion", null); + this.setContextStack(ctx); + send_verifyClientVersion(req); + return recv_verifyClientVersion(); + } + + public void send_verifyClientVersion(VerifyClientVersionReq req) throws TException + { + ContextStack ctx = this.getContextStack(); + super.preWrite(ctx, "GraphService.verifyClientVersion", null); + oprot_.writeMessageBegin(new TMessage("verifyClientVersion", TMessageType.CALL, seqid_)); + verifyClientVersion_args args = new verifyClientVersion_args(); + args.req = req; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + super.postWrite(ctx, "GraphService.verifyClientVersion", args); + return; + } + + public VerifyClientVersionResp recv_verifyClientVersion() throws TException + { + ContextStack ctx = super.getContextStack(); + long bytes; + TMessageType mtype; + super.preRead(ctx, "GraphService.verifyClientVersion"); + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + verifyClientVersion_result result = new verifyClientVersion_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + super.postRead(ctx, "GraphService.verifyClientVersion", result); + + if (result.isSetSuccess()) { + return result.success; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "verifyClientVersion failed: unknown result"); + } + } public static class AsyncClient extends TAsyncClient implements AsyncIface { public static class Factory implements TAsyncClientFactory { @@ -259,9 +308,9 @@ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientM super(protocolFactory, clientManager, transport); } - public void authenticate(byte[] username, byte[] password, AsyncMethodCallback resultHandler33) throws TException { + public void authenticate(byte[] username, byte[] password, AsyncMethodCallback resultHandler34) throws TException { checkReady(); - authenticate_call method_call = new authenticate_call(username, password, resultHandler33, this, ___protocolFactory, ___transport); + authenticate_call method_call = new authenticate_call(username, password, resultHandler34, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } @@ -269,8 +318,8 @@ public void authenticate(byte[] username, byte[] password, AsyncMethodCallback r public static class authenticate_call extends TAsyncMethodCall { private byte[] username; private byte[] password; - public authenticate_call(byte[] username, byte[] password, AsyncMethodCallback resultHandler34, TAsyncClient client30, TProtocolFactory protocolFactory31, TNonblockingTransport transport32) throws TException { - super(client30, protocolFactory31, transport32, resultHandler34, false); + public authenticate_call(byte[] username, byte[] password, AsyncMethodCallback resultHandler35, TAsyncClient client31, TProtocolFactory protocolFactory32, TNonblockingTransport transport33) throws TException { + super(client31, protocolFactory32, transport33, resultHandler35, false); this.username = username; this.password = password; } @@ -294,17 +343,17 @@ public AuthResponse getResult() throws TException { } } - public void signout(long sessionId, AsyncMethodCallback resultHandler38) throws TException { + public void signout(long sessionId, AsyncMethodCallback resultHandler39) throws TException { checkReady(); - signout_call method_call = new signout_call(sessionId, resultHandler38, this, ___protocolFactory, ___transport); + signout_call method_call = new signout_call(sessionId, resultHandler39, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class signout_call extends TAsyncMethodCall { private long sessionId; - public signout_call(long sessionId, AsyncMethodCallback resultHandler39, TAsyncClient client35, TProtocolFactory protocolFactory36, TNonblockingTransport transport37) throws TException { - super(client35, protocolFactory36, transport37, resultHandler39, true); + public signout_call(long sessionId, AsyncMethodCallback resultHandler40, TAsyncClient client36, TProtocolFactory protocolFactory37, TNonblockingTransport transport38) throws TException { + super(client36, protocolFactory37, transport38, resultHandler40, true); this.sessionId = sessionId; } @@ -325,9 +374,9 @@ public void getResult() throws TException { } } - public void execute(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler43) throws TException { + public void execute(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler44) throws TException { checkReady(); - execute_call method_call = new execute_call(sessionId, stmt, resultHandler43, this, ___protocolFactory, ___transport); + execute_call method_call = new execute_call(sessionId, stmt, resultHandler44, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } @@ -335,8 +384,8 @@ public void execute(long sessionId, byte[] stmt, AsyncMethodCallback resultHandl public static class execute_call extends TAsyncMethodCall { private long sessionId; private byte[] stmt; - public execute_call(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler44, TAsyncClient client40, TProtocolFactory protocolFactory41, TNonblockingTransport transport42) throws TException { - super(client40, protocolFactory41, transport42, resultHandler44, false); + public execute_call(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler45, TAsyncClient client41, TProtocolFactory protocolFactory42, TNonblockingTransport transport43) throws TException { + super(client41, protocolFactory42, transport43, resultHandler45, false); this.sessionId = sessionId; this.stmt = stmt; } @@ -360,9 +409,9 @@ public ExecutionResponse getResult() throws TException { } } - public void executeJson(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler48) throws TException { + public void executeJson(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler49) throws TException { checkReady(); - executeJson_call method_call = new executeJson_call(sessionId, stmt, resultHandler48, this, ___protocolFactory, ___transport); + executeJson_call method_call = new executeJson_call(sessionId, stmt, resultHandler49, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } @@ -370,8 +419,8 @@ public void executeJson(long sessionId, byte[] stmt, AsyncMethodCallback resultH public static class executeJson_call extends TAsyncMethodCall { private long sessionId; private byte[] stmt; - public executeJson_call(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler49, TAsyncClient client45, TProtocolFactory protocolFactory46, TNonblockingTransport transport47) throws TException { - super(client45, protocolFactory46, transport47, resultHandler49, false); + public executeJson_call(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler50, TAsyncClient client46, TProtocolFactory protocolFactory47, TNonblockingTransport transport48) throws TException { + super(client46, protocolFactory47, transport48, resultHandler50, false); this.sessionId = sessionId; this.stmt = stmt; } @@ -395,6 +444,38 @@ public byte[] getResult() throws TException { } } + public void verifyClientVersion(VerifyClientVersionReq req, AsyncMethodCallback resultHandler54) throws TException { + checkReady(); + verifyClientVersion_call method_call = new verifyClientVersion_call(req, resultHandler54, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class verifyClientVersion_call extends TAsyncMethodCall { + private VerifyClientVersionReq req; + public verifyClientVersion_call(VerifyClientVersionReq req, AsyncMethodCallback resultHandler55, TAsyncClient client51, TProtocolFactory protocolFactory52, TNonblockingTransport transport53) throws TException { + super(client51, protocolFactory52, transport53, resultHandler55, false); + this.req = req; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("verifyClientVersion", TMessageType.CALL, 0)); + verifyClientVersion_args args = new verifyClientVersion_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public VerifyClientVersionResp getResult() throws TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_verifyClientVersion(); + } + } + } public static class Processor implements TProcessor { @@ -407,6 +488,7 @@ public Processor(Iface iface) processMap_.put("signout", new signout()); processMap_.put("execute", new execute()); processMap_.put("executeJson", new executeJson()); + processMap_.put("verifyClientVersion", new verifyClientVersion()); } protected static interface ProcessFunction { @@ -516,6 +598,27 @@ public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionCont } + private class verifyClientVersion implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException + { + Object handler_ctx = event_handler_.getContext("GraphService.verifyClientVersion", server_ctx); + verifyClientVersion_args args = new verifyClientVersion_args(); + event_handler_.preRead(handler_ctx, "GraphService.verifyClientVersion"); + args.read(iprot); + iprot.readMessageEnd(); + event_handler_.postRead(handler_ctx, "GraphService.verifyClientVersion", args); + verifyClientVersion_result result = new verifyClientVersion_result(); + result.success = iface_.verifyClientVersion(args.req); + event_handler_.preWrite(handler_ctx, "GraphService.verifyClientVersion", result); + oprot.writeMessageBegin(new TMessage("verifyClientVersion", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + event_handler_.postWrite(handler_ctx, "GraphService.verifyClientVersion", result); + } + + } + } public static class authenticate_args implements TBase, java.io.Serializable, Cloneable, Comparable { @@ -2263,4 +2366,439 @@ public void validate() throws TException { } + public static class verifyClientVersion_args implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("verifyClientVersion_args"); + private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1); + + public VerifyClientVersionReq req; + public static final int REQ = 1; + + // isset id assignments + + public static final Map metaDataMap; + + static { + Map tmpMetaDataMap = new HashMap(); + tmpMetaDataMap.put(REQ, new FieldMetaData("req", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, VerifyClientVersionReq.class))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(verifyClientVersion_args.class, metaDataMap); + } + + public verifyClientVersion_args() { + } + + public verifyClientVersion_args( + VerifyClientVersionReq req) { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public verifyClientVersion_args(verifyClientVersion_args other) { + if (other.isSetReq()) { + this.req = TBaseHelper.deepCopy(other.req); + } + } + + public verifyClientVersion_args deepCopy() { + return new verifyClientVersion_args(this); + } + + public VerifyClientVersionReq getReq() { + return this.req; + } + + public verifyClientVersion_args setReq(VerifyClientVersionReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + // Returns true if field req is set (has been assigned a value) and false otherwise + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean __value) { + if (!__value) { + this.req = null; + } + } + + public void setFieldValue(int fieldID, Object __value) { + switch (fieldID) { + case REQ: + if (__value == null) { + unsetReq(); + } else { + setReq((VerifyClientVersionReq)__value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case REQ: + return getReq(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object _that) { + if (_that == null) + return false; + if (this == _that) + return true; + if (!(_that instanceof verifyClientVersion_args)) + return false; + verifyClientVersion_args that = (verifyClientVersion_args)_that; + + if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; } + + return true; + } + + @Override + public int hashCode() { + return Arrays.deepHashCode(new Object[] {req}); + } + + @Override + public int compareTo(verifyClientVersion_args other) { + if (other == null) { + // See java.lang.Comparable docs + throw new NullPointerException(); + } + + if (other == this) { + return 0; + } + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + return 0; + } + + public void read(TProtocol iprot) throws TException { + TField __field; + iprot.readStructBegin(metaDataMap); + while (true) + { + __field = iprot.readFieldBegin(); + if (__field.type == TType.STOP) { + break; + } + switch (__field.id) + { + case REQ: + if (__field.type == TType.STRUCT) { + this.req = new VerifyClientVersionReq(); + this.req.read(iprot); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + default: + TProtocolUtil.skip(iprot, __field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + this.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + return toString(1, true); + } + + @Override + public String toString(int indent, boolean prettyPrint) { + String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; + String newLine = prettyPrint ? "\n" : ""; + String space = prettyPrint ? " " : ""; + StringBuilder sb = new StringBuilder("verifyClientVersion_args"); + sb.append(space); + sb.append("("); + sb.append(newLine); + boolean first = true; + + sb.append(indentStr); + sb.append("req"); + sb.append(space); + sb.append(":").append(space); + if (this.getReq() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getReq(), indent + 1, prettyPrint)); + } + first = false; + sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class verifyClientVersion_result implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("verifyClientVersion_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + + public VerifyClientVersionResp success; + public static final int SUCCESS = 0; + + // isset id assignments + + public static final Map metaDataMap; + + static { + Map tmpMetaDataMap = new HashMap(); + tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, VerifyClientVersionResp.class))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(verifyClientVersion_result.class, metaDataMap); + } + + public verifyClientVersion_result() { + } + + public verifyClientVersion_result( + VerifyClientVersionResp success) { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public verifyClientVersion_result(verifyClientVersion_result other) { + if (other.isSetSuccess()) { + this.success = TBaseHelper.deepCopy(other.success); + } + } + + public verifyClientVersion_result deepCopy() { + return new verifyClientVersion_result(this); + } + + public VerifyClientVersionResp getSuccess() { + return this.success; + } + + public verifyClientVersion_result setSuccess(VerifyClientVersionResp 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 void setFieldValue(int fieldID, Object __value) { + switch (fieldID) { + case SUCCESS: + if (__value == null) { + unsetSuccess(); + } else { + setSuccess((VerifyClientVersionResp)__value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object _that) { + if (_that == null) + return false; + if (this == _that) + return true; + if (!(_that instanceof verifyClientVersion_result)) + return false; + verifyClientVersion_result that = (verifyClientVersion_result)_that; + + if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; } + + return true; + } + + @Override + public int hashCode() { + return Arrays.deepHashCode(new Object[] {success}); + } + + @Override + public int compareTo(verifyClientVersion_result other) { + if (other == null) { + // See java.lang.Comparable docs + throw new NullPointerException(); + } + + if (other == this) { + return 0; + } + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + return 0; + } + + public void read(TProtocol iprot) throws TException { + TField __field; + iprot.readStructBegin(metaDataMap); + while (true) + { + __field = iprot.readFieldBegin(); + if (__field.type == TType.STOP) { + break; + } + switch (__field.id) + { + case SUCCESS: + if (__field.type == TType.STRUCT) { + this.success = new VerifyClientVersionResp(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + default: + TProtocolUtil.skip(iprot, __field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + return toString(1, true); + } + + @Override + public String toString(int indent, boolean prettyPrint) { + String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; + String newLine = prettyPrint ? "\n" : ""; + String space = prettyPrint ? " " : ""; + StringBuilder sb = new StringBuilder("verifyClientVersion_result"); + sb.append(space); + sb.append("("); + sb.append(newLine); + boolean first = true; + + sb.append(indentStr); + sb.append("success"); + sb.append(space); + sb.append(":").append(space); + if (this.getSuccess() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getSuccess(), indent + 1, prettyPrint)); + } + first = false; + sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + } diff --git a/client/src/main/generated/com/vesoft/nebula/graph/VerifyClientVersionReq.java b/client/src/main/generated/com/vesoft/nebula/graph/VerifyClientVersionReq.java new file mode 100644 index 000000000..077897126 --- /dev/null +++ b/client/src/main/generated/com/vesoft/nebula/graph/VerifyClientVersionReq.java @@ -0,0 +1,275 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.vesoft.nebula.graph; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.Set; +import java.util.HashSet; +import java.util.Collections; +import java.util.BitSet; +import java.util.Arrays; +import com.facebook.thrift.*; +import com.facebook.thrift.annotations.*; +import com.facebook.thrift.async.*; +import com.facebook.thrift.meta_data.*; +import com.facebook.thrift.server.*; +import com.facebook.thrift.transport.*; +import com.facebook.thrift.protocol.*; + +@SuppressWarnings({ "unused", "serial" }) +public class VerifyClientVersionReq implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("VerifyClientVersionReq"); + private static final TField VERSION_FIELD_DESC = new TField("version", TType.STRING, (short)1); + + public byte[] version; + public static final int VERSION = 1; + + // isset id assignments + + public static final Map metaDataMap; + + static { + Map tmpMetaDataMap = new HashMap(); + tmpMetaDataMap.put(VERSION, new FieldMetaData("version", TFieldRequirementType.REQUIRED, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(VerifyClientVersionReq.class, metaDataMap); + } + + public VerifyClientVersionReq() { + this.version = "2.6.0".getBytes(); + + } + + public VerifyClientVersionReq( + byte[] version) { + this(); + this.version = version; + } + + public static class Builder { + private byte[] version; + + public Builder() { + } + + public Builder setVersion(final byte[] version) { + this.version = version; + return this; + } + + public VerifyClientVersionReq build() { + VerifyClientVersionReq result = new VerifyClientVersionReq(); + result.setVersion(this.version); + return result; + } + } + + public static Builder builder() { + return new Builder(); + } + + /** + * Performs a deep copy on other. + */ + public VerifyClientVersionReq(VerifyClientVersionReq other) { + if (other.isSetVersion()) { + this.version = TBaseHelper.deepCopy(other.version); + } + } + + public VerifyClientVersionReq deepCopy() { + return new VerifyClientVersionReq(this); + } + + public byte[] getVersion() { + return this.version; + } + + public VerifyClientVersionReq setVersion(byte[] 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(int fieldID, Object __value) { + switch (fieldID) { + case VERSION: + if (__value == null) { + unsetVersion(); + } else { + setVersion((byte[])__value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case VERSION: + return getVersion(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object _that) { + if (_that == null) + return false; + if (this == _that) + return true; + if (!(_that instanceof VerifyClientVersionReq)) + return false; + VerifyClientVersionReq that = (VerifyClientVersionReq)_that; + + if (!TBaseHelper.equalsSlow(this.isSetVersion(), that.isSetVersion(), this.version, that.version)) { return false; } + + return true; + } + + @Override + public int hashCode() { + return Arrays.deepHashCode(new Object[] {version}); + } + + @Override + public int compareTo(VerifyClientVersionReq other) { + if (other == null) { + // See java.lang.Comparable docs + throw new NullPointerException(); + } + + if (other == this) { + return 0; + } + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(version, other.version); + if (lastComparison != 0) { + return lastComparison; + } + return 0; + } + + public void read(TProtocol iprot) throws TException { + TField __field; + iprot.readStructBegin(metaDataMap); + while (true) + { + __field = iprot.readFieldBegin(); + if (__field.type == TType.STOP) { + break; + } + switch (__field.id) + { + case VERSION: + if (__field.type == TType.STRING) { + this.version = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + default: + TProtocolUtil.skip(iprot, __field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.version != null) { + oprot.writeFieldBegin(VERSION_FIELD_DESC); + oprot.writeBinary(this.version); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + return toString(1, true); + } + + @Override + public String toString(int indent, boolean prettyPrint) { + String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; + String newLine = prettyPrint ? "\n" : ""; + String space = prettyPrint ? " " : ""; + StringBuilder sb = new StringBuilder("VerifyClientVersionReq"); + sb.append(space); + sb.append("("); + sb.append(newLine); + boolean first = true; + + sb.append(indentStr); + sb.append("version"); + sb.append(space); + sb.append(":").append(space); + if (this.getVersion() == null) { + sb.append("null"); + } else { + int __version_size = Math.min(this.getVersion().length, 128); + for (int i = 0; i < __version_size; i++) { + if (i != 0) sb.append(" "); + sb.append(Integer.toHexString(this.getVersion()[i]).length() > 1 ? Integer.toHexString(this.getVersion()[i]).substring(Integer.toHexString(this.getVersion()[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.getVersion()[i]).toUpperCase()); + } + if (this.getVersion().length > 128) sb.append(" ..."); + } + first = false; + sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + if (version == null) { + throw new TProtocolException(TProtocolException.MISSING_REQUIRED_FIELD, "Required field 'version' was not present! Struct: " + toString()); + } + } + +} + diff --git a/client/src/main/generated/com/vesoft/nebula/graph/VerifyClientVersionResp.java b/client/src/main/generated/com/vesoft/nebula/graph/VerifyClientVersionResp.java new file mode 100644 index 000000000..ae4c21a62 --- /dev/null +++ b/client/src/main/generated/com/vesoft/nebula/graph/VerifyClientVersionResp.java @@ -0,0 +1,389 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.vesoft.nebula.graph; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.Set; +import java.util.HashSet; +import java.util.Collections; +import java.util.BitSet; +import java.util.Arrays; +import com.facebook.thrift.*; +import com.facebook.thrift.annotations.*; +import com.facebook.thrift.async.*; +import com.facebook.thrift.meta_data.*; +import com.facebook.thrift.server.*; +import com.facebook.thrift.transport.*; +import com.facebook.thrift.protocol.*; + +@SuppressWarnings({ "unused", "serial" }) +public class VerifyClientVersionResp implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("VerifyClientVersionResp"); + private static final TField ERROR_CODE_FIELD_DESC = new TField("error_code", TType.I32, (short)1); + private static final TField ERROR_MSG_FIELD_DESC = new TField("error_msg", TType.STRING, (short)2); + + /** + * + * @see com.vesoft.nebula.ErrorCode + */ + public com.vesoft.nebula.ErrorCode error_code; + public byte[] error_msg; + public static final int ERROR_CODE = 1; + public static final int ERROR_MSG = 2; + + // isset id assignments + + public static final Map metaDataMap; + + static { + Map tmpMetaDataMap = new HashMap(); + tmpMetaDataMap.put(ERROR_CODE, new FieldMetaData("error_code", TFieldRequirementType.REQUIRED, + new FieldValueMetaData(TType.I32))); + tmpMetaDataMap.put(ERROR_MSG, new FieldMetaData("error_msg", TFieldRequirementType.OPTIONAL, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(VerifyClientVersionResp.class, metaDataMap); + } + + public VerifyClientVersionResp() { + } + + public VerifyClientVersionResp( + com.vesoft.nebula.ErrorCode error_code) { + this(); + this.error_code = error_code; + } + + public VerifyClientVersionResp( + com.vesoft.nebula.ErrorCode error_code, + byte[] error_msg) { + this(); + this.error_code = error_code; + this.error_msg = error_msg; + } + + public static class Builder { + private com.vesoft.nebula.ErrorCode error_code; + private byte[] error_msg; + + public Builder() { + } + + public Builder setError_code(final com.vesoft.nebula.ErrorCode error_code) { + this.error_code = error_code; + return this; + } + + public Builder setError_msg(final byte[] error_msg) { + this.error_msg = error_msg; + return this; + } + + public VerifyClientVersionResp build() { + VerifyClientVersionResp result = new VerifyClientVersionResp(); + result.setError_code(this.error_code); + result.setError_msg(this.error_msg); + return result; + } + } + + public static Builder builder() { + return new Builder(); + } + + /** + * Performs a deep copy on other. + */ + public VerifyClientVersionResp(VerifyClientVersionResp other) { + if (other.isSetError_code()) { + this.error_code = TBaseHelper.deepCopy(other.error_code); + } + if (other.isSetError_msg()) { + this.error_msg = TBaseHelper.deepCopy(other.error_msg); + } + } + + public VerifyClientVersionResp deepCopy() { + return new VerifyClientVersionResp(this); + } + + /** + * + * @see com.vesoft.nebula.ErrorCode + */ + public com.vesoft.nebula.ErrorCode getError_code() { + return this.error_code; + } + + /** + * + * @see com.vesoft.nebula.ErrorCode + */ + public VerifyClientVersionResp setError_code(com.vesoft.nebula.ErrorCode error_code) { + this.error_code = error_code; + return this; + } + + public void unsetError_code() { + this.error_code = null; + } + + // Returns true if field error_code is set (has been assigned a value) and false otherwise + public boolean isSetError_code() { + return this.error_code != null; + } + + public void setError_codeIsSet(boolean __value) { + if (!__value) { + this.error_code = null; + } + } + + public byte[] getError_msg() { + return this.error_msg; + } + + public VerifyClientVersionResp setError_msg(byte[] error_msg) { + this.error_msg = error_msg; + return this; + } + + public void unsetError_msg() { + this.error_msg = null; + } + + // Returns true if field error_msg is set (has been assigned a value) and false otherwise + public boolean isSetError_msg() { + return this.error_msg != null; + } + + public void setError_msgIsSet(boolean __value) { + if (!__value) { + this.error_msg = null; + } + } + + public void setFieldValue(int fieldID, Object __value) { + switch (fieldID) { + case ERROR_CODE: + if (__value == null) { + unsetError_code(); + } else { + setError_code((com.vesoft.nebula.ErrorCode)__value); + } + break; + + case ERROR_MSG: + if (__value == null) { + unsetError_msg(); + } else { + setError_msg((byte[])__value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case ERROR_CODE: + return getError_code(); + + case ERROR_MSG: + return getError_msg(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object _that) { + if (_that == null) + return false; + if (this == _that) + return true; + if (!(_that instanceof VerifyClientVersionResp)) + return false; + VerifyClientVersionResp that = (VerifyClientVersionResp)_that; + + if (!TBaseHelper.equalsNobinary(this.isSetError_code(), that.isSetError_code(), this.error_code, that.error_code)) { return false; } + + if (!TBaseHelper.equalsSlow(this.isSetError_msg(), that.isSetError_msg(), this.error_msg, that.error_msg)) { return false; } + + return true; + } + + @Override + public int hashCode() { + return Arrays.deepHashCode(new Object[] {error_code, error_msg}); + } + + @Override + public int compareTo(VerifyClientVersionResp other) { + if (other == null) { + // See java.lang.Comparable docs + throw new NullPointerException(); + } + + if (other == this) { + return 0; + } + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetError_code()).compareTo(other.isSetError_code()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(error_code, other.error_code); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = Boolean.valueOf(isSetError_msg()).compareTo(other.isSetError_msg()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(error_msg, other.error_msg); + if (lastComparison != 0) { + return lastComparison; + } + return 0; + } + + public void read(TProtocol iprot) throws TException { + TField __field; + iprot.readStructBegin(metaDataMap); + while (true) + { + __field = iprot.readFieldBegin(); + if (__field.type == TType.STOP) { + break; + } + switch (__field.id) + { + case ERROR_CODE: + if (__field.type == TType.I32) { + this.error_code = com.vesoft.nebula.ErrorCode.findByValue(iprot.readI32()); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + case ERROR_MSG: + if (__field.type == TType.STRING) { + this.error_msg = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + default: + TProtocolUtil.skip(iprot, __field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.error_code != null) { + oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC); + oprot.writeI32(this.error_code == null ? 0 : this.error_code.getValue()); + oprot.writeFieldEnd(); + } + if (this.error_msg != null) { + if (isSetError_msg()) { + oprot.writeFieldBegin(ERROR_MSG_FIELD_DESC); + oprot.writeBinary(this.error_msg); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + return toString(1, true); + } + + @Override + public String toString(int indent, boolean prettyPrint) { + String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; + String newLine = prettyPrint ? "\n" : ""; + String space = prettyPrint ? " " : ""; + StringBuilder sb = new StringBuilder("VerifyClientVersionResp"); + sb.append(space); + sb.append("("); + sb.append(newLine); + boolean first = true; + + sb.append(indentStr); + sb.append("error_code"); + sb.append(space); + sb.append(":").append(space); + if (this.getError_code() == null) { + sb.append("null"); + } else { + String error_code_name = this.getError_code() == null ? "null" : this.getError_code().name(); + if (error_code_name != null) { + sb.append(error_code_name); + sb.append(" ("); + } + sb.append(this.getError_code()); + if (error_code_name != null) { + sb.append(")"); + } + } + first = false; + if (isSetError_msg()) + { + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("error_msg"); + sb.append(space); + sb.append(":").append(space); + if (this.getError_msg() == null) { + sb.append("null"); + } else { + int __error_msg_size = Math.min(this.getError_msg().length, 128); + for (int i = 0; i < __error_msg_size; i++) { + if (i != 0) sb.append(" "); + sb.append(Integer.toHexString(this.getError_msg()[i]).length() > 1 ? Integer.toHexString(this.getError_msg()[i]).substring(Integer.toHexString(this.getError_msg()[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.getError_msg()[i]).toUpperCase()); + } + if (this.getError_msg().length > 128) sb.append(" ..."); + } + first = false; + } + sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + if (error_code == null) { + throw new TProtocolException(TProtocolException.MISSING_REQUIRED_FIELD, "Required field 'error_code' was not present! Struct: " + toString()); + } + } + +} + diff --git a/client/src/main/generated/com/vesoft/nebula/meta/ColumnTypeDef.java b/client/src/main/generated/com/vesoft/nebula/meta/ColumnTypeDef.java index e8a990f60..48b144908 100644 --- a/client/src/main/generated/com/vesoft/nebula/meta/ColumnTypeDef.java +++ b/client/src/main/generated/com/vesoft/nebula/meta/ColumnTypeDef.java @@ -28,6 +28,7 @@ public class ColumnTypeDef implements TBase, java.io.Serializable, Cloneable, Co private static final TStruct STRUCT_DESC = new TStruct("ColumnTypeDef"); private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)1); private static final TField TYPE_LENGTH_FIELD_DESC = new TField("type_length", TType.I16, (short)2); + private static final TField GEO_SHAPE_FIELD_DESC = new TField("geo_shape", TType.I32, (short)3); /** * @@ -35,8 +36,14 @@ public class ColumnTypeDef implements TBase, java.io.Serializable, Cloneable, Co */ public PropertyType type; public short type_length; + /** + * + * @see GeoShape + */ + public GeoShape geo_shape; public static final int TYPE = 1; public static final int TYPE_LENGTH = 2; + public static final int GEO_SHAPE = 3; // isset id assignments private static final int __TYPE_LENGTH_ISSET_ID = 0; @@ -50,6 +57,8 @@ public class ColumnTypeDef implements TBase, java.io.Serializable, Cloneable, Co new FieldValueMetaData(TType.I32))); tmpMetaDataMap.put(TYPE_LENGTH, new FieldMetaData("type_length", TFieldRequirementType.OPTIONAL, new FieldValueMetaData(TType.I16))); + tmpMetaDataMap.put(GEO_SHAPE, new FieldMetaData("geo_shape", TFieldRequirementType.OPTIONAL, + new FieldValueMetaData(TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -70,16 +79,19 @@ public ColumnTypeDef( public ColumnTypeDef( PropertyType type, - short type_length) { + short type_length, + GeoShape geo_shape) { this(); this.type = type; this.type_length = type_length; setType_lengthIsSet(true); + this.geo_shape = geo_shape; } public static class Builder { private PropertyType type; private short type_length; + private GeoShape geo_shape; BitSet __optional_isset = new BitSet(1); @@ -97,12 +109,18 @@ public Builder setType_length(final short type_length) { return this; } + public Builder setGeo_shape(final GeoShape geo_shape) { + this.geo_shape = geo_shape; + return this; + } + public ColumnTypeDef build() { ColumnTypeDef result = new ColumnTypeDef(); result.setType(this.type); if (__optional_isset.get(__TYPE_LENGTH_ISSET_ID)) { result.setType_length(this.type_length); } + result.setGeo_shape(this.geo_shape); return result; } } @@ -121,6 +139,9 @@ public ColumnTypeDef(ColumnTypeDef other) { this.type = TBaseHelper.deepCopy(other.type); } this.type_length = TBaseHelper.deepCopy(other.type_length); + if (other.isSetGeo_shape()) { + this.geo_shape = TBaseHelper.deepCopy(other.geo_shape); + } } public ColumnTypeDef deepCopy() { @@ -182,6 +203,38 @@ public void setType_lengthIsSet(boolean __value) { __isset_bit_vector.set(__TYPE_LENGTH_ISSET_ID, __value); } + /** + * + * @see GeoShape + */ + public GeoShape getGeo_shape() { + return this.geo_shape; + } + + /** + * + * @see GeoShape + */ + public ColumnTypeDef setGeo_shape(GeoShape geo_shape) { + this.geo_shape = geo_shape; + return this; + } + + public void unsetGeo_shape() { + this.geo_shape = null; + } + + // Returns true if field geo_shape is set (has been assigned a value) and false otherwise + public boolean isSetGeo_shape() { + return this.geo_shape != null; + } + + public void setGeo_shapeIsSet(boolean __value) { + if (!__value) { + this.geo_shape = null; + } + } + public void setFieldValue(int fieldID, Object __value) { switch (fieldID) { case TYPE: @@ -200,6 +253,14 @@ public void setFieldValue(int fieldID, Object __value) { } break; + case GEO_SHAPE: + if (__value == null) { + unsetGeo_shape(); + } else { + setGeo_shape((GeoShape)__value); + } + break; + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -213,6 +274,9 @@ public Object getFieldValue(int fieldID) { case TYPE_LENGTH: return new Short(getType_length()); + case GEO_SHAPE: + return getGeo_shape(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -232,12 +296,14 @@ public boolean equals(Object _that) { if (!TBaseHelper.equalsNobinary(this.isSetType_length(), that.isSetType_length(), this.type_length, that.type_length)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetGeo_shape(), that.isSetGeo_shape(), this.geo_shape, that.geo_shape)) { return false; } + return true; } @Override public int hashCode() { - return Arrays.deepHashCode(new Object[] {type, type_length}); + return Arrays.deepHashCode(new Object[] {type, type_length, geo_shape}); } @Override @@ -268,6 +334,14 @@ public int compareTo(ColumnTypeDef other) { if (lastComparison != 0) { return lastComparison; } + lastComparison = Boolean.valueOf(isSetGeo_shape()).compareTo(other.isSetGeo_shape()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(geo_shape, other.geo_shape); + if (lastComparison != 0) { + return lastComparison; + } return 0; } @@ -297,6 +371,13 @@ public void read(TProtocol iprot) throws TException { TProtocolUtil.skip(iprot, __field.type); } break; + case GEO_SHAPE: + if (__field.type == TType.I32) { + this.geo_shape = GeoShape.findByValue(iprot.readI32()); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; default: TProtocolUtil.skip(iprot, __field.type); break; @@ -324,6 +405,13 @@ public void write(TProtocol oprot) throws TException { oprot.writeI16(this.type_length); oprot.writeFieldEnd(); } + if (this.geo_shape != null) { + if (isSetGeo_shape()) { + oprot.writeFieldBegin(GEO_SHAPE_FIELD_DESC); + oprot.writeI32(this.geo_shape == null ? 0 : this.geo_shape.getValue()); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -372,6 +460,28 @@ public String toString(int indent, boolean prettyPrint) { sb.append(TBaseHelper.toString(this.getType_length(), indent + 1, prettyPrint)); first = false; } + if (isSetGeo_shape()) + { + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("geo_shape"); + sb.append(space); + sb.append(":").append(space); + if (this.getGeo_shape() == null) { + sb.append("null"); + } else { + String geo_shape_name = this.getGeo_shape() == null ? "null" : this.getGeo_shape().name(); + if (geo_shape_name != null) { + sb.append(geo_shape_name); + sb.append(" ("); + } + sb.append(this.getGeo_shape()); + if (geo_shape_name != null) { + sb.append(")"); + } + } + first = false; + } sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); sb.append(")"); return sb.toString(); diff --git a/client/src/main/generated/com/vesoft/nebula/meta/GeoShape.java b/client/src/main/generated/com/vesoft/nebula/meta/GeoShape.java new file mode 100644 index 000000000..6110f3ec0 --- /dev/null +++ b/client/src/main/generated/com/vesoft/nebula/meta/GeoShape.java @@ -0,0 +1,52 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.vesoft.nebula.meta; + + +import com.facebook.thrift.IntRangeSet; +import java.util.Map; +import java.util.HashMap; + +@SuppressWarnings({ "unused" }) +public enum GeoShape implements com.facebook.thrift.TEnum { + ANY(0), + POINT(1), + LINESTRING(2), + POLYGON(3); + + private final int value; + + private GeoShape(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 GeoShape findByValue(int value) { + switch (value) { + case 0: + return ANY; + case 1: + return POINT; + case 2: + return LINESTRING; + case 3: + return POLYGON; + default: + return null; + } + } +} diff --git a/client/src/main/generated/com/vesoft/nebula/meta/MetaService.java b/client/src/main/generated/com/vesoft/nebula/meta/MetaService.java index 5f5fa84ac..818acaa9e 100644 --- a/client/src/main/generated/com/vesoft/nebula/meta/MetaService.java +++ b/client/src/main/generated/com/vesoft/nebula/meta/MetaService.java @@ -209,6 +209,8 @@ public interface Iface { public GetMetaDirInfoResp getMetaDirInfo(GetMetaDirInfoReq req) throws TException; + public VerifyClientVersionResp verifyClientVersion(VerifyClientVersionReq req) throws TException; + } public interface AsyncIface { @@ -391,6 +393,8 @@ public interface AsyncIface { public void getMetaDirInfo(GetMetaDirInfoReq req, AsyncMethodCallback resultHandler) throws TException; + public void verifyClientVersion(VerifyClientVersionReq req, AsyncMethodCallback resultHandler) throws TException; + } public static class Client extends EventHandlerBase implements Iface, TClientIf { @@ -4427,6 +4431,51 @@ public GetMetaDirInfoResp recv_getMetaDirInfo() throws TException throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMetaDirInfo failed: unknown result"); } + public VerifyClientVersionResp verifyClientVersion(VerifyClientVersionReq req) throws TException + { + ContextStack ctx = getContextStack("MetaService.verifyClientVersion", null); + this.setContextStack(ctx); + send_verifyClientVersion(req); + return recv_verifyClientVersion(); + } + + public void send_verifyClientVersion(VerifyClientVersionReq req) throws TException + { + ContextStack ctx = this.getContextStack(); + super.preWrite(ctx, "MetaService.verifyClientVersion", null); + oprot_.writeMessageBegin(new TMessage("verifyClientVersion", TMessageType.CALL, seqid_)); + verifyClientVersion_args args = new verifyClientVersion_args(); + args.req = req; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + super.postWrite(ctx, "MetaService.verifyClientVersion", args); + return; + } + + public VerifyClientVersionResp recv_verifyClientVersion() throws TException + { + ContextStack ctx = super.getContextStack(); + long bytes; + TMessageType mtype; + super.preRead(ctx, "MetaService.verifyClientVersion"); + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + verifyClientVersion_result result = new verifyClientVersion_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + super.postRead(ctx, "MetaService.verifyClientVersion", result); + + if (result.isSetSuccess()) { + return result.success; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "verifyClientVersion failed: unknown result"); + } + } public static class AsyncClient extends TAsyncClient implements AsyncIface { public static class Factory implements TAsyncClientFactory { @@ -4445,17 +4494,17 @@ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientM super(protocolFactory, clientManager, transport); } - public void createSpace(CreateSpaceReq req, AsyncMethodCallback resultHandler425) throws TException { + public void createSpace(CreateSpaceReq req, AsyncMethodCallback resultHandler426) throws TException { checkReady(); - createSpace_call method_call = new createSpace_call(req, resultHandler425, this, ___protocolFactory, ___transport); + createSpace_call method_call = new createSpace_call(req, resultHandler426, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createSpace_call extends TAsyncMethodCall { private CreateSpaceReq req; - public createSpace_call(CreateSpaceReq req, AsyncMethodCallback resultHandler426, TAsyncClient client422, TProtocolFactory protocolFactory423, TNonblockingTransport transport424) throws TException { - super(client422, protocolFactory423, transport424, resultHandler426, false); + public createSpace_call(CreateSpaceReq req, AsyncMethodCallback resultHandler427, TAsyncClient client423, TProtocolFactory protocolFactory424, TNonblockingTransport transport425) throws TException { + super(client423, protocolFactory424, transport425, resultHandler427, false); this.req = req; } @@ -4477,17 +4526,17 @@ public ExecResp getResult() throws TException { } } - public void dropSpace(DropSpaceReq req, AsyncMethodCallback resultHandler430) throws TException { + public void dropSpace(DropSpaceReq req, AsyncMethodCallback resultHandler431) throws TException { checkReady(); - dropSpace_call method_call = new dropSpace_call(req, resultHandler430, this, ___protocolFactory, ___transport); + dropSpace_call method_call = new dropSpace_call(req, resultHandler431, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropSpace_call extends TAsyncMethodCall { private DropSpaceReq req; - public dropSpace_call(DropSpaceReq req, AsyncMethodCallback resultHandler431, TAsyncClient client427, TProtocolFactory protocolFactory428, TNonblockingTransport transport429) throws TException { - super(client427, protocolFactory428, transport429, resultHandler431, false); + public dropSpace_call(DropSpaceReq req, AsyncMethodCallback resultHandler432, TAsyncClient client428, TProtocolFactory protocolFactory429, TNonblockingTransport transport430) throws TException { + super(client428, protocolFactory429, transport430, resultHandler432, false); this.req = req; } @@ -4509,17 +4558,17 @@ public ExecResp getResult() throws TException { } } - public void getSpace(GetSpaceReq req, AsyncMethodCallback resultHandler435) throws TException { + public void getSpace(GetSpaceReq req, AsyncMethodCallback resultHandler436) throws TException { checkReady(); - getSpace_call method_call = new getSpace_call(req, resultHandler435, this, ___protocolFactory, ___transport); + getSpace_call method_call = new getSpace_call(req, resultHandler436, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getSpace_call extends TAsyncMethodCall { private GetSpaceReq req; - public getSpace_call(GetSpaceReq req, AsyncMethodCallback resultHandler436, TAsyncClient client432, TProtocolFactory protocolFactory433, TNonblockingTransport transport434) throws TException { - super(client432, protocolFactory433, transport434, resultHandler436, false); + public getSpace_call(GetSpaceReq req, AsyncMethodCallback resultHandler437, TAsyncClient client433, TProtocolFactory protocolFactory434, TNonblockingTransport transport435) throws TException { + super(client433, protocolFactory434, transport435, resultHandler437, false); this.req = req; } @@ -4541,17 +4590,17 @@ public GetSpaceResp getResult() throws TException { } } - public void listSpaces(ListSpacesReq req, AsyncMethodCallback resultHandler440) throws TException { + public void listSpaces(ListSpacesReq req, AsyncMethodCallback resultHandler441) throws TException { checkReady(); - listSpaces_call method_call = new listSpaces_call(req, resultHandler440, this, ___protocolFactory, ___transport); + listSpaces_call method_call = new listSpaces_call(req, resultHandler441, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listSpaces_call extends TAsyncMethodCall { private ListSpacesReq req; - public listSpaces_call(ListSpacesReq req, AsyncMethodCallback resultHandler441, TAsyncClient client437, TProtocolFactory protocolFactory438, TNonblockingTransport transport439) throws TException { - super(client437, protocolFactory438, transport439, resultHandler441, false); + public listSpaces_call(ListSpacesReq req, AsyncMethodCallback resultHandler442, TAsyncClient client438, TProtocolFactory protocolFactory439, TNonblockingTransport transport440) throws TException { + super(client438, protocolFactory439, transport440, resultHandler442, false); this.req = req; } @@ -4573,17 +4622,17 @@ public ListSpacesResp getResult() throws TException { } } - public void createSpaceAs(CreateSpaceAsReq req, AsyncMethodCallback resultHandler445) throws TException { + public void createSpaceAs(CreateSpaceAsReq req, AsyncMethodCallback resultHandler446) throws TException { checkReady(); - createSpaceAs_call method_call = new createSpaceAs_call(req, resultHandler445, this, ___protocolFactory, ___transport); + createSpaceAs_call method_call = new createSpaceAs_call(req, resultHandler446, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createSpaceAs_call extends TAsyncMethodCall { private CreateSpaceAsReq req; - public createSpaceAs_call(CreateSpaceAsReq req, AsyncMethodCallback resultHandler446, TAsyncClient client442, TProtocolFactory protocolFactory443, TNonblockingTransport transport444) throws TException { - super(client442, protocolFactory443, transport444, resultHandler446, false); + public createSpaceAs_call(CreateSpaceAsReq req, AsyncMethodCallback resultHandler447, TAsyncClient client443, TProtocolFactory protocolFactory444, TNonblockingTransport transport445) throws TException { + super(client443, protocolFactory444, transport445, resultHandler447, false); this.req = req; } @@ -4605,17 +4654,17 @@ public ExecResp getResult() throws TException { } } - public void createTag(CreateTagReq req, AsyncMethodCallback resultHandler450) throws TException { + public void createTag(CreateTagReq req, AsyncMethodCallback resultHandler451) throws TException { checkReady(); - createTag_call method_call = new createTag_call(req, resultHandler450, this, ___protocolFactory, ___transport); + createTag_call method_call = new createTag_call(req, resultHandler451, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createTag_call extends TAsyncMethodCall { private CreateTagReq req; - public createTag_call(CreateTagReq req, AsyncMethodCallback resultHandler451, TAsyncClient client447, TProtocolFactory protocolFactory448, TNonblockingTransport transport449) throws TException { - super(client447, protocolFactory448, transport449, resultHandler451, false); + public createTag_call(CreateTagReq req, AsyncMethodCallback resultHandler452, TAsyncClient client448, TProtocolFactory protocolFactory449, TNonblockingTransport transport450) throws TException { + super(client448, protocolFactory449, transport450, resultHandler452, false); this.req = req; } @@ -4637,17 +4686,17 @@ public ExecResp getResult() throws TException { } } - public void alterTag(AlterTagReq req, AsyncMethodCallback resultHandler455) throws TException { + public void alterTag(AlterTagReq req, AsyncMethodCallback resultHandler456) throws TException { checkReady(); - alterTag_call method_call = new alterTag_call(req, resultHandler455, this, ___protocolFactory, ___transport); + alterTag_call method_call = new alterTag_call(req, resultHandler456, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class alterTag_call extends TAsyncMethodCall { private AlterTagReq req; - public alterTag_call(AlterTagReq req, AsyncMethodCallback resultHandler456, TAsyncClient client452, TProtocolFactory protocolFactory453, TNonblockingTransport transport454) throws TException { - super(client452, protocolFactory453, transport454, resultHandler456, false); + public alterTag_call(AlterTagReq req, AsyncMethodCallback resultHandler457, TAsyncClient client453, TProtocolFactory protocolFactory454, TNonblockingTransport transport455) throws TException { + super(client453, protocolFactory454, transport455, resultHandler457, false); this.req = req; } @@ -4669,17 +4718,17 @@ public ExecResp getResult() throws TException { } } - public void dropTag(DropTagReq req, AsyncMethodCallback resultHandler460) throws TException { + public void dropTag(DropTagReq req, AsyncMethodCallback resultHandler461) throws TException { checkReady(); - dropTag_call method_call = new dropTag_call(req, resultHandler460, this, ___protocolFactory, ___transport); + dropTag_call method_call = new dropTag_call(req, resultHandler461, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropTag_call extends TAsyncMethodCall { private DropTagReq req; - public dropTag_call(DropTagReq req, AsyncMethodCallback resultHandler461, TAsyncClient client457, TProtocolFactory protocolFactory458, TNonblockingTransport transport459) throws TException { - super(client457, protocolFactory458, transport459, resultHandler461, false); + public dropTag_call(DropTagReq req, AsyncMethodCallback resultHandler462, TAsyncClient client458, TProtocolFactory protocolFactory459, TNonblockingTransport transport460) throws TException { + super(client458, protocolFactory459, transport460, resultHandler462, false); this.req = req; } @@ -4701,17 +4750,17 @@ public ExecResp getResult() throws TException { } } - public void getTag(GetTagReq req, AsyncMethodCallback resultHandler465) throws TException { + public void getTag(GetTagReq req, AsyncMethodCallback resultHandler466) throws TException { checkReady(); - getTag_call method_call = new getTag_call(req, resultHandler465, this, ___protocolFactory, ___transport); + getTag_call method_call = new getTag_call(req, resultHandler466, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getTag_call extends TAsyncMethodCall { private GetTagReq req; - public getTag_call(GetTagReq req, AsyncMethodCallback resultHandler466, TAsyncClient client462, TProtocolFactory protocolFactory463, TNonblockingTransport transport464) throws TException { - super(client462, protocolFactory463, transport464, resultHandler466, false); + public getTag_call(GetTagReq req, AsyncMethodCallback resultHandler467, TAsyncClient client463, TProtocolFactory protocolFactory464, TNonblockingTransport transport465) throws TException { + super(client463, protocolFactory464, transport465, resultHandler467, false); this.req = req; } @@ -4733,17 +4782,17 @@ public GetTagResp getResult() throws TException { } } - public void listTags(ListTagsReq req, AsyncMethodCallback resultHandler470) throws TException { + public void listTags(ListTagsReq req, AsyncMethodCallback resultHandler471) throws TException { checkReady(); - listTags_call method_call = new listTags_call(req, resultHandler470, this, ___protocolFactory, ___transport); + listTags_call method_call = new listTags_call(req, resultHandler471, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listTags_call extends TAsyncMethodCall { private ListTagsReq req; - public listTags_call(ListTagsReq req, AsyncMethodCallback resultHandler471, TAsyncClient client467, TProtocolFactory protocolFactory468, TNonblockingTransport transport469) throws TException { - super(client467, protocolFactory468, transport469, resultHandler471, false); + public listTags_call(ListTagsReq req, AsyncMethodCallback resultHandler472, TAsyncClient client468, TProtocolFactory protocolFactory469, TNonblockingTransport transport470) throws TException { + super(client468, protocolFactory469, transport470, resultHandler472, false); this.req = req; } @@ -4765,17 +4814,17 @@ public ListTagsResp getResult() throws TException { } } - public void createEdge(CreateEdgeReq req, AsyncMethodCallback resultHandler475) throws TException { + public void createEdge(CreateEdgeReq req, AsyncMethodCallback resultHandler476) throws TException { checkReady(); - createEdge_call method_call = new createEdge_call(req, resultHandler475, this, ___protocolFactory, ___transport); + createEdge_call method_call = new createEdge_call(req, resultHandler476, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createEdge_call extends TAsyncMethodCall { private CreateEdgeReq req; - public createEdge_call(CreateEdgeReq req, AsyncMethodCallback resultHandler476, TAsyncClient client472, TProtocolFactory protocolFactory473, TNonblockingTransport transport474) throws TException { - super(client472, protocolFactory473, transport474, resultHandler476, false); + public createEdge_call(CreateEdgeReq req, AsyncMethodCallback resultHandler477, TAsyncClient client473, TProtocolFactory protocolFactory474, TNonblockingTransport transport475) throws TException { + super(client473, protocolFactory474, transport475, resultHandler477, false); this.req = req; } @@ -4797,17 +4846,17 @@ public ExecResp getResult() throws TException { } } - public void alterEdge(AlterEdgeReq req, AsyncMethodCallback resultHandler480) throws TException { + public void alterEdge(AlterEdgeReq req, AsyncMethodCallback resultHandler481) throws TException { checkReady(); - alterEdge_call method_call = new alterEdge_call(req, resultHandler480, this, ___protocolFactory, ___transport); + alterEdge_call method_call = new alterEdge_call(req, resultHandler481, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class alterEdge_call extends TAsyncMethodCall { private AlterEdgeReq req; - public alterEdge_call(AlterEdgeReq req, AsyncMethodCallback resultHandler481, TAsyncClient client477, TProtocolFactory protocolFactory478, TNonblockingTransport transport479) throws TException { - super(client477, protocolFactory478, transport479, resultHandler481, false); + public alterEdge_call(AlterEdgeReq req, AsyncMethodCallback resultHandler482, TAsyncClient client478, TProtocolFactory protocolFactory479, TNonblockingTransport transport480) throws TException { + super(client478, protocolFactory479, transport480, resultHandler482, false); this.req = req; } @@ -4829,17 +4878,17 @@ public ExecResp getResult() throws TException { } } - public void dropEdge(DropEdgeReq req, AsyncMethodCallback resultHandler485) throws TException { + public void dropEdge(DropEdgeReq req, AsyncMethodCallback resultHandler486) throws TException { checkReady(); - dropEdge_call method_call = new dropEdge_call(req, resultHandler485, this, ___protocolFactory, ___transport); + dropEdge_call method_call = new dropEdge_call(req, resultHandler486, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropEdge_call extends TAsyncMethodCall { private DropEdgeReq req; - public dropEdge_call(DropEdgeReq req, AsyncMethodCallback resultHandler486, TAsyncClient client482, TProtocolFactory protocolFactory483, TNonblockingTransport transport484) throws TException { - super(client482, protocolFactory483, transport484, resultHandler486, false); + public dropEdge_call(DropEdgeReq req, AsyncMethodCallback resultHandler487, TAsyncClient client483, TProtocolFactory protocolFactory484, TNonblockingTransport transport485) throws TException { + super(client483, protocolFactory484, transport485, resultHandler487, false); this.req = req; } @@ -4861,17 +4910,17 @@ public ExecResp getResult() throws TException { } } - public void getEdge(GetEdgeReq req, AsyncMethodCallback resultHandler490) throws TException { + public void getEdge(GetEdgeReq req, AsyncMethodCallback resultHandler491) throws TException { checkReady(); - getEdge_call method_call = new getEdge_call(req, resultHandler490, this, ___protocolFactory, ___transport); + getEdge_call method_call = new getEdge_call(req, resultHandler491, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getEdge_call extends TAsyncMethodCall { private GetEdgeReq req; - public getEdge_call(GetEdgeReq req, AsyncMethodCallback resultHandler491, TAsyncClient client487, TProtocolFactory protocolFactory488, TNonblockingTransport transport489) throws TException { - super(client487, protocolFactory488, transport489, resultHandler491, false); + public getEdge_call(GetEdgeReq req, AsyncMethodCallback resultHandler492, TAsyncClient client488, TProtocolFactory protocolFactory489, TNonblockingTransport transport490) throws TException { + super(client488, protocolFactory489, transport490, resultHandler492, false); this.req = req; } @@ -4893,17 +4942,17 @@ public GetEdgeResp getResult() throws TException { } } - public void listEdges(ListEdgesReq req, AsyncMethodCallback resultHandler495) throws TException { + public void listEdges(ListEdgesReq req, AsyncMethodCallback resultHandler496) throws TException { checkReady(); - listEdges_call method_call = new listEdges_call(req, resultHandler495, this, ___protocolFactory, ___transport); + listEdges_call method_call = new listEdges_call(req, resultHandler496, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listEdges_call extends TAsyncMethodCall { private ListEdgesReq req; - public listEdges_call(ListEdgesReq req, AsyncMethodCallback resultHandler496, TAsyncClient client492, TProtocolFactory protocolFactory493, TNonblockingTransport transport494) throws TException { - super(client492, protocolFactory493, transport494, resultHandler496, false); + public listEdges_call(ListEdgesReq req, AsyncMethodCallback resultHandler497, TAsyncClient client493, TProtocolFactory protocolFactory494, TNonblockingTransport transport495) throws TException { + super(client493, protocolFactory494, transport495, resultHandler497, false); this.req = req; } @@ -4925,17 +4974,17 @@ public ListEdgesResp getResult() throws TException { } } - public void listHosts(ListHostsReq req, AsyncMethodCallback resultHandler500) throws TException { + public void listHosts(ListHostsReq req, AsyncMethodCallback resultHandler501) throws TException { checkReady(); - listHosts_call method_call = new listHosts_call(req, resultHandler500, this, ___protocolFactory, ___transport); + listHosts_call method_call = new listHosts_call(req, resultHandler501, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listHosts_call extends TAsyncMethodCall { private ListHostsReq req; - public listHosts_call(ListHostsReq req, AsyncMethodCallback resultHandler501, TAsyncClient client497, TProtocolFactory protocolFactory498, TNonblockingTransport transport499) throws TException { - super(client497, protocolFactory498, transport499, resultHandler501, false); + public listHosts_call(ListHostsReq req, AsyncMethodCallback resultHandler502, TAsyncClient client498, TProtocolFactory protocolFactory499, TNonblockingTransport transport500) throws TException { + super(client498, protocolFactory499, transport500, resultHandler502, false); this.req = req; } @@ -4957,17 +5006,17 @@ public ListHostsResp getResult() throws TException { } } - public void getPartsAlloc(GetPartsAllocReq req, AsyncMethodCallback resultHandler505) throws TException { + public void getPartsAlloc(GetPartsAllocReq req, AsyncMethodCallback resultHandler506) throws TException { checkReady(); - getPartsAlloc_call method_call = new getPartsAlloc_call(req, resultHandler505, this, ___protocolFactory, ___transport); + getPartsAlloc_call method_call = new getPartsAlloc_call(req, resultHandler506, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getPartsAlloc_call extends TAsyncMethodCall { private GetPartsAllocReq req; - public getPartsAlloc_call(GetPartsAllocReq req, AsyncMethodCallback resultHandler506, TAsyncClient client502, TProtocolFactory protocolFactory503, TNonblockingTransport transport504) throws TException { - super(client502, protocolFactory503, transport504, resultHandler506, false); + public getPartsAlloc_call(GetPartsAllocReq req, AsyncMethodCallback resultHandler507, TAsyncClient client503, TProtocolFactory protocolFactory504, TNonblockingTransport transport505) throws TException { + super(client503, protocolFactory504, transport505, resultHandler507, false); this.req = req; } @@ -4989,17 +5038,17 @@ public GetPartsAllocResp getResult() throws TException { } } - public void listParts(ListPartsReq req, AsyncMethodCallback resultHandler510) throws TException { + public void listParts(ListPartsReq req, AsyncMethodCallback resultHandler511) throws TException { checkReady(); - listParts_call method_call = new listParts_call(req, resultHandler510, this, ___protocolFactory, ___transport); + listParts_call method_call = new listParts_call(req, resultHandler511, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listParts_call extends TAsyncMethodCall { private ListPartsReq req; - public listParts_call(ListPartsReq req, AsyncMethodCallback resultHandler511, TAsyncClient client507, TProtocolFactory protocolFactory508, TNonblockingTransport transport509) throws TException { - super(client507, protocolFactory508, transport509, resultHandler511, false); + public listParts_call(ListPartsReq req, AsyncMethodCallback resultHandler512, TAsyncClient client508, TProtocolFactory protocolFactory509, TNonblockingTransport transport510) throws TException { + super(client508, protocolFactory509, transport510, resultHandler512, false); this.req = req; } @@ -5021,17 +5070,17 @@ public ListPartsResp getResult() throws TException { } } - public void multiPut(MultiPutReq req, AsyncMethodCallback resultHandler515) throws TException { + public void multiPut(MultiPutReq req, AsyncMethodCallback resultHandler516) throws TException { checkReady(); - multiPut_call method_call = new multiPut_call(req, resultHandler515, this, ___protocolFactory, ___transport); + multiPut_call method_call = new multiPut_call(req, resultHandler516, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class multiPut_call extends TAsyncMethodCall { private MultiPutReq req; - public multiPut_call(MultiPutReq req, AsyncMethodCallback resultHandler516, TAsyncClient client512, TProtocolFactory protocolFactory513, TNonblockingTransport transport514) throws TException { - super(client512, protocolFactory513, transport514, resultHandler516, false); + public multiPut_call(MultiPutReq req, AsyncMethodCallback resultHandler517, TAsyncClient client513, TProtocolFactory protocolFactory514, TNonblockingTransport transport515) throws TException { + super(client513, protocolFactory514, transport515, resultHandler517, false); this.req = req; } @@ -5053,17 +5102,17 @@ public ExecResp getResult() throws TException { } } - public void get(GetReq req, AsyncMethodCallback resultHandler520) throws TException { + public void get(GetReq req, AsyncMethodCallback resultHandler521) throws TException { checkReady(); - get_call method_call = new get_call(req, resultHandler520, this, ___protocolFactory, ___transport); + get_call method_call = new get_call(req, resultHandler521, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_call extends TAsyncMethodCall { private GetReq req; - public get_call(GetReq req, AsyncMethodCallback resultHandler521, TAsyncClient client517, TProtocolFactory protocolFactory518, TNonblockingTransport transport519) throws TException { - super(client517, protocolFactory518, transport519, resultHandler521, false); + public get_call(GetReq req, AsyncMethodCallback resultHandler522, TAsyncClient client518, TProtocolFactory protocolFactory519, TNonblockingTransport transport520) throws TException { + super(client518, protocolFactory519, transport520, resultHandler522, false); this.req = req; } @@ -5085,17 +5134,17 @@ public GetResp getResult() throws TException { } } - public void multiGet(MultiGetReq req, AsyncMethodCallback resultHandler525) throws TException { + public void multiGet(MultiGetReq req, AsyncMethodCallback resultHandler526) throws TException { checkReady(); - multiGet_call method_call = new multiGet_call(req, resultHandler525, this, ___protocolFactory, ___transport); + multiGet_call method_call = new multiGet_call(req, resultHandler526, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class multiGet_call extends TAsyncMethodCall { private MultiGetReq req; - public multiGet_call(MultiGetReq req, AsyncMethodCallback resultHandler526, TAsyncClient client522, TProtocolFactory protocolFactory523, TNonblockingTransport transport524) throws TException { - super(client522, protocolFactory523, transport524, resultHandler526, false); + public multiGet_call(MultiGetReq req, AsyncMethodCallback resultHandler527, TAsyncClient client523, TProtocolFactory protocolFactory524, TNonblockingTransport transport525) throws TException { + super(client523, protocolFactory524, transport525, resultHandler527, false); this.req = req; } @@ -5117,17 +5166,17 @@ public MultiGetResp getResult() throws TException { } } - public void remove(RemoveReq req, AsyncMethodCallback resultHandler530) throws TException { + public void remove(RemoveReq req, AsyncMethodCallback resultHandler531) throws TException { checkReady(); - remove_call method_call = new remove_call(req, resultHandler530, this, ___protocolFactory, ___transport); + remove_call method_call = new remove_call(req, resultHandler531, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class remove_call extends TAsyncMethodCall { private RemoveReq req; - public remove_call(RemoveReq req, AsyncMethodCallback resultHandler531, TAsyncClient client527, TProtocolFactory protocolFactory528, TNonblockingTransport transport529) throws TException { - super(client527, protocolFactory528, transport529, resultHandler531, false); + public remove_call(RemoveReq req, AsyncMethodCallback resultHandler532, TAsyncClient client528, TProtocolFactory protocolFactory529, TNonblockingTransport transport530) throws TException { + super(client528, protocolFactory529, transport530, resultHandler532, false); this.req = req; } @@ -5149,17 +5198,17 @@ public ExecResp getResult() throws TException { } } - public void removeRange(RemoveRangeReq req, AsyncMethodCallback resultHandler535) throws TException { + public void removeRange(RemoveRangeReq req, AsyncMethodCallback resultHandler536) throws TException { checkReady(); - removeRange_call method_call = new removeRange_call(req, resultHandler535, this, ___protocolFactory, ___transport); + removeRange_call method_call = new removeRange_call(req, resultHandler536, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class removeRange_call extends TAsyncMethodCall { private RemoveRangeReq req; - public removeRange_call(RemoveRangeReq req, AsyncMethodCallback resultHandler536, TAsyncClient client532, TProtocolFactory protocolFactory533, TNonblockingTransport transport534) throws TException { - super(client532, protocolFactory533, transport534, resultHandler536, false); + public removeRange_call(RemoveRangeReq req, AsyncMethodCallback resultHandler537, TAsyncClient client533, TProtocolFactory protocolFactory534, TNonblockingTransport transport535) throws TException { + super(client533, protocolFactory534, transport535, resultHandler537, false); this.req = req; } @@ -5181,17 +5230,17 @@ public ExecResp getResult() throws TException { } } - public void scan(ScanReq req, AsyncMethodCallback resultHandler540) throws TException { + public void scan(ScanReq req, AsyncMethodCallback resultHandler541) throws TException { checkReady(); - scan_call method_call = new scan_call(req, resultHandler540, this, ___protocolFactory, ___transport); + scan_call method_call = new scan_call(req, resultHandler541, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class scan_call extends TAsyncMethodCall { private ScanReq req; - public scan_call(ScanReq req, AsyncMethodCallback resultHandler541, TAsyncClient client537, TProtocolFactory protocolFactory538, TNonblockingTransport transport539) throws TException { - super(client537, protocolFactory538, transport539, resultHandler541, false); + public scan_call(ScanReq req, AsyncMethodCallback resultHandler542, TAsyncClient client538, TProtocolFactory protocolFactory539, TNonblockingTransport transport540) throws TException { + super(client538, protocolFactory539, transport540, resultHandler542, false); this.req = req; } @@ -5213,17 +5262,17 @@ public ScanResp getResult() throws TException { } } - public void createTagIndex(CreateTagIndexReq req, AsyncMethodCallback resultHandler545) throws TException { + public void createTagIndex(CreateTagIndexReq req, AsyncMethodCallback resultHandler546) throws TException { checkReady(); - createTagIndex_call method_call = new createTagIndex_call(req, resultHandler545, this, ___protocolFactory, ___transport); + createTagIndex_call method_call = new createTagIndex_call(req, resultHandler546, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createTagIndex_call extends TAsyncMethodCall { private CreateTagIndexReq req; - public createTagIndex_call(CreateTagIndexReq req, AsyncMethodCallback resultHandler546, TAsyncClient client542, TProtocolFactory protocolFactory543, TNonblockingTransport transport544) throws TException { - super(client542, protocolFactory543, transport544, resultHandler546, false); + public createTagIndex_call(CreateTagIndexReq req, AsyncMethodCallback resultHandler547, TAsyncClient client543, TProtocolFactory protocolFactory544, TNonblockingTransport transport545) throws TException { + super(client543, protocolFactory544, transport545, resultHandler547, false); this.req = req; } @@ -5245,17 +5294,17 @@ public ExecResp getResult() throws TException { } } - public void dropTagIndex(DropTagIndexReq req, AsyncMethodCallback resultHandler550) throws TException { + public void dropTagIndex(DropTagIndexReq req, AsyncMethodCallback resultHandler551) throws TException { checkReady(); - dropTagIndex_call method_call = new dropTagIndex_call(req, resultHandler550, this, ___protocolFactory, ___transport); + dropTagIndex_call method_call = new dropTagIndex_call(req, resultHandler551, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropTagIndex_call extends TAsyncMethodCall { private DropTagIndexReq req; - public dropTagIndex_call(DropTagIndexReq req, AsyncMethodCallback resultHandler551, TAsyncClient client547, TProtocolFactory protocolFactory548, TNonblockingTransport transport549) throws TException { - super(client547, protocolFactory548, transport549, resultHandler551, false); + public dropTagIndex_call(DropTagIndexReq req, AsyncMethodCallback resultHandler552, TAsyncClient client548, TProtocolFactory protocolFactory549, TNonblockingTransport transport550) throws TException { + super(client548, protocolFactory549, transport550, resultHandler552, false); this.req = req; } @@ -5277,17 +5326,17 @@ public ExecResp getResult() throws TException { } } - public void getTagIndex(GetTagIndexReq req, AsyncMethodCallback resultHandler555) throws TException { + public void getTagIndex(GetTagIndexReq req, AsyncMethodCallback resultHandler556) throws TException { checkReady(); - getTagIndex_call method_call = new getTagIndex_call(req, resultHandler555, this, ___protocolFactory, ___transport); + getTagIndex_call method_call = new getTagIndex_call(req, resultHandler556, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getTagIndex_call extends TAsyncMethodCall { private GetTagIndexReq req; - public getTagIndex_call(GetTagIndexReq req, AsyncMethodCallback resultHandler556, TAsyncClient client552, TProtocolFactory protocolFactory553, TNonblockingTransport transport554) throws TException { - super(client552, protocolFactory553, transport554, resultHandler556, false); + public getTagIndex_call(GetTagIndexReq req, AsyncMethodCallback resultHandler557, TAsyncClient client553, TProtocolFactory protocolFactory554, TNonblockingTransport transport555) throws TException { + super(client553, protocolFactory554, transport555, resultHandler557, false); this.req = req; } @@ -5309,17 +5358,17 @@ public GetTagIndexResp getResult() throws TException { } } - public void listTagIndexes(ListTagIndexesReq req, AsyncMethodCallback resultHandler560) throws TException { + public void listTagIndexes(ListTagIndexesReq req, AsyncMethodCallback resultHandler561) throws TException { checkReady(); - listTagIndexes_call method_call = new listTagIndexes_call(req, resultHandler560, this, ___protocolFactory, ___transport); + listTagIndexes_call method_call = new listTagIndexes_call(req, resultHandler561, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listTagIndexes_call extends TAsyncMethodCall { private ListTagIndexesReq req; - public listTagIndexes_call(ListTagIndexesReq req, AsyncMethodCallback resultHandler561, TAsyncClient client557, TProtocolFactory protocolFactory558, TNonblockingTransport transport559) throws TException { - super(client557, protocolFactory558, transport559, resultHandler561, false); + public listTagIndexes_call(ListTagIndexesReq req, AsyncMethodCallback resultHandler562, TAsyncClient client558, TProtocolFactory protocolFactory559, TNonblockingTransport transport560) throws TException { + super(client558, protocolFactory559, transport560, resultHandler562, false); this.req = req; } @@ -5341,17 +5390,17 @@ public ListTagIndexesResp getResult() throws TException { } } - public void rebuildTagIndex(RebuildIndexReq req, AsyncMethodCallback resultHandler565) throws TException { + public void rebuildTagIndex(RebuildIndexReq req, AsyncMethodCallback resultHandler566) throws TException { checkReady(); - rebuildTagIndex_call method_call = new rebuildTagIndex_call(req, resultHandler565, this, ___protocolFactory, ___transport); + rebuildTagIndex_call method_call = new rebuildTagIndex_call(req, resultHandler566, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class rebuildTagIndex_call extends TAsyncMethodCall { private RebuildIndexReq req; - public rebuildTagIndex_call(RebuildIndexReq req, AsyncMethodCallback resultHandler566, TAsyncClient client562, TProtocolFactory protocolFactory563, TNonblockingTransport transport564) throws TException { - super(client562, protocolFactory563, transport564, resultHandler566, false); + public rebuildTagIndex_call(RebuildIndexReq req, AsyncMethodCallback resultHandler567, TAsyncClient client563, TProtocolFactory protocolFactory564, TNonblockingTransport transport565) throws TException { + super(client563, protocolFactory564, transport565, resultHandler567, false); this.req = req; } @@ -5373,17 +5422,17 @@ public ExecResp getResult() throws TException { } } - public void listTagIndexStatus(ListIndexStatusReq req, AsyncMethodCallback resultHandler570) throws TException { + public void listTagIndexStatus(ListIndexStatusReq req, AsyncMethodCallback resultHandler571) throws TException { checkReady(); - listTagIndexStatus_call method_call = new listTagIndexStatus_call(req, resultHandler570, this, ___protocolFactory, ___transport); + listTagIndexStatus_call method_call = new listTagIndexStatus_call(req, resultHandler571, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listTagIndexStatus_call extends TAsyncMethodCall { private ListIndexStatusReq req; - public listTagIndexStatus_call(ListIndexStatusReq req, AsyncMethodCallback resultHandler571, TAsyncClient client567, TProtocolFactory protocolFactory568, TNonblockingTransport transport569) throws TException { - super(client567, protocolFactory568, transport569, resultHandler571, false); + public listTagIndexStatus_call(ListIndexStatusReq req, AsyncMethodCallback resultHandler572, TAsyncClient client568, TProtocolFactory protocolFactory569, TNonblockingTransport transport570) throws TException { + super(client568, protocolFactory569, transport570, resultHandler572, false); this.req = req; } @@ -5405,17 +5454,17 @@ public ListIndexStatusResp getResult() throws TException { } } - public void createEdgeIndex(CreateEdgeIndexReq req, AsyncMethodCallback resultHandler575) throws TException { + public void createEdgeIndex(CreateEdgeIndexReq req, AsyncMethodCallback resultHandler576) throws TException { checkReady(); - createEdgeIndex_call method_call = new createEdgeIndex_call(req, resultHandler575, this, ___protocolFactory, ___transport); + createEdgeIndex_call method_call = new createEdgeIndex_call(req, resultHandler576, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createEdgeIndex_call extends TAsyncMethodCall { private CreateEdgeIndexReq req; - public createEdgeIndex_call(CreateEdgeIndexReq req, AsyncMethodCallback resultHandler576, TAsyncClient client572, TProtocolFactory protocolFactory573, TNonblockingTransport transport574) throws TException { - super(client572, protocolFactory573, transport574, resultHandler576, false); + public createEdgeIndex_call(CreateEdgeIndexReq req, AsyncMethodCallback resultHandler577, TAsyncClient client573, TProtocolFactory protocolFactory574, TNonblockingTransport transport575) throws TException { + super(client573, protocolFactory574, transport575, resultHandler577, false); this.req = req; } @@ -5437,17 +5486,17 @@ public ExecResp getResult() throws TException { } } - public void dropEdgeIndex(DropEdgeIndexReq req, AsyncMethodCallback resultHandler580) throws TException { + public void dropEdgeIndex(DropEdgeIndexReq req, AsyncMethodCallback resultHandler581) throws TException { checkReady(); - dropEdgeIndex_call method_call = new dropEdgeIndex_call(req, resultHandler580, this, ___protocolFactory, ___transport); + dropEdgeIndex_call method_call = new dropEdgeIndex_call(req, resultHandler581, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropEdgeIndex_call extends TAsyncMethodCall { private DropEdgeIndexReq req; - public dropEdgeIndex_call(DropEdgeIndexReq req, AsyncMethodCallback resultHandler581, TAsyncClient client577, TProtocolFactory protocolFactory578, TNonblockingTransport transport579) throws TException { - super(client577, protocolFactory578, transport579, resultHandler581, false); + public dropEdgeIndex_call(DropEdgeIndexReq req, AsyncMethodCallback resultHandler582, TAsyncClient client578, TProtocolFactory protocolFactory579, TNonblockingTransport transport580) throws TException { + super(client578, protocolFactory579, transport580, resultHandler582, false); this.req = req; } @@ -5469,17 +5518,17 @@ public ExecResp getResult() throws TException { } } - public void getEdgeIndex(GetEdgeIndexReq req, AsyncMethodCallback resultHandler585) throws TException { + public void getEdgeIndex(GetEdgeIndexReq req, AsyncMethodCallback resultHandler586) throws TException { checkReady(); - getEdgeIndex_call method_call = new getEdgeIndex_call(req, resultHandler585, this, ___protocolFactory, ___transport); + getEdgeIndex_call method_call = new getEdgeIndex_call(req, resultHandler586, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getEdgeIndex_call extends TAsyncMethodCall { private GetEdgeIndexReq req; - public getEdgeIndex_call(GetEdgeIndexReq req, AsyncMethodCallback resultHandler586, TAsyncClient client582, TProtocolFactory protocolFactory583, TNonblockingTransport transport584) throws TException { - super(client582, protocolFactory583, transport584, resultHandler586, false); + public getEdgeIndex_call(GetEdgeIndexReq req, AsyncMethodCallback resultHandler587, TAsyncClient client583, TProtocolFactory protocolFactory584, TNonblockingTransport transport585) throws TException { + super(client583, protocolFactory584, transport585, resultHandler587, false); this.req = req; } @@ -5501,17 +5550,17 @@ public GetEdgeIndexResp getResult() throws TException { } } - public void listEdgeIndexes(ListEdgeIndexesReq req, AsyncMethodCallback resultHandler590) throws TException { + public void listEdgeIndexes(ListEdgeIndexesReq req, AsyncMethodCallback resultHandler591) throws TException { checkReady(); - listEdgeIndexes_call method_call = new listEdgeIndexes_call(req, resultHandler590, this, ___protocolFactory, ___transport); + listEdgeIndexes_call method_call = new listEdgeIndexes_call(req, resultHandler591, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listEdgeIndexes_call extends TAsyncMethodCall { private ListEdgeIndexesReq req; - public listEdgeIndexes_call(ListEdgeIndexesReq req, AsyncMethodCallback resultHandler591, TAsyncClient client587, TProtocolFactory protocolFactory588, TNonblockingTransport transport589) throws TException { - super(client587, protocolFactory588, transport589, resultHandler591, false); + public listEdgeIndexes_call(ListEdgeIndexesReq req, AsyncMethodCallback resultHandler592, TAsyncClient client588, TProtocolFactory protocolFactory589, TNonblockingTransport transport590) throws TException { + super(client588, protocolFactory589, transport590, resultHandler592, false); this.req = req; } @@ -5533,17 +5582,17 @@ public ListEdgeIndexesResp getResult() throws TException { } } - public void rebuildEdgeIndex(RebuildIndexReq req, AsyncMethodCallback resultHandler595) throws TException { + public void rebuildEdgeIndex(RebuildIndexReq req, AsyncMethodCallback resultHandler596) throws TException { checkReady(); - rebuildEdgeIndex_call method_call = new rebuildEdgeIndex_call(req, resultHandler595, this, ___protocolFactory, ___transport); + rebuildEdgeIndex_call method_call = new rebuildEdgeIndex_call(req, resultHandler596, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class rebuildEdgeIndex_call extends TAsyncMethodCall { private RebuildIndexReq req; - public rebuildEdgeIndex_call(RebuildIndexReq req, AsyncMethodCallback resultHandler596, TAsyncClient client592, TProtocolFactory protocolFactory593, TNonblockingTransport transport594) throws TException { - super(client592, protocolFactory593, transport594, resultHandler596, false); + public rebuildEdgeIndex_call(RebuildIndexReq req, AsyncMethodCallback resultHandler597, TAsyncClient client593, TProtocolFactory protocolFactory594, TNonblockingTransport transport595) throws TException { + super(client593, protocolFactory594, transport595, resultHandler597, false); this.req = req; } @@ -5565,17 +5614,17 @@ public ExecResp getResult() throws TException { } } - public void listEdgeIndexStatus(ListIndexStatusReq req, AsyncMethodCallback resultHandler600) throws TException { + public void listEdgeIndexStatus(ListIndexStatusReq req, AsyncMethodCallback resultHandler601) throws TException { checkReady(); - listEdgeIndexStatus_call method_call = new listEdgeIndexStatus_call(req, resultHandler600, this, ___protocolFactory, ___transport); + listEdgeIndexStatus_call method_call = new listEdgeIndexStatus_call(req, resultHandler601, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listEdgeIndexStatus_call extends TAsyncMethodCall { private ListIndexStatusReq req; - public listEdgeIndexStatus_call(ListIndexStatusReq req, AsyncMethodCallback resultHandler601, TAsyncClient client597, TProtocolFactory protocolFactory598, TNonblockingTransport transport599) throws TException { - super(client597, protocolFactory598, transport599, resultHandler601, false); + public listEdgeIndexStatus_call(ListIndexStatusReq req, AsyncMethodCallback resultHandler602, TAsyncClient client598, TProtocolFactory protocolFactory599, TNonblockingTransport transport600) throws TException { + super(client598, protocolFactory599, transport600, resultHandler602, false); this.req = req; } @@ -5597,17 +5646,17 @@ public ListIndexStatusResp getResult() throws TException { } } - public void createUser(CreateUserReq req, AsyncMethodCallback resultHandler605) throws TException { + public void createUser(CreateUserReq req, AsyncMethodCallback resultHandler606) throws TException { checkReady(); - createUser_call method_call = new createUser_call(req, resultHandler605, this, ___protocolFactory, ___transport); + createUser_call method_call = new createUser_call(req, resultHandler606, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createUser_call extends TAsyncMethodCall { private CreateUserReq req; - public createUser_call(CreateUserReq req, AsyncMethodCallback resultHandler606, TAsyncClient client602, TProtocolFactory protocolFactory603, TNonblockingTransport transport604) throws TException { - super(client602, protocolFactory603, transport604, resultHandler606, false); + public createUser_call(CreateUserReq req, AsyncMethodCallback resultHandler607, TAsyncClient client603, TProtocolFactory protocolFactory604, TNonblockingTransport transport605) throws TException { + super(client603, protocolFactory604, transport605, resultHandler607, false); this.req = req; } @@ -5629,17 +5678,17 @@ public ExecResp getResult() throws TException { } } - public void dropUser(DropUserReq req, AsyncMethodCallback resultHandler610) throws TException { + public void dropUser(DropUserReq req, AsyncMethodCallback resultHandler611) throws TException { checkReady(); - dropUser_call method_call = new dropUser_call(req, resultHandler610, this, ___protocolFactory, ___transport); + dropUser_call method_call = new dropUser_call(req, resultHandler611, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropUser_call extends TAsyncMethodCall { private DropUserReq req; - public dropUser_call(DropUserReq req, AsyncMethodCallback resultHandler611, TAsyncClient client607, TProtocolFactory protocolFactory608, TNonblockingTransport transport609) throws TException { - super(client607, protocolFactory608, transport609, resultHandler611, false); + public dropUser_call(DropUserReq req, AsyncMethodCallback resultHandler612, TAsyncClient client608, TProtocolFactory protocolFactory609, TNonblockingTransport transport610) throws TException { + super(client608, protocolFactory609, transport610, resultHandler612, false); this.req = req; } @@ -5661,17 +5710,17 @@ public ExecResp getResult() throws TException { } } - public void alterUser(AlterUserReq req, AsyncMethodCallback resultHandler615) throws TException { + public void alterUser(AlterUserReq req, AsyncMethodCallback resultHandler616) throws TException { checkReady(); - alterUser_call method_call = new alterUser_call(req, resultHandler615, this, ___protocolFactory, ___transport); + alterUser_call method_call = new alterUser_call(req, resultHandler616, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class alterUser_call extends TAsyncMethodCall { private AlterUserReq req; - public alterUser_call(AlterUserReq req, AsyncMethodCallback resultHandler616, TAsyncClient client612, TProtocolFactory protocolFactory613, TNonblockingTransport transport614) throws TException { - super(client612, protocolFactory613, transport614, resultHandler616, false); + public alterUser_call(AlterUserReq req, AsyncMethodCallback resultHandler617, TAsyncClient client613, TProtocolFactory protocolFactory614, TNonblockingTransport transport615) throws TException { + super(client613, protocolFactory614, transport615, resultHandler617, false); this.req = req; } @@ -5693,17 +5742,17 @@ public ExecResp getResult() throws TException { } } - public void grantRole(GrantRoleReq req, AsyncMethodCallback resultHandler620) throws TException { + public void grantRole(GrantRoleReq req, AsyncMethodCallback resultHandler621) throws TException { checkReady(); - grantRole_call method_call = new grantRole_call(req, resultHandler620, this, ___protocolFactory, ___transport); + grantRole_call method_call = new grantRole_call(req, resultHandler621, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class grantRole_call extends TAsyncMethodCall { private GrantRoleReq req; - public grantRole_call(GrantRoleReq req, AsyncMethodCallback resultHandler621, TAsyncClient client617, TProtocolFactory protocolFactory618, TNonblockingTransport transport619) throws TException { - super(client617, protocolFactory618, transport619, resultHandler621, false); + public grantRole_call(GrantRoleReq req, AsyncMethodCallback resultHandler622, TAsyncClient client618, TProtocolFactory protocolFactory619, TNonblockingTransport transport620) throws TException { + super(client618, protocolFactory619, transport620, resultHandler622, false); this.req = req; } @@ -5725,17 +5774,17 @@ public ExecResp getResult() throws TException { } } - public void revokeRole(RevokeRoleReq req, AsyncMethodCallback resultHandler625) throws TException { + public void revokeRole(RevokeRoleReq req, AsyncMethodCallback resultHandler626) throws TException { checkReady(); - revokeRole_call method_call = new revokeRole_call(req, resultHandler625, this, ___protocolFactory, ___transport); + revokeRole_call method_call = new revokeRole_call(req, resultHandler626, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class revokeRole_call extends TAsyncMethodCall { private RevokeRoleReq req; - public revokeRole_call(RevokeRoleReq req, AsyncMethodCallback resultHandler626, TAsyncClient client622, TProtocolFactory protocolFactory623, TNonblockingTransport transport624) throws TException { - super(client622, protocolFactory623, transport624, resultHandler626, false); + public revokeRole_call(RevokeRoleReq req, AsyncMethodCallback resultHandler627, TAsyncClient client623, TProtocolFactory protocolFactory624, TNonblockingTransport transport625) throws TException { + super(client623, protocolFactory624, transport625, resultHandler627, false); this.req = req; } @@ -5757,17 +5806,17 @@ public ExecResp getResult() throws TException { } } - public void listUsers(ListUsersReq req, AsyncMethodCallback resultHandler630) throws TException { + public void listUsers(ListUsersReq req, AsyncMethodCallback resultHandler631) throws TException { checkReady(); - listUsers_call method_call = new listUsers_call(req, resultHandler630, this, ___protocolFactory, ___transport); + listUsers_call method_call = new listUsers_call(req, resultHandler631, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listUsers_call extends TAsyncMethodCall { private ListUsersReq req; - public listUsers_call(ListUsersReq req, AsyncMethodCallback resultHandler631, TAsyncClient client627, TProtocolFactory protocolFactory628, TNonblockingTransport transport629) throws TException { - super(client627, protocolFactory628, transport629, resultHandler631, false); + public listUsers_call(ListUsersReq req, AsyncMethodCallback resultHandler632, TAsyncClient client628, TProtocolFactory protocolFactory629, TNonblockingTransport transport630) throws TException { + super(client628, protocolFactory629, transport630, resultHandler632, false); this.req = req; } @@ -5789,17 +5838,17 @@ public ListUsersResp getResult() throws TException { } } - public void listRoles(ListRolesReq req, AsyncMethodCallback resultHandler635) throws TException { + public void listRoles(ListRolesReq req, AsyncMethodCallback resultHandler636) throws TException { checkReady(); - listRoles_call method_call = new listRoles_call(req, resultHandler635, this, ___protocolFactory, ___transport); + listRoles_call method_call = new listRoles_call(req, resultHandler636, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listRoles_call extends TAsyncMethodCall { private ListRolesReq req; - public listRoles_call(ListRolesReq req, AsyncMethodCallback resultHandler636, TAsyncClient client632, TProtocolFactory protocolFactory633, TNonblockingTransport transport634) throws TException { - super(client632, protocolFactory633, transport634, resultHandler636, false); + public listRoles_call(ListRolesReq req, AsyncMethodCallback resultHandler637, TAsyncClient client633, TProtocolFactory protocolFactory634, TNonblockingTransport transport635) throws TException { + super(client633, protocolFactory634, transport635, resultHandler637, false); this.req = req; } @@ -5821,17 +5870,17 @@ public ListRolesResp getResult() throws TException { } } - public void getUserRoles(GetUserRolesReq req, AsyncMethodCallback resultHandler640) throws TException { + public void getUserRoles(GetUserRolesReq req, AsyncMethodCallback resultHandler641) throws TException { checkReady(); - getUserRoles_call method_call = new getUserRoles_call(req, resultHandler640, this, ___protocolFactory, ___transport); + getUserRoles_call method_call = new getUserRoles_call(req, resultHandler641, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getUserRoles_call extends TAsyncMethodCall { private GetUserRolesReq req; - public getUserRoles_call(GetUserRolesReq req, AsyncMethodCallback resultHandler641, TAsyncClient client637, TProtocolFactory protocolFactory638, TNonblockingTransport transport639) throws TException { - super(client637, protocolFactory638, transport639, resultHandler641, false); + public getUserRoles_call(GetUserRolesReq req, AsyncMethodCallback resultHandler642, TAsyncClient client638, TProtocolFactory protocolFactory639, TNonblockingTransport transport640) throws TException { + super(client638, protocolFactory639, transport640, resultHandler642, false); this.req = req; } @@ -5853,17 +5902,17 @@ public ListRolesResp getResult() throws TException { } } - public void changePassword(ChangePasswordReq req, AsyncMethodCallback resultHandler645) throws TException { + public void changePassword(ChangePasswordReq req, AsyncMethodCallback resultHandler646) throws TException { checkReady(); - changePassword_call method_call = new changePassword_call(req, resultHandler645, this, ___protocolFactory, ___transport); + changePassword_call method_call = new changePassword_call(req, resultHandler646, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class changePassword_call extends TAsyncMethodCall { private ChangePasswordReq req; - public changePassword_call(ChangePasswordReq req, AsyncMethodCallback resultHandler646, TAsyncClient client642, TProtocolFactory protocolFactory643, TNonblockingTransport transport644) throws TException { - super(client642, protocolFactory643, transport644, resultHandler646, false); + public changePassword_call(ChangePasswordReq req, AsyncMethodCallback resultHandler647, TAsyncClient client643, TProtocolFactory protocolFactory644, TNonblockingTransport transport645) throws TException { + super(client643, protocolFactory644, transport645, resultHandler647, false); this.req = req; } @@ -5885,17 +5934,17 @@ public ExecResp getResult() throws TException { } } - public void heartBeat(HBReq req, AsyncMethodCallback resultHandler650) throws TException { + public void heartBeat(HBReq req, AsyncMethodCallback resultHandler651) throws TException { checkReady(); - heartBeat_call method_call = new heartBeat_call(req, resultHandler650, this, ___protocolFactory, ___transport); + heartBeat_call method_call = new heartBeat_call(req, resultHandler651, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class heartBeat_call extends TAsyncMethodCall { private HBReq req; - public heartBeat_call(HBReq req, AsyncMethodCallback resultHandler651, TAsyncClient client647, TProtocolFactory protocolFactory648, TNonblockingTransport transport649) throws TException { - super(client647, protocolFactory648, transport649, resultHandler651, false); + public heartBeat_call(HBReq req, AsyncMethodCallback resultHandler652, TAsyncClient client648, TProtocolFactory protocolFactory649, TNonblockingTransport transport650) throws TException { + super(client648, protocolFactory649, transport650, resultHandler652, false); this.req = req; } @@ -5917,17 +5966,17 @@ public HBResp getResult() throws TException { } } - public void balance(BalanceReq req, AsyncMethodCallback resultHandler655) throws TException { + public void balance(BalanceReq req, AsyncMethodCallback resultHandler656) throws TException { checkReady(); - balance_call method_call = new balance_call(req, resultHandler655, this, ___protocolFactory, ___transport); + balance_call method_call = new balance_call(req, resultHandler656, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class balance_call extends TAsyncMethodCall { private BalanceReq req; - public balance_call(BalanceReq req, AsyncMethodCallback resultHandler656, TAsyncClient client652, TProtocolFactory protocolFactory653, TNonblockingTransport transport654) throws TException { - super(client652, protocolFactory653, transport654, resultHandler656, false); + public balance_call(BalanceReq req, AsyncMethodCallback resultHandler657, TAsyncClient client653, TProtocolFactory protocolFactory654, TNonblockingTransport transport655) throws TException { + super(client653, protocolFactory654, transport655, resultHandler657, false); this.req = req; } @@ -5949,17 +5998,17 @@ public BalanceResp getResult() throws TException { } } - public void leaderBalance(LeaderBalanceReq req, AsyncMethodCallback resultHandler660) throws TException { + public void leaderBalance(LeaderBalanceReq req, AsyncMethodCallback resultHandler661) throws TException { checkReady(); - leaderBalance_call method_call = new leaderBalance_call(req, resultHandler660, this, ___protocolFactory, ___transport); + leaderBalance_call method_call = new leaderBalance_call(req, resultHandler661, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class leaderBalance_call extends TAsyncMethodCall { private LeaderBalanceReq req; - public leaderBalance_call(LeaderBalanceReq req, AsyncMethodCallback resultHandler661, TAsyncClient client657, TProtocolFactory protocolFactory658, TNonblockingTransport transport659) throws TException { - super(client657, protocolFactory658, transport659, resultHandler661, false); + public leaderBalance_call(LeaderBalanceReq req, AsyncMethodCallback resultHandler662, TAsyncClient client658, TProtocolFactory protocolFactory659, TNonblockingTransport transport660) throws TException { + super(client658, protocolFactory659, transport660, resultHandler662, false); this.req = req; } @@ -5981,17 +6030,17 @@ public ExecResp getResult() throws TException { } } - public void regConfig(RegConfigReq req, AsyncMethodCallback resultHandler665) throws TException { + public void regConfig(RegConfigReq req, AsyncMethodCallback resultHandler666) throws TException { checkReady(); - regConfig_call method_call = new regConfig_call(req, resultHandler665, this, ___protocolFactory, ___transport); + regConfig_call method_call = new regConfig_call(req, resultHandler666, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class regConfig_call extends TAsyncMethodCall { private RegConfigReq req; - public regConfig_call(RegConfigReq req, AsyncMethodCallback resultHandler666, TAsyncClient client662, TProtocolFactory protocolFactory663, TNonblockingTransport transport664) throws TException { - super(client662, protocolFactory663, transport664, resultHandler666, false); + public regConfig_call(RegConfigReq req, AsyncMethodCallback resultHandler667, TAsyncClient client663, TProtocolFactory protocolFactory664, TNonblockingTransport transport665) throws TException { + super(client663, protocolFactory664, transport665, resultHandler667, false); this.req = req; } @@ -6013,17 +6062,17 @@ public ExecResp getResult() throws TException { } } - public void getConfig(GetConfigReq req, AsyncMethodCallback resultHandler670) throws TException { + public void getConfig(GetConfigReq req, AsyncMethodCallback resultHandler671) throws TException { checkReady(); - getConfig_call method_call = new getConfig_call(req, resultHandler670, this, ___protocolFactory, ___transport); + getConfig_call method_call = new getConfig_call(req, resultHandler671, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getConfig_call extends TAsyncMethodCall { private GetConfigReq req; - public getConfig_call(GetConfigReq req, AsyncMethodCallback resultHandler671, TAsyncClient client667, TProtocolFactory protocolFactory668, TNonblockingTransport transport669) throws TException { - super(client667, protocolFactory668, transport669, resultHandler671, false); + public getConfig_call(GetConfigReq req, AsyncMethodCallback resultHandler672, TAsyncClient client668, TProtocolFactory protocolFactory669, TNonblockingTransport transport670) throws TException { + super(client668, protocolFactory669, transport670, resultHandler672, false); this.req = req; } @@ -6045,17 +6094,17 @@ public GetConfigResp getResult() throws TException { } } - public void setConfig(SetConfigReq req, AsyncMethodCallback resultHandler675) throws TException { + public void setConfig(SetConfigReq req, AsyncMethodCallback resultHandler676) throws TException { checkReady(); - setConfig_call method_call = new setConfig_call(req, resultHandler675, this, ___protocolFactory, ___transport); + setConfig_call method_call = new setConfig_call(req, resultHandler676, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class setConfig_call extends TAsyncMethodCall { private SetConfigReq req; - public setConfig_call(SetConfigReq req, AsyncMethodCallback resultHandler676, TAsyncClient client672, TProtocolFactory protocolFactory673, TNonblockingTransport transport674) throws TException { - super(client672, protocolFactory673, transport674, resultHandler676, false); + public setConfig_call(SetConfigReq req, AsyncMethodCallback resultHandler677, TAsyncClient client673, TProtocolFactory protocolFactory674, TNonblockingTransport transport675) throws TException { + super(client673, protocolFactory674, transport675, resultHandler677, false); this.req = req; } @@ -6077,17 +6126,17 @@ public ExecResp getResult() throws TException { } } - public void listConfigs(ListConfigsReq req, AsyncMethodCallback resultHandler680) throws TException { + public void listConfigs(ListConfigsReq req, AsyncMethodCallback resultHandler681) throws TException { checkReady(); - listConfigs_call method_call = new listConfigs_call(req, resultHandler680, this, ___protocolFactory, ___transport); + listConfigs_call method_call = new listConfigs_call(req, resultHandler681, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listConfigs_call extends TAsyncMethodCall { private ListConfigsReq req; - public listConfigs_call(ListConfigsReq req, AsyncMethodCallback resultHandler681, TAsyncClient client677, TProtocolFactory protocolFactory678, TNonblockingTransport transport679) throws TException { - super(client677, protocolFactory678, transport679, resultHandler681, false); + public listConfigs_call(ListConfigsReq req, AsyncMethodCallback resultHandler682, TAsyncClient client678, TProtocolFactory protocolFactory679, TNonblockingTransport transport680) throws TException { + super(client678, protocolFactory679, transport680, resultHandler682, false); this.req = req; } @@ -6109,17 +6158,17 @@ public ListConfigsResp getResult() throws TException { } } - public void createSnapshot(CreateSnapshotReq req, AsyncMethodCallback resultHandler685) throws TException { + public void createSnapshot(CreateSnapshotReq req, AsyncMethodCallback resultHandler686) throws TException { checkReady(); - createSnapshot_call method_call = new createSnapshot_call(req, resultHandler685, this, ___protocolFactory, ___transport); + createSnapshot_call method_call = new createSnapshot_call(req, resultHandler686, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createSnapshot_call extends TAsyncMethodCall { private CreateSnapshotReq req; - public createSnapshot_call(CreateSnapshotReq req, AsyncMethodCallback resultHandler686, TAsyncClient client682, TProtocolFactory protocolFactory683, TNonblockingTransport transport684) throws TException { - super(client682, protocolFactory683, transport684, resultHandler686, false); + public createSnapshot_call(CreateSnapshotReq req, AsyncMethodCallback resultHandler687, TAsyncClient client683, TProtocolFactory protocolFactory684, TNonblockingTransport transport685) throws TException { + super(client683, protocolFactory684, transport685, resultHandler687, false); this.req = req; } @@ -6141,17 +6190,17 @@ public ExecResp getResult() throws TException { } } - public void dropSnapshot(DropSnapshotReq req, AsyncMethodCallback resultHandler690) throws TException { + public void dropSnapshot(DropSnapshotReq req, AsyncMethodCallback resultHandler691) throws TException { checkReady(); - dropSnapshot_call method_call = new dropSnapshot_call(req, resultHandler690, this, ___protocolFactory, ___transport); + dropSnapshot_call method_call = new dropSnapshot_call(req, resultHandler691, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropSnapshot_call extends TAsyncMethodCall { private DropSnapshotReq req; - public dropSnapshot_call(DropSnapshotReq req, AsyncMethodCallback resultHandler691, TAsyncClient client687, TProtocolFactory protocolFactory688, TNonblockingTransport transport689) throws TException { - super(client687, protocolFactory688, transport689, resultHandler691, false); + public dropSnapshot_call(DropSnapshotReq req, AsyncMethodCallback resultHandler692, TAsyncClient client688, TProtocolFactory protocolFactory689, TNonblockingTransport transport690) throws TException { + super(client688, protocolFactory689, transport690, resultHandler692, false); this.req = req; } @@ -6173,17 +6222,17 @@ public ExecResp getResult() throws TException { } } - public void listSnapshots(ListSnapshotsReq req, AsyncMethodCallback resultHandler695) throws TException { + public void listSnapshots(ListSnapshotsReq req, AsyncMethodCallback resultHandler696) throws TException { checkReady(); - listSnapshots_call method_call = new listSnapshots_call(req, resultHandler695, this, ___protocolFactory, ___transport); + listSnapshots_call method_call = new listSnapshots_call(req, resultHandler696, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listSnapshots_call extends TAsyncMethodCall { private ListSnapshotsReq req; - public listSnapshots_call(ListSnapshotsReq req, AsyncMethodCallback resultHandler696, TAsyncClient client692, TProtocolFactory protocolFactory693, TNonblockingTransport transport694) throws TException { - super(client692, protocolFactory693, transport694, resultHandler696, false); + public listSnapshots_call(ListSnapshotsReq req, AsyncMethodCallback resultHandler697, TAsyncClient client693, TProtocolFactory protocolFactory694, TNonblockingTransport transport695) throws TException { + super(client693, protocolFactory694, transport695, resultHandler697, false); this.req = req; } @@ -6205,17 +6254,17 @@ public ListSnapshotsResp getResult() throws TException { } } - public void runAdminJob(AdminJobReq req, AsyncMethodCallback resultHandler700) throws TException { + public void runAdminJob(AdminJobReq req, AsyncMethodCallback resultHandler701) throws TException { checkReady(); - runAdminJob_call method_call = new runAdminJob_call(req, resultHandler700, this, ___protocolFactory, ___transport); + runAdminJob_call method_call = new runAdminJob_call(req, resultHandler701, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class runAdminJob_call extends TAsyncMethodCall { private AdminJobReq req; - public runAdminJob_call(AdminJobReq req, AsyncMethodCallback resultHandler701, TAsyncClient client697, TProtocolFactory protocolFactory698, TNonblockingTransport transport699) throws TException { - super(client697, protocolFactory698, transport699, resultHandler701, false); + public runAdminJob_call(AdminJobReq req, AsyncMethodCallback resultHandler702, TAsyncClient client698, TProtocolFactory protocolFactory699, TNonblockingTransport transport700) throws TException { + super(client698, protocolFactory699, transport700, resultHandler702, false); this.req = req; } @@ -6237,17 +6286,17 @@ public AdminJobResp getResult() throws TException { } } - public void addZone(AddZoneReq req, AsyncMethodCallback resultHandler705) throws TException { + public void addZone(AddZoneReq req, AsyncMethodCallback resultHandler706) throws TException { checkReady(); - addZone_call method_call = new addZone_call(req, resultHandler705, this, ___protocolFactory, ___transport); + addZone_call method_call = new addZone_call(req, resultHandler706, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addZone_call extends TAsyncMethodCall { private AddZoneReq req; - public addZone_call(AddZoneReq req, AsyncMethodCallback resultHandler706, TAsyncClient client702, TProtocolFactory protocolFactory703, TNonblockingTransport transport704) throws TException { - super(client702, protocolFactory703, transport704, resultHandler706, false); + public addZone_call(AddZoneReq req, AsyncMethodCallback resultHandler707, TAsyncClient client703, TProtocolFactory protocolFactory704, TNonblockingTransport transport705) throws TException { + super(client703, protocolFactory704, transport705, resultHandler707, false); this.req = req; } @@ -6269,17 +6318,17 @@ public ExecResp getResult() throws TException { } } - public void dropZone(DropZoneReq req, AsyncMethodCallback resultHandler710) throws TException { + public void dropZone(DropZoneReq req, AsyncMethodCallback resultHandler711) throws TException { checkReady(); - dropZone_call method_call = new dropZone_call(req, resultHandler710, this, ___protocolFactory, ___transport); + dropZone_call method_call = new dropZone_call(req, resultHandler711, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropZone_call extends TAsyncMethodCall { private DropZoneReq req; - public dropZone_call(DropZoneReq req, AsyncMethodCallback resultHandler711, TAsyncClient client707, TProtocolFactory protocolFactory708, TNonblockingTransport transport709) throws TException { - super(client707, protocolFactory708, transport709, resultHandler711, false); + public dropZone_call(DropZoneReq req, AsyncMethodCallback resultHandler712, TAsyncClient client708, TProtocolFactory protocolFactory709, TNonblockingTransport transport710) throws TException { + super(client708, protocolFactory709, transport710, resultHandler712, false); this.req = req; } @@ -6301,17 +6350,17 @@ public ExecResp getResult() throws TException { } } - public void addHostIntoZone(AddHostIntoZoneReq req, AsyncMethodCallback resultHandler715) throws TException { + public void addHostIntoZone(AddHostIntoZoneReq req, AsyncMethodCallback resultHandler716) throws TException { checkReady(); - addHostIntoZone_call method_call = new addHostIntoZone_call(req, resultHandler715, this, ___protocolFactory, ___transport); + addHostIntoZone_call method_call = new addHostIntoZone_call(req, resultHandler716, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addHostIntoZone_call extends TAsyncMethodCall { private AddHostIntoZoneReq req; - public addHostIntoZone_call(AddHostIntoZoneReq req, AsyncMethodCallback resultHandler716, TAsyncClient client712, TProtocolFactory protocolFactory713, TNonblockingTransport transport714) throws TException { - super(client712, protocolFactory713, transport714, resultHandler716, false); + public addHostIntoZone_call(AddHostIntoZoneReq req, AsyncMethodCallback resultHandler717, TAsyncClient client713, TProtocolFactory protocolFactory714, TNonblockingTransport transport715) throws TException { + super(client713, protocolFactory714, transport715, resultHandler717, false); this.req = req; } @@ -6333,17 +6382,17 @@ public ExecResp getResult() throws TException { } } - public void dropHostFromZone(DropHostFromZoneReq req, AsyncMethodCallback resultHandler720) throws TException { + public void dropHostFromZone(DropHostFromZoneReq req, AsyncMethodCallback resultHandler721) throws TException { checkReady(); - dropHostFromZone_call method_call = new dropHostFromZone_call(req, resultHandler720, this, ___protocolFactory, ___transport); + dropHostFromZone_call method_call = new dropHostFromZone_call(req, resultHandler721, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropHostFromZone_call extends TAsyncMethodCall { private DropHostFromZoneReq req; - public dropHostFromZone_call(DropHostFromZoneReq req, AsyncMethodCallback resultHandler721, TAsyncClient client717, TProtocolFactory protocolFactory718, TNonblockingTransport transport719) throws TException { - super(client717, protocolFactory718, transport719, resultHandler721, false); + public dropHostFromZone_call(DropHostFromZoneReq req, AsyncMethodCallback resultHandler722, TAsyncClient client718, TProtocolFactory protocolFactory719, TNonblockingTransport transport720) throws TException { + super(client718, protocolFactory719, transport720, resultHandler722, false); this.req = req; } @@ -6365,17 +6414,17 @@ public ExecResp getResult() throws TException { } } - public void getZone(GetZoneReq req, AsyncMethodCallback resultHandler725) throws TException { + public void getZone(GetZoneReq req, AsyncMethodCallback resultHandler726) throws TException { checkReady(); - getZone_call method_call = new getZone_call(req, resultHandler725, this, ___protocolFactory, ___transport); + getZone_call method_call = new getZone_call(req, resultHandler726, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getZone_call extends TAsyncMethodCall { private GetZoneReq req; - public getZone_call(GetZoneReq req, AsyncMethodCallback resultHandler726, TAsyncClient client722, TProtocolFactory protocolFactory723, TNonblockingTransport transport724) throws TException { - super(client722, protocolFactory723, transport724, resultHandler726, false); + public getZone_call(GetZoneReq req, AsyncMethodCallback resultHandler727, TAsyncClient client723, TProtocolFactory protocolFactory724, TNonblockingTransport transport725) throws TException { + super(client723, protocolFactory724, transport725, resultHandler727, false); this.req = req; } @@ -6397,17 +6446,17 @@ public GetZoneResp getResult() throws TException { } } - public void listZones(ListZonesReq req, AsyncMethodCallback resultHandler730) throws TException { + public void listZones(ListZonesReq req, AsyncMethodCallback resultHandler731) throws TException { checkReady(); - listZones_call method_call = new listZones_call(req, resultHandler730, this, ___protocolFactory, ___transport); + listZones_call method_call = new listZones_call(req, resultHandler731, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listZones_call extends TAsyncMethodCall { private ListZonesReq req; - public listZones_call(ListZonesReq req, AsyncMethodCallback resultHandler731, TAsyncClient client727, TProtocolFactory protocolFactory728, TNonblockingTransport transport729) throws TException { - super(client727, protocolFactory728, transport729, resultHandler731, false); + public listZones_call(ListZonesReq req, AsyncMethodCallback resultHandler732, TAsyncClient client728, TProtocolFactory protocolFactory729, TNonblockingTransport transport730) throws TException { + super(client728, protocolFactory729, transport730, resultHandler732, false); this.req = req; } @@ -6429,17 +6478,17 @@ public ListZonesResp getResult() throws TException { } } - public void addGroup(AddGroupReq req, AsyncMethodCallback resultHandler735) throws TException { + public void addGroup(AddGroupReq req, AsyncMethodCallback resultHandler736) throws TException { checkReady(); - addGroup_call method_call = new addGroup_call(req, resultHandler735, this, ___protocolFactory, ___transport); + addGroup_call method_call = new addGroup_call(req, resultHandler736, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addGroup_call extends TAsyncMethodCall { private AddGroupReq req; - public addGroup_call(AddGroupReq req, AsyncMethodCallback resultHandler736, TAsyncClient client732, TProtocolFactory protocolFactory733, TNonblockingTransport transport734) throws TException { - super(client732, protocolFactory733, transport734, resultHandler736, false); + public addGroup_call(AddGroupReq req, AsyncMethodCallback resultHandler737, TAsyncClient client733, TProtocolFactory protocolFactory734, TNonblockingTransport transport735) throws TException { + super(client733, protocolFactory734, transport735, resultHandler737, false); this.req = req; } @@ -6461,17 +6510,17 @@ public ExecResp getResult() throws TException { } } - public void dropGroup(DropGroupReq req, AsyncMethodCallback resultHandler740) throws TException { + public void dropGroup(DropGroupReq req, AsyncMethodCallback resultHandler741) throws TException { checkReady(); - dropGroup_call method_call = new dropGroup_call(req, resultHandler740, this, ___protocolFactory, ___transport); + dropGroup_call method_call = new dropGroup_call(req, resultHandler741, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropGroup_call extends TAsyncMethodCall { private DropGroupReq req; - public dropGroup_call(DropGroupReq req, AsyncMethodCallback resultHandler741, TAsyncClient client737, TProtocolFactory protocolFactory738, TNonblockingTransport transport739) throws TException { - super(client737, protocolFactory738, transport739, resultHandler741, false); + public dropGroup_call(DropGroupReq req, AsyncMethodCallback resultHandler742, TAsyncClient client738, TProtocolFactory protocolFactory739, TNonblockingTransport transport740) throws TException { + super(client738, protocolFactory739, transport740, resultHandler742, false); this.req = req; } @@ -6493,17 +6542,17 @@ public ExecResp getResult() throws TException { } } - public void addZoneIntoGroup(AddZoneIntoGroupReq req, AsyncMethodCallback resultHandler745) throws TException { + public void addZoneIntoGroup(AddZoneIntoGroupReq req, AsyncMethodCallback resultHandler746) throws TException { checkReady(); - addZoneIntoGroup_call method_call = new addZoneIntoGroup_call(req, resultHandler745, this, ___protocolFactory, ___transport); + addZoneIntoGroup_call method_call = new addZoneIntoGroup_call(req, resultHandler746, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addZoneIntoGroup_call extends TAsyncMethodCall { private AddZoneIntoGroupReq req; - public addZoneIntoGroup_call(AddZoneIntoGroupReq req, AsyncMethodCallback resultHandler746, TAsyncClient client742, TProtocolFactory protocolFactory743, TNonblockingTransport transport744) throws TException { - super(client742, protocolFactory743, transport744, resultHandler746, false); + public addZoneIntoGroup_call(AddZoneIntoGroupReq req, AsyncMethodCallback resultHandler747, TAsyncClient client743, TProtocolFactory protocolFactory744, TNonblockingTransport transport745) throws TException { + super(client743, protocolFactory744, transport745, resultHandler747, false); this.req = req; } @@ -6525,17 +6574,17 @@ public ExecResp getResult() throws TException { } } - public void dropZoneFromGroup(DropZoneFromGroupReq req, AsyncMethodCallback resultHandler750) throws TException { + public void dropZoneFromGroup(DropZoneFromGroupReq req, AsyncMethodCallback resultHandler751) throws TException { checkReady(); - dropZoneFromGroup_call method_call = new dropZoneFromGroup_call(req, resultHandler750, this, ___protocolFactory, ___transport); + dropZoneFromGroup_call method_call = new dropZoneFromGroup_call(req, resultHandler751, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropZoneFromGroup_call extends TAsyncMethodCall { private DropZoneFromGroupReq req; - public dropZoneFromGroup_call(DropZoneFromGroupReq req, AsyncMethodCallback resultHandler751, TAsyncClient client747, TProtocolFactory protocolFactory748, TNonblockingTransport transport749) throws TException { - super(client747, protocolFactory748, transport749, resultHandler751, false); + public dropZoneFromGroup_call(DropZoneFromGroupReq req, AsyncMethodCallback resultHandler752, TAsyncClient client748, TProtocolFactory protocolFactory749, TNonblockingTransport transport750) throws TException { + super(client748, protocolFactory749, transport750, resultHandler752, false); this.req = req; } @@ -6557,17 +6606,17 @@ public ExecResp getResult() throws TException { } } - public void getGroup(GetGroupReq req, AsyncMethodCallback resultHandler755) throws TException { + public void getGroup(GetGroupReq req, AsyncMethodCallback resultHandler756) throws TException { checkReady(); - getGroup_call method_call = new getGroup_call(req, resultHandler755, this, ___protocolFactory, ___transport); + getGroup_call method_call = new getGroup_call(req, resultHandler756, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getGroup_call extends TAsyncMethodCall { private GetGroupReq req; - public getGroup_call(GetGroupReq req, AsyncMethodCallback resultHandler756, TAsyncClient client752, TProtocolFactory protocolFactory753, TNonblockingTransport transport754) throws TException { - super(client752, protocolFactory753, transport754, resultHandler756, false); + public getGroup_call(GetGroupReq req, AsyncMethodCallback resultHandler757, TAsyncClient client753, TProtocolFactory protocolFactory754, TNonblockingTransport transport755) throws TException { + super(client753, protocolFactory754, transport755, resultHandler757, false); this.req = req; } @@ -6589,17 +6638,17 @@ public GetGroupResp getResult() throws TException { } } - public void listGroups(ListGroupsReq req, AsyncMethodCallback resultHandler760) throws TException { + public void listGroups(ListGroupsReq req, AsyncMethodCallback resultHandler761) throws TException { checkReady(); - listGroups_call method_call = new listGroups_call(req, resultHandler760, this, ___protocolFactory, ___transport); + listGroups_call method_call = new listGroups_call(req, resultHandler761, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listGroups_call extends TAsyncMethodCall { private ListGroupsReq req; - public listGroups_call(ListGroupsReq req, AsyncMethodCallback resultHandler761, TAsyncClient client757, TProtocolFactory protocolFactory758, TNonblockingTransport transport759) throws TException { - super(client757, protocolFactory758, transport759, resultHandler761, false); + public listGroups_call(ListGroupsReq req, AsyncMethodCallback resultHandler762, TAsyncClient client758, TProtocolFactory protocolFactory759, TNonblockingTransport transport760) throws TException { + super(client758, protocolFactory759, transport760, resultHandler762, false); this.req = req; } @@ -6621,17 +6670,17 @@ public ListGroupsResp getResult() throws TException { } } - public void createBackup(CreateBackupReq req, AsyncMethodCallback resultHandler765) throws TException { + public void createBackup(CreateBackupReq req, AsyncMethodCallback resultHandler766) throws TException { checkReady(); - createBackup_call method_call = new createBackup_call(req, resultHandler765, this, ___protocolFactory, ___transport); + createBackup_call method_call = new createBackup_call(req, resultHandler766, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createBackup_call extends TAsyncMethodCall { private CreateBackupReq req; - public createBackup_call(CreateBackupReq req, AsyncMethodCallback resultHandler766, TAsyncClient client762, TProtocolFactory protocolFactory763, TNonblockingTransport transport764) throws TException { - super(client762, protocolFactory763, transport764, resultHandler766, false); + public createBackup_call(CreateBackupReq req, AsyncMethodCallback resultHandler767, TAsyncClient client763, TProtocolFactory protocolFactory764, TNonblockingTransport transport765) throws TException { + super(client763, protocolFactory764, transport765, resultHandler767, false); this.req = req; } @@ -6653,17 +6702,17 @@ public CreateBackupResp getResult() throws TException { } } - public void restoreMeta(RestoreMetaReq req, AsyncMethodCallback resultHandler770) throws TException { + public void restoreMeta(RestoreMetaReq req, AsyncMethodCallback resultHandler771) throws TException { checkReady(); - restoreMeta_call method_call = new restoreMeta_call(req, resultHandler770, this, ___protocolFactory, ___transport); + restoreMeta_call method_call = new restoreMeta_call(req, resultHandler771, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class restoreMeta_call extends TAsyncMethodCall { private RestoreMetaReq req; - public restoreMeta_call(RestoreMetaReq req, AsyncMethodCallback resultHandler771, TAsyncClient client767, TProtocolFactory protocolFactory768, TNonblockingTransport transport769) throws TException { - super(client767, protocolFactory768, transport769, resultHandler771, false); + public restoreMeta_call(RestoreMetaReq req, AsyncMethodCallback resultHandler772, TAsyncClient client768, TProtocolFactory protocolFactory769, TNonblockingTransport transport770) throws TException { + super(client768, protocolFactory769, transport770, resultHandler772, false); this.req = req; } @@ -6685,17 +6734,17 @@ public ExecResp getResult() throws TException { } } - public void addListener(AddListenerReq req, AsyncMethodCallback resultHandler775) throws TException { + public void addListener(AddListenerReq req, AsyncMethodCallback resultHandler776) throws TException { checkReady(); - addListener_call method_call = new addListener_call(req, resultHandler775, this, ___protocolFactory, ___transport); + addListener_call method_call = new addListener_call(req, resultHandler776, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addListener_call extends TAsyncMethodCall { private AddListenerReq req; - public addListener_call(AddListenerReq req, AsyncMethodCallback resultHandler776, TAsyncClient client772, TProtocolFactory protocolFactory773, TNonblockingTransport transport774) throws TException { - super(client772, protocolFactory773, transport774, resultHandler776, false); + public addListener_call(AddListenerReq req, AsyncMethodCallback resultHandler777, TAsyncClient client773, TProtocolFactory protocolFactory774, TNonblockingTransport transport775) throws TException { + super(client773, protocolFactory774, transport775, resultHandler777, false); this.req = req; } @@ -6717,17 +6766,17 @@ public ExecResp getResult() throws TException { } } - public void removeListener(RemoveListenerReq req, AsyncMethodCallback resultHandler780) throws TException { + public void removeListener(RemoveListenerReq req, AsyncMethodCallback resultHandler781) throws TException { checkReady(); - removeListener_call method_call = new removeListener_call(req, resultHandler780, this, ___protocolFactory, ___transport); + removeListener_call method_call = new removeListener_call(req, resultHandler781, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class removeListener_call extends TAsyncMethodCall { private RemoveListenerReq req; - public removeListener_call(RemoveListenerReq req, AsyncMethodCallback resultHandler781, TAsyncClient client777, TProtocolFactory protocolFactory778, TNonblockingTransport transport779) throws TException { - super(client777, protocolFactory778, transport779, resultHandler781, false); + public removeListener_call(RemoveListenerReq req, AsyncMethodCallback resultHandler782, TAsyncClient client778, TProtocolFactory protocolFactory779, TNonblockingTransport transport780) throws TException { + super(client778, protocolFactory779, transport780, resultHandler782, false); this.req = req; } @@ -6749,17 +6798,17 @@ public ExecResp getResult() throws TException { } } - public void listListener(ListListenerReq req, AsyncMethodCallback resultHandler785) throws TException { + public void listListener(ListListenerReq req, AsyncMethodCallback resultHandler786) throws TException { checkReady(); - listListener_call method_call = new listListener_call(req, resultHandler785, this, ___protocolFactory, ___transport); + listListener_call method_call = new listListener_call(req, resultHandler786, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listListener_call extends TAsyncMethodCall { private ListListenerReq req; - public listListener_call(ListListenerReq req, AsyncMethodCallback resultHandler786, TAsyncClient client782, TProtocolFactory protocolFactory783, TNonblockingTransport transport784) throws TException { - super(client782, protocolFactory783, transport784, resultHandler786, false); + public listListener_call(ListListenerReq req, AsyncMethodCallback resultHandler787, TAsyncClient client783, TProtocolFactory protocolFactory784, TNonblockingTransport transport785) throws TException { + super(client783, protocolFactory784, transport785, resultHandler787, false); this.req = req; } @@ -6781,17 +6830,17 @@ public ListListenerResp getResult() throws TException { } } - public void getStats(GetStatsReq req, AsyncMethodCallback resultHandler790) throws TException { + public void getStats(GetStatsReq req, AsyncMethodCallback resultHandler791) throws TException { checkReady(); - getStats_call method_call = new getStats_call(req, resultHandler790, this, ___protocolFactory, ___transport); + getStats_call method_call = new getStats_call(req, resultHandler791, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getStats_call extends TAsyncMethodCall { private GetStatsReq req; - public getStats_call(GetStatsReq req, AsyncMethodCallback resultHandler791, TAsyncClient client787, TProtocolFactory protocolFactory788, TNonblockingTransport transport789) throws TException { - super(client787, protocolFactory788, transport789, resultHandler791, false); + public getStats_call(GetStatsReq req, AsyncMethodCallback resultHandler792, TAsyncClient client788, TProtocolFactory protocolFactory789, TNonblockingTransport transport790) throws TException { + super(client788, protocolFactory789, transport790, resultHandler792, false); this.req = req; } @@ -6813,17 +6862,17 @@ public GetStatsResp getResult() throws TException { } } - public void signInFTService(SignInFTServiceReq req, AsyncMethodCallback resultHandler795) throws TException { + public void signInFTService(SignInFTServiceReq req, AsyncMethodCallback resultHandler796) throws TException { checkReady(); - signInFTService_call method_call = new signInFTService_call(req, resultHandler795, this, ___protocolFactory, ___transport); + signInFTService_call method_call = new signInFTService_call(req, resultHandler796, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class signInFTService_call extends TAsyncMethodCall { private SignInFTServiceReq req; - public signInFTService_call(SignInFTServiceReq req, AsyncMethodCallback resultHandler796, TAsyncClient client792, TProtocolFactory protocolFactory793, TNonblockingTransport transport794) throws TException { - super(client792, protocolFactory793, transport794, resultHandler796, false); + public signInFTService_call(SignInFTServiceReq req, AsyncMethodCallback resultHandler797, TAsyncClient client793, TProtocolFactory protocolFactory794, TNonblockingTransport transport795) throws TException { + super(client793, protocolFactory794, transport795, resultHandler797, false); this.req = req; } @@ -6845,17 +6894,17 @@ public ExecResp getResult() throws TException { } } - public void signOutFTService(SignOutFTServiceReq req, AsyncMethodCallback resultHandler800) throws TException { + public void signOutFTService(SignOutFTServiceReq req, AsyncMethodCallback resultHandler801) throws TException { checkReady(); - signOutFTService_call method_call = new signOutFTService_call(req, resultHandler800, this, ___protocolFactory, ___transport); + signOutFTService_call method_call = new signOutFTService_call(req, resultHandler801, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class signOutFTService_call extends TAsyncMethodCall { private SignOutFTServiceReq req; - public signOutFTService_call(SignOutFTServiceReq req, AsyncMethodCallback resultHandler801, TAsyncClient client797, TProtocolFactory protocolFactory798, TNonblockingTransport transport799) throws TException { - super(client797, protocolFactory798, transport799, resultHandler801, false); + public signOutFTService_call(SignOutFTServiceReq req, AsyncMethodCallback resultHandler802, TAsyncClient client798, TProtocolFactory protocolFactory799, TNonblockingTransport transport800) throws TException { + super(client798, protocolFactory799, transport800, resultHandler802, false); this.req = req; } @@ -6877,17 +6926,17 @@ public ExecResp getResult() throws TException { } } - public void listFTClients(ListFTClientsReq req, AsyncMethodCallback resultHandler805) throws TException { + public void listFTClients(ListFTClientsReq req, AsyncMethodCallback resultHandler806) throws TException { checkReady(); - listFTClients_call method_call = new listFTClients_call(req, resultHandler805, this, ___protocolFactory, ___transport); + listFTClients_call method_call = new listFTClients_call(req, resultHandler806, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listFTClients_call extends TAsyncMethodCall { private ListFTClientsReq req; - public listFTClients_call(ListFTClientsReq req, AsyncMethodCallback resultHandler806, TAsyncClient client802, TProtocolFactory protocolFactory803, TNonblockingTransport transport804) throws TException { - super(client802, protocolFactory803, transport804, resultHandler806, false); + public listFTClients_call(ListFTClientsReq req, AsyncMethodCallback resultHandler807, TAsyncClient client803, TProtocolFactory protocolFactory804, TNonblockingTransport transport805) throws TException { + super(client803, protocolFactory804, transport805, resultHandler807, false); this.req = req; } @@ -6909,17 +6958,17 @@ public ListFTClientsResp getResult() throws TException { } } - public void createFTIndex(CreateFTIndexReq req, AsyncMethodCallback resultHandler810) throws TException { + public void createFTIndex(CreateFTIndexReq req, AsyncMethodCallback resultHandler811) throws TException { checkReady(); - createFTIndex_call method_call = new createFTIndex_call(req, resultHandler810, this, ___protocolFactory, ___transport); + createFTIndex_call method_call = new createFTIndex_call(req, resultHandler811, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createFTIndex_call extends TAsyncMethodCall { private CreateFTIndexReq req; - public createFTIndex_call(CreateFTIndexReq req, AsyncMethodCallback resultHandler811, TAsyncClient client807, TProtocolFactory protocolFactory808, TNonblockingTransport transport809) throws TException { - super(client807, protocolFactory808, transport809, resultHandler811, false); + public createFTIndex_call(CreateFTIndexReq req, AsyncMethodCallback resultHandler812, TAsyncClient client808, TProtocolFactory protocolFactory809, TNonblockingTransport transport810) throws TException { + super(client808, protocolFactory809, transport810, resultHandler812, false); this.req = req; } @@ -6941,17 +6990,17 @@ public ExecResp getResult() throws TException { } } - public void dropFTIndex(DropFTIndexReq req, AsyncMethodCallback resultHandler815) throws TException { + public void dropFTIndex(DropFTIndexReq req, AsyncMethodCallback resultHandler816) throws TException { checkReady(); - dropFTIndex_call method_call = new dropFTIndex_call(req, resultHandler815, this, ___protocolFactory, ___transport); + dropFTIndex_call method_call = new dropFTIndex_call(req, resultHandler816, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropFTIndex_call extends TAsyncMethodCall { private DropFTIndexReq req; - public dropFTIndex_call(DropFTIndexReq req, AsyncMethodCallback resultHandler816, TAsyncClient client812, TProtocolFactory protocolFactory813, TNonblockingTransport transport814) throws TException { - super(client812, protocolFactory813, transport814, resultHandler816, false); + public dropFTIndex_call(DropFTIndexReq req, AsyncMethodCallback resultHandler817, TAsyncClient client813, TProtocolFactory protocolFactory814, TNonblockingTransport transport815) throws TException { + super(client813, protocolFactory814, transport815, resultHandler817, false); this.req = req; } @@ -6973,17 +7022,17 @@ public ExecResp getResult() throws TException { } } - public void listFTIndexes(ListFTIndexesReq req, AsyncMethodCallback resultHandler820) throws TException { + public void listFTIndexes(ListFTIndexesReq req, AsyncMethodCallback resultHandler821) throws TException { checkReady(); - listFTIndexes_call method_call = new listFTIndexes_call(req, resultHandler820, this, ___protocolFactory, ___transport); + listFTIndexes_call method_call = new listFTIndexes_call(req, resultHandler821, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listFTIndexes_call extends TAsyncMethodCall { private ListFTIndexesReq req; - public listFTIndexes_call(ListFTIndexesReq req, AsyncMethodCallback resultHandler821, TAsyncClient client817, TProtocolFactory protocolFactory818, TNonblockingTransport transport819) throws TException { - super(client817, protocolFactory818, transport819, resultHandler821, false); + public listFTIndexes_call(ListFTIndexesReq req, AsyncMethodCallback resultHandler822, TAsyncClient client818, TProtocolFactory protocolFactory819, TNonblockingTransport transport820) throws TException { + super(client818, protocolFactory819, transport820, resultHandler822, false); this.req = req; } @@ -7005,17 +7054,17 @@ public ListFTIndexesResp getResult() throws TException { } } - public void createSession(CreateSessionReq req, AsyncMethodCallback resultHandler825) throws TException { + public void createSession(CreateSessionReq req, AsyncMethodCallback resultHandler826) throws TException { checkReady(); - createSession_call method_call = new createSession_call(req, resultHandler825, this, ___protocolFactory, ___transport); + createSession_call method_call = new createSession_call(req, resultHandler826, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createSession_call extends TAsyncMethodCall { private CreateSessionReq req; - public createSession_call(CreateSessionReq req, AsyncMethodCallback resultHandler826, TAsyncClient client822, TProtocolFactory protocolFactory823, TNonblockingTransport transport824) throws TException { - super(client822, protocolFactory823, transport824, resultHandler826, false); + public createSession_call(CreateSessionReq req, AsyncMethodCallback resultHandler827, TAsyncClient client823, TProtocolFactory protocolFactory824, TNonblockingTransport transport825) throws TException { + super(client823, protocolFactory824, transport825, resultHandler827, false); this.req = req; } @@ -7037,17 +7086,17 @@ public CreateSessionResp getResult() throws TException { } } - public void updateSessions(UpdateSessionsReq req, AsyncMethodCallback resultHandler830) throws TException { + public void updateSessions(UpdateSessionsReq req, AsyncMethodCallback resultHandler831) throws TException { checkReady(); - updateSessions_call method_call = new updateSessions_call(req, resultHandler830, this, ___protocolFactory, ___transport); + updateSessions_call method_call = new updateSessions_call(req, resultHandler831, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class updateSessions_call extends TAsyncMethodCall { private UpdateSessionsReq req; - public updateSessions_call(UpdateSessionsReq req, AsyncMethodCallback resultHandler831, TAsyncClient client827, TProtocolFactory protocolFactory828, TNonblockingTransport transport829) throws TException { - super(client827, protocolFactory828, transport829, resultHandler831, false); + public updateSessions_call(UpdateSessionsReq req, AsyncMethodCallback resultHandler832, TAsyncClient client828, TProtocolFactory protocolFactory829, TNonblockingTransport transport830) throws TException { + super(client828, protocolFactory829, transport830, resultHandler832, false); this.req = req; } @@ -7069,17 +7118,17 @@ public UpdateSessionsResp getResult() throws TException { } } - public void listSessions(ListSessionsReq req, AsyncMethodCallback resultHandler835) throws TException { + public void listSessions(ListSessionsReq req, AsyncMethodCallback resultHandler836) throws TException { checkReady(); - listSessions_call method_call = new listSessions_call(req, resultHandler835, this, ___protocolFactory, ___transport); + listSessions_call method_call = new listSessions_call(req, resultHandler836, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listSessions_call extends TAsyncMethodCall { private ListSessionsReq req; - public listSessions_call(ListSessionsReq req, AsyncMethodCallback resultHandler836, TAsyncClient client832, TProtocolFactory protocolFactory833, TNonblockingTransport transport834) throws TException { - super(client832, protocolFactory833, transport834, resultHandler836, false); + public listSessions_call(ListSessionsReq req, AsyncMethodCallback resultHandler837, TAsyncClient client833, TProtocolFactory protocolFactory834, TNonblockingTransport transport835) throws TException { + super(client833, protocolFactory834, transport835, resultHandler837, false); this.req = req; } @@ -7101,17 +7150,17 @@ public ListSessionsResp getResult() throws TException { } } - public void getSession(GetSessionReq req, AsyncMethodCallback resultHandler840) throws TException { + public void getSession(GetSessionReq req, AsyncMethodCallback resultHandler841) throws TException { checkReady(); - getSession_call method_call = new getSession_call(req, resultHandler840, this, ___protocolFactory, ___transport); + getSession_call method_call = new getSession_call(req, resultHandler841, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getSession_call extends TAsyncMethodCall { private GetSessionReq req; - public getSession_call(GetSessionReq req, AsyncMethodCallback resultHandler841, TAsyncClient client837, TProtocolFactory protocolFactory838, TNonblockingTransport transport839) throws TException { - super(client837, protocolFactory838, transport839, resultHandler841, false); + public getSession_call(GetSessionReq req, AsyncMethodCallback resultHandler842, TAsyncClient client838, TProtocolFactory protocolFactory839, TNonblockingTransport transport840) throws TException { + super(client838, protocolFactory839, transport840, resultHandler842, false); this.req = req; } @@ -7133,17 +7182,17 @@ public GetSessionResp getResult() throws TException { } } - public void removeSession(RemoveSessionReq req, AsyncMethodCallback resultHandler845) throws TException { + public void removeSession(RemoveSessionReq req, AsyncMethodCallback resultHandler846) throws TException { checkReady(); - removeSession_call method_call = new removeSession_call(req, resultHandler845, this, ___protocolFactory, ___transport); + removeSession_call method_call = new removeSession_call(req, resultHandler846, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class removeSession_call extends TAsyncMethodCall { private RemoveSessionReq req; - public removeSession_call(RemoveSessionReq req, AsyncMethodCallback resultHandler846, TAsyncClient client842, TProtocolFactory protocolFactory843, TNonblockingTransport transport844) throws TException { - super(client842, protocolFactory843, transport844, resultHandler846, false); + public removeSession_call(RemoveSessionReq req, AsyncMethodCallback resultHandler847, TAsyncClient client843, TProtocolFactory protocolFactory844, TNonblockingTransport transport845) throws TException { + super(client843, protocolFactory844, transport845, resultHandler847, false); this.req = req; } @@ -7165,17 +7214,17 @@ public ExecResp getResult() throws TException { } } - public void killQuery(KillQueryReq req, AsyncMethodCallback resultHandler850) throws TException { + public void killQuery(KillQueryReq req, AsyncMethodCallback resultHandler851) throws TException { checkReady(); - killQuery_call method_call = new killQuery_call(req, resultHandler850, this, ___protocolFactory, ___transport); + killQuery_call method_call = new killQuery_call(req, resultHandler851, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class killQuery_call extends TAsyncMethodCall { private KillQueryReq req; - public killQuery_call(KillQueryReq req, AsyncMethodCallback resultHandler851, TAsyncClient client847, TProtocolFactory protocolFactory848, TNonblockingTransport transport849) throws TException { - super(client847, protocolFactory848, transport849, resultHandler851, false); + public killQuery_call(KillQueryReq req, AsyncMethodCallback resultHandler852, TAsyncClient client848, TProtocolFactory protocolFactory849, TNonblockingTransport transport850) throws TException { + super(client848, protocolFactory849, transport850, resultHandler852, false); this.req = req; } @@ -7197,17 +7246,17 @@ public ExecResp getResult() throws TException { } } - public void reportTaskFinish(ReportTaskReq req, AsyncMethodCallback resultHandler855) throws TException { + public void reportTaskFinish(ReportTaskReq req, AsyncMethodCallback resultHandler856) throws TException { checkReady(); - reportTaskFinish_call method_call = new reportTaskFinish_call(req, resultHandler855, this, ___protocolFactory, ___transport); + reportTaskFinish_call method_call = new reportTaskFinish_call(req, resultHandler856, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class reportTaskFinish_call extends TAsyncMethodCall { private ReportTaskReq req; - public reportTaskFinish_call(ReportTaskReq req, AsyncMethodCallback resultHandler856, TAsyncClient client852, TProtocolFactory protocolFactory853, TNonblockingTransport transport854) throws TException { - super(client852, protocolFactory853, transport854, resultHandler856, false); + public reportTaskFinish_call(ReportTaskReq req, AsyncMethodCallback resultHandler857, TAsyncClient client853, TProtocolFactory protocolFactory854, TNonblockingTransport transport855) throws TException { + super(client853, protocolFactory854, transport855, resultHandler857, false); this.req = req; } @@ -7229,17 +7278,17 @@ public ExecResp getResult() throws TException { } } - public void listCluster(ListClusterInfoReq req, AsyncMethodCallback resultHandler860) throws TException { + public void listCluster(ListClusterInfoReq req, AsyncMethodCallback resultHandler861) throws TException { checkReady(); - listCluster_call method_call = new listCluster_call(req, resultHandler860, this, ___protocolFactory, ___transport); + listCluster_call method_call = new listCluster_call(req, resultHandler861, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listCluster_call extends TAsyncMethodCall { private ListClusterInfoReq req; - public listCluster_call(ListClusterInfoReq req, AsyncMethodCallback resultHandler861, TAsyncClient client857, TProtocolFactory protocolFactory858, TNonblockingTransport transport859) throws TException { - super(client857, protocolFactory858, transport859, resultHandler861, false); + public listCluster_call(ListClusterInfoReq req, AsyncMethodCallback resultHandler862, TAsyncClient client858, TProtocolFactory protocolFactory859, TNonblockingTransport transport860) throws TException { + super(client858, protocolFactory859, transport860, resultHandler862, false); this.req = req; } @@ -7261,17 +7310,17 @@ public ListClusterInfoResp getResult() throws TException { } } - public void getMetaDirInfo(GetMetaDirInfoReq req, AsyncMethodCallback resultHandler865) throws TException { + public void getMetaDirInfo(GetMetaDirInfoReq req, AsyncMethodCallback resultHandler866) throws TException { checkReady(); - getMetaDirInfo_call method_call = new getMetaDirInfo_call(req, resultHandler865, this, ___protocolFactory, ___transport); + getMetaDirInfo_call method_call = new getMetaDirInfo_call(req, resultHandler866, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getMetaDirInfo_call extends TAsyncMethodCall { private GetMetaDirInfoReq req; - public getMetaDirInfo_call(GetMetaDirInfoReq req, AsyncMethodCallback resultHandler866, TAsyncClient client862, TProtocolFactory protocolFactory863, TNonblockingTransport transport864) throws TException { - super(client862, protocolFactory863, transport864, resultHandler866, false); + public getMetaDirInfo_call(GetMetaDirInfoReq req, AsyncMethodCallback resultHandler867, TAsyncClient client863, TProtocolFactory protocolFactory864, TNonblockingTransport transport865) throws TException { + super(client863, protocolFactory864, transport865, resultHandler867, false); this.req = req; } @@ -7293,6 +7342,38 @@ public GetMetaDirInfoResp getResult() throws TException { } } + public void verifyClientVersion(VerifyClientVersionReq req, AsyncMethodCallback resultHandler871) throws TException { + checkReady(); + verifyClientVersion_call method_call = new verifyClientVersion_call(req, resultHandler871, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class verifyClientVersion_call extends TAsyncMethodCall { + private VerifyClientVersionReq req; + public verifyClientVersion_call(VerifyClientVersionReq req, AsyncMethodCallback resultHandler872, TAsyncClient client868, TProtocolFactory protocolFactory869, TNonblockingTransport transport870) throws TException { + super(client868, protocolFactory869, transport870, resultHandler872, false); + this.req = req; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("verifyClientVersion", TMessageType.CALL, 0)); + verifyClientVersion_args args = new verifyClientVersion_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public VerifyClientVersionResp getResult() throws TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_verifyClientVersion(); + } + } + } public static class Processor implements TProcessor { @@ -7390,6 +7471,7 @@ public Processor(Iface iface) processMap_.put("reportTaskFinish", new reportTaskFinish()); processMap_.put("listCluster", new listCluster()); processMap_.put("getMetaDirInfo", new getMetaDirInfo()); + processMap_.put("verifyClientVersion", new verifyClientVersion()); } protected static interface ProcessFunction { @@ -9291,6 +9373,27 @@ public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionCont } + private class verifyClientVersion implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException + { + Object handler_ctx = event_handler_.getContext("MetaService.verifyClientVersion", server_ctx); + verifyClientVersion_args args = new verifyClientVersion_args(); + event_handler_.preRead(handler_ctx, "MetaService.verifyClientVersion"); + args.read(iprot); + iprot.readMessageEnd(); + event_handler_.postRead(handler_ctx, "MetaService.verifyClientVersion", args); + verifyClientVersion_result result = new verifyClientVersion_result(); + result.success = iface_.verifyClientVersion(args.req); + event_handler_.preWrite(handler_ctx, "MetaService.verifyClientVersion", result); + oprot.writeMessageBegin(new TMessage("verifyClientVersion", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + event_handler_.postWrite(handler_ctx, "MetaService.verifyClientVersion", result); + } + + } + } public static class createSpace_args implements TBase, java.io.Serializable, Cloneable, Comparable { @@ -47801,4 +47904,439 @@ public void validate() throws TException { } + public static class verifyClientVersion_args implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("verifyClientVersion_args"); + private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1); + + public VerifyClientVersionReq req; + public static final int REQ = 1; + + // isset id assignments + + public static final Map metaDataMap; + + static { + Map tmpMetaDataMap = new HashMap(); + tmpMetaDataMap.put(REQ, new FieldMetaData("req", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, VerifyClientVersionReq.class))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(verifyClientVersion_args.class, metaDataMap); + } + + public verifyClientVersion_args() { + } + + public verifyClientVersion_args( + VerifyClientVersionReq req) { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public verifyClientVersion_args(verifyClientVersion_args other) { + if (other.isSetReq()) { + this.req = TBaseHelper.deepCopy(other.req); + } + } + + public verifyClientVersion_args deepCopy() { + return new verifyClientVersion_args(this); + } + + public VerifyClientVersionReq getReq() { + return this.req; + } + + public verifyClientVersion_args setReq(VerifyClientVersionReq req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + // Returns true if field req is set (has been assigned a value) and false otherwise + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean __value) { + if (!__value) { + this.req = null; + } + } + + public void setFieldValue(int fieldID, Object __value) { + switch (fieldID) { + case REQ: + if (__value == null) { + unsetReq(); + } else { + setReq((VerifyClientVersionReq)__value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case REQ: + return getReq(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object _that) { + if (_that == null) + return false; + if (this == _that) + return true; + if (!(_that instanceof verifyClientVersion_args)) + return false; + verifyClientVersion_args that = (verifyClientVersion_args)_that; + + if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; } + + return true; + } + + @Override + public int hashCode() { + return Arrays.deepHashCode(new Object[] {req}); + } + + @Override + public int compareTo(verifyClientVersion_args other) { + if (other == null) { + // See java.lang.Comparable docs + throw new NullPointerException(); + } + + if (other == this) { + return 0; + } + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + return 0; + } + + public void read(TProtocol iprot) throws TException { + TField __field; + iprot.readStructBegin(metaDataMap); + while (true) + { + __field = iprot.readFieldBegin(); + if (__field.type == TType.STOP) { + break; + } + switch (__field.id) + { + case REQ: + if (__field.type == TType.STRUCT) { + this.req = new VerifyClientVersionReq(); + this.req.read(iprot); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + default: + TProtocolUtil.skip(iprot, __field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + this.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + return toString(1, true); + } + + @Override + public String toString(int indent, boolean prettyPrint) { + String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; + String newLine = prettyPrint ? "\n" : ""; + String space = prettyPrint ? " " : ""; + StringBuilder sb = new StringBuilder("verifyClientVersion_args"); + sb.append(space); + sb.append("("); + sb.append(newLine); + boolean first = true; + + sb.append(indentStr); + sb.append("req"); + sb.append(space); + sb.append(":").append(space); + if (this.getReq() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getReq(), indent + 1, prettyPrint)); + } + first = false; + sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class verifyClientVersion_result implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("verifyClientVersion_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + + public VerifyClientVersionResp success; + public static final int SUCCESS = 0; + + // isset id assignments + + public static final Map metaDataMap; + + static { + Map tmpMetaDataMap = new HashMap(); + tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, VerifyClientVersionResp.class))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(verifyClientVersion_result.class, metaDataMap); + } + + public verifyClientVersion_result() { + } + + public verifyClientVersion_result( + VerifyClientVersionResp success) { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public verifyClientVersion_result(verifyClientVersion_result other) { + if (other.isSetSuccess()) { + this.success = TBaseHelper.deepCopy(other.success); + } + } + + public verifyClientVersion_result deepCopy() { + return new verifyClientVersion_result(this); + } + + public VerifyClientVersionResp getSuccess() { + return this.success; + } + + public verifyClientVersion_result setSuccess(VerifyClientVersionResp 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 void setFieldValue(int fieldID, Object __value) { + switch (fieldID) { + case SUCCESS: + if (__value == null) { + unsetSuccess(); + } else { + setSuccess((VerifyClientVersionResp)__value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object _that) { + if (_that == null) + return false; + if (this == _that) + return true; + if (!(_that instanceof verifyClientVersion_result)) + return false; + verifyClientVersion_result that = (verifyClientVersion_result)_that; + + if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; } + + return true; + } + + @Override + public int hashCode() { + return Arrays.deepHashCode(new Object[] {success}); + } + + @Override + public int compareTo(verifyClientVersion_result other) { + if (other == null) { + // See java.lang.Comparable docs + throw new NullPointerException(); + } + + if (other == this) { + return 0; + } + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + return 0; + } + + public void read(TProtocol iprot) throws TException { + TField __field; + iprot.readStructBegin(metaDataMap); + while (true) + { + __field = iprot.readFieldBegin(); + if (__field.type == TType.STOP) { + break; + } + switch (__field.id) + { + case SUCCESS: + if (__field.type == TType.STRUCT) { + this.success = new VerifyClientVersionResp(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + default: + TProtocolUtil.skip(iprot, __field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + return toString(1, true); + } + + @Override + public String toString(int indent, boolean prettyPrint) { + String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; + String newLine = prettyPrint ? "\n" : ""; + String space = prettyPrint ? " " : ""; + StringBuilder sb = new StringBuilder("verifyClientVersion_result"); + sb.append(space); + sb.append("("); + sb.append(newLine); + boolean first = true; + + sb.append(indentStr); + sb.append("success"); + sb.append(space); + sb.append(":").append(space); + if (this.getSuccess() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getSuccess(), indent + 1, prettyPrint)); + } + first = false; + sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + } diff --git a/client/src/main/generated/com/vesoft/nebula/meta/PropertyType.java b/client/src/main/generated/com/vesoft/nebula/meta/PropertyType.java index 52262fbe4..fc77cc24b 100644 --- a/client/src/main/generated/com/vesoft/nebula/meta/PropertyType.java +++ b/client/src/main/generated/com/vesoft/nebula/meta/PropertyType.java @@ -27,7 +27,8 @@ public enum PropertyType implements com.facebook.thrift.TEnum { TIMESTAMP(21), DATE(24), DATETIME(25), - TIME(26); + TIME(26), + GEOGRAPHY(31); private final int value; @@ -78,6 +79,8 @@ public static PropertyType findByValue(int value) { return DATETIME; case 26: return TIME; + case 31: + return GEOGRAPHY; default: return null; } diff --git a/client/src/main/generated/com/vesoft/nebula/meta/VerifyClientVersionReq.java b/client/src/main/generated/com/vesoft/nebula/meta/VerifyClientVersionReq.java new file mode 100644 index 000000000..384c0e95c --- /dev/null +++ b/client/src/main/generated/com/vesoft/nebula/meta/VerifyClientVersionReq.java @@ -0,0 +1,275 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.vesoft.nebula.meta; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.Set; +import java.util.HashSet; +import java.util.Collections; +import java.util.BitSet; +import java.util.Arrays; +import com.facebook.thrift.*; +import com.facebook.thrift.annotations.*; +import com.facebook.thrift.async.*; +import com.facebook.thrift.meta_data.*; +import com.facebook.thrift.server.*; +import com.facebook.thrift.transport.*; +import com.facebook.thrift.protocol.*; + +@SuppressWarnings({ "unused", "serial" }) +public class VerifyClientVersionReq implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("VerifyClientVersionReq"); + private static final TField VERSION_FIELD_DESC = new TField("version", TType.STRING, (short)1); + + public byte[] version; + public static final int VERSION = 1; + + // isset id assignments + + public static final Map metaDataMap; + + static { + Map tmpMetaDataMap = new HashMap(); + tmpMetaDataMap.put(VERSION, new FieldMetaData("version", TFieldRequirementType.REQUIRED, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(VerifyClientVersionReq.class, metaDataMap); + } + + public VerifyClientVersionReq() { + this.version = "2.6.0".getBytes(); + + } + + public VerifyClientVersionReq( + byte[] version) { + this(); + this.version = version; + } + + public static class Builder { + private byte[] version; + + public Builder() { + } + + public Builder setVersion(final byte[] version) { + this.version = version; + return this; + } + + public VerifyClientVersionReq build() { + VerifyClientVersionReq result = new VerifyClientVersionReq(); + result.setVersion(this.version); + return result; + } + } + + public static Builder builder() { + return new Builder(); + } + + /** + * Performs a deep copy on other. + */ + public VerifyClientVersionReq(VerifyClientVersionReq other) { + if (other.isSetVersion()) { + this.version = TBaseHelper.deepCopy(other.version); + } + } + + public VerifyClientVersionReq deepCopy() { + return new VerifyClientVersionReq(this); + } + + public byte[] getVersion() { + return this.version; + } + + public VerifyClientVersionReq setVersion(byte[] 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(int fieldID, Object __value) { + switch (fieldID) { + case VERSION: + if (__value == null) { + unsetVersion(); + } else { + setVersion((byte[])__value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case VERSION: + return getVersion(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object _that) { + if (_that == null) + return false; + if (this == _that) + return true; + if (!(_that instanceof VerifyClientVersionReq)) + return false; + VerifyClientVersionReq that = (VerifyClientVersionReq)_that; + + if (!TBaseHelper.equalsSlow(this.isSetVersion(), that.isSetVersion(), this.version, that.version)) { return false; } + + return true; + } + + @Override + public int hashCode() { + return Arrays.deepHashCode(new Object[] {version}); + } + + @Override + public int compareTo(VerifyClientVersionReq other) { + if (other == null) { + // See java.lang.Comparable docs + throw new NullPointerException(); + } + + if (other == this) { + return 0; + } + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(version, other.version); + if (lastComparison != 0) { + return lastComparison; + } + return 0; + } + + public void read(TProtocol iprot) throws TException { + TField __field; + iprot.readStructBegin(metaDataMap); + while (true) + { + __field = iprot.readFieldBegin(); + if (__field.type == TType.STOP) { + break; + } + switch (__field.id) + { + case VERSION: + if (__field.type == TType.STRING) { + this.version = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + default: + TProtocolUtil.skip(iprot, __field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.version != null) { + oprot.writeFieldBegin(VERSION_FIELD_DESC); + oprot.writeBinary(this.version); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + return toString(1, true); + } + + @Override + public String toString(int indent, boolean prettyPrint) { + String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; + String newLine = prettyPrint ? "\n" : ""; + String space = prettyPrint ? " " : ""; + StringBuilder sb = new StringBuilder("VerifyClientVersionReq"); + sb.append(space); + sb.append("("); + sb.append(newLine); + boolean first = true; + + sb.append(indentStr); + sb.append("version"); + sb.append(space); + sb.append(":").append(space); + if (this.getVersion() == null) { + sb.append("null"); + } else { + int __version_size = Math.min(this.getVersion().length, 128); + for (int i = 0; i < __version_size; i++) { + if (i != 0) sb.append(" "); + sb.append(Integer.toHexString(this.getVersion()[i]).length() > 1 ? Integer.toHexString(this.getVersion()[i]).substring(Integer.toHexString(this.getVersion()[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.getVersion()[i]).toUpperCase()); + } + if (this.getVersion().length > 128) sb.append(" ..."); + } + first = false; + sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + if (version == null) { + throw new TProtocolException(TProtocolException.MISSING_REQUIRED_FIELD, "Required field 'version' was not present! Struct: " + toString()); + } + } + +} + diff --git a/client/src/main/generated/com/vesoft/nebula/meta/VerifyClientVersionResp.java b/client/src/main/generated/com/vesoft/nebula/meta/VerifyClientVersionResp.java new file mode 100644 index 000000000..aec55d70f --- /dev/null +++ b/client/src/main/generated/com/vesoft/nebula/meta/VerifyClientVersionResp.java @@ -0,0 +1,474 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.vesoft.nebula.meta; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.Set; +import java.util.HashSet; +import java.util.Collections; +import java.util.BitSet; +import java.util.Arrays; +import com.facebook.thrift.*; +import com.facebook.thrift.annotations.*; +import com.facebook.thrift.async.*; +import com.facebook.thrift.meta_data.*; +import com.facebook.thrift.server.*; +import com.facebook.thrift.transport.*; +import com.facebook.thrift.protocol.*; + +@SuppressWarnings({ "unused", "serial" }) +public class VerifyClientVersionResp implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("VerifyClientVersionResp"); + private static final TField CODE_FIELD_DESC = new TField("code", TType.I32, (short)1); + private static final TField LEADER_FIELD_DESC = new TField("leader", TType.STRUCT, (short)2); + private static final TField ERROR_MSG_FIELD_DESC = new TField("error_msg", TType.STRING, (short)3); + + /** + * + * @see com.vesoft.nebula.ErrorCode + */ + public com.vesoft.nebula.ErrorCode code; + public com.vesoft.nebula.HostAddr leader; + public byte[] error_msg; + public static final int CODE = 1; + public static final int LEADER = 2; + public static final int ERROR_MSG = 3; + + // isset id assignments + + public static final Map metaDataMap; + + static { + Map tmpMetaDataMap = new HashMap(); + tmpMetaDataMap.put(CODE, new FieldMetaData("code", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMetaDataMap.put(LEADER, new FieldMetaData("leader", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.vesoft.nebula.HostAddr.class))); + tmpMetaDataMap.put(ERROR_MSG, new FieldMetaData("error_msg", TFieldRequirementType.OPTIONAL, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(VerifyClientVersionResp.class, metaDataMap); + } + + public VerifyClientVersionResp() { + } + + public VerifyClientVersionResp( + com.vesoft.nebula.ErrorCode code, + com.vesoft.nebula.HostAddr leader) { + this(); + this.code = code; + this.leader = leader; + } + + public VerifyClientVersionResp( + com.vesoft.nebula.ErrorCode code, + com.vesoft.nebula.HostAddr leader, + byte[] error_msg) { + this(); + this.code = code; + this.leader = leader; + this.error_msg = error_msg; + } + + public static class Builder { + private com.vesoft.nebula.ErrorCode code; + private com.vesoft.nebula.HostAddr leader; + private byte[] error_msg; + + public Builder() { + } + + public Builder setCode(final com.vesoft.nebula.ErrorCode code) { + this.code = code; + return this; + } + + public Builder setLeader(final com.vesoft.nebula.HostAddr leader) { + this.leader = leader; + return this; + } + + public Builder setError_msg(final byte[] error_msg) { + this.error_msg = error_msg; + return this; + } + + public VerifyClientVersionResp build() { + VerifyClientVersionResp result = new VerifyClientVersionResp(); + result.setCode(this.code); + result.setLeader(this.leader); + result.setError_msg(this.error_msg); + return result; + } + } + + public static Builder builder() { + return new Builder(); + } + + /** + * Performs a deep copy on other. + */ + public VerifyClientVersionResp(VerifyClientVersionResp other) { + if (other.isSetCode()) { + this.code = TBaseHelper.deepCopy(other.code); + } + if (other.isSetLeader()) { + this.leader = TBaseHelper.deepCopy(other.leader); + } + if (other.isSetError_msg()) { + this.error_msg = TBaseHelper.deepCopy(other.error_msg); + } + } + + public VerifyClientVersionResp deepCopy() { + return new VerifyClientVersionResp(this); + } + + /** + * + * @see com.vesoft.nebula.ErrorCode + */ + public com.vesoft.nebula.ErrorCode getCode() { + return this.code; + } + + /** + * + * @see com.vesoft.nebula.ErrorCode + */ + public VerifyClientVersionResp setCode(com.vesoft.nebula.ErrorCode code) { + this.code = code; + return this; + } + + public void unsetCode() { + this.code = null; + } + + // Returns true if field code is set (has been assigned a value) and false otherwise + public boolean isSetCode() { + return this.code != null; + } + + public void setCodeIsSet(boolean __value) { + if (!__value) { + this.code = null; + } + } + + public com.vesoft.nebula.HostAddr getLeader() { + return this.leader; + } + + public VerifyClientVersionResp setLeader(com.vesoft.nebula.HostAddr leader) { + this.leader = leader; + return this; + } + + public void unsetLeader() { + this.leader = null; + } + + // Returns true if field leader is set (has been assigned a value) and false otherwise + public boolean isSetLeader() { + return this.leader != null; + } + + public void setLeaderIsSet(boolean __value) { + if (!__value) { + this.leader = null; + } + } + + public byte[] getError_msg() { + return this.error_msg; + } + + public VerifyClientVersionResp setError_msg(byte[] error_msg) { + this.error_msg = error_msg; + return this; + } + + public void unsetError_msg() { + this.error_msg = null; + } + + // Returns true if field error_msg is set (has been assigned a value) and false otherwise + public boolean isSetError_msg() { + return this.error_msg != null; + } + + public void setError_msgIsSet(boolean __value) { + if (!__value) { + this.error_msg = null; + } + } + + public void setFieldValue(int fieldID, Object __value) { + switch (fieldID) { + case CODE: + if (__value == null) { + unsetCode(); + } else { + setCode((com.vesoft.nebula.ErrorCode)__value); + } + break; + + case LEADER: + if (__value == null) { + unsetLeader(); + } else { + setLeader((com.vesoft.nebula.HostAddr)__value); + } + break; + + case ERROR_MSG: + if (__value == null) { + unsetError_msg(); + } else { + setError_msg((byte[])__value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case CODE: + return getCode(); + + case LEADER: + return getLeader(); + + case ERROR_MSG: + return getError_msg(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object _that) { + if (_that == null) + return false; + if (this == _that) + return true; + if (!(_that instanceof VerifyClientVersionResp)) + return false; + VerifyClientVersionResp that = (VerifyClientVersionResp)_that; + + if (!TBaseHelper.equalsNobinary(this.isSetCode(), that.isSetCode(), this.code, that.code)) { return false; } + + if (!TBaseHelper.equalsNobinary(this.isSetLeader(), that.isSetLeader(), this.leader, that.leader)) { return false; } + + if (!TBaseHelper.equalsSlow(this.isSetError_msg(), that.isSetError_msg(), this.error_msg, that.error_msg)) { return false; } + + return true; + } + + @Override + public int hashCode() { + return Arrays.deepHashCode(new Object[] {code, leader, error_msg}); + } + + @Override + public int compareTo(VerifyClientVersionResp other) { + if (other == null) { + // See java.lang.Comparable docs + throw new NullPointerException(); + } + + if (other == this) { + return 0; + } + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetCode()).compareTo(other.isSetCode()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(code, other.code); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = Boolean.valueOf(isSetLeader()).compareTo(other.isSetLeader()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(leader, other.leader); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = Boolean.valueOf(isSetError_msg()).compareTo(other.isSetError_msg()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(error_msg, other.error_msg); + if (lastComparison != 0) { + return lastComparison; + } + return 0; + } + + public void read(TProtocol iprot) throws TException { + TField __field; + iprot.readStructBegin(metaDataMap); + while (true) + { + __field = iprot.readFieldBegin(); + if (__field.type == TType.STOP) { + break; + } + switch (__field.id) + { + case CODE: + if (__field.type == TType.I32) { + this.code = com.vesoft.nebula.ErrorCode.findByValue(iprot.readI32()); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + case LEADER: + if (__field.type == TType.STRUCT) { + this.leader = new com.vesoft.nebula.HostAddr(); + this.leader.read(iprot); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + case ERROR_MSG: + if (__field.type == TType.STRING) { + this.error_msg = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + default: + TProtocolUtil.skip(iprot, __field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.code != null) { + oprot.writeFieldBegin(CODE_FIELD_DESC); + oprot.writeI32(this.code == null ? 0 : this.code.getValue()); + oprot.writeFieldEnd(); + } + if (this.leader != null) { + oprot.writeFieldBegin(LEADER_FIELD_DESC); + this.leader.write(oprot); + oprot.writeFieldEnd(); + } + if (this.error_msg != null) { + if (isSetError_msg()) { + oprot.writeFieldBegin(ERROR_MSG_FIELD_DESC); + oprot.writeBinary(this.error_msg); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + return toString(1, true); + } + + @Override + public String toString(int indent, boolean prettyPrint) { + String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; + String newLine = prettyPrint ? "\n" : ""; + String space = prettyPrint ? " " : ""; + StringBuilder sb = new StringBuilder("VerifyClientVersionResp"); + sb.append(space); + sb.append("("); + sb.append(newLine); + boolean first = true; + + sb.append(indentStr); + sb.append("code"); + sb.append(space); + sb.append(":").append(space); + if (this.getCode() == null) { + sb.append("null"); + } else { + String code_name = this.getCode() == null ? "null" : this.getCode().name(); + if (code_name != null) { + sb.append(code_name); + sb.append(" ("); + } + sb.append(this.getCode()); + if (code_name != null) { + sb.append(")"); + } + } + first = false; + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("leader"); + sb.append(space); + sb.append(":").append(space); + if (this.getLeader() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getLeader(), indent + 1, prettyPrint)); + } + first = false; + if (isSetError_msg()) + { + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("error_msg"); + sb.append(space); + sb.append(":").append(space); + if (this.getError_msg() == null) { + sb.append("null"); + } else { + int __error_msg_size = Math.min(this.getError_msg().length, 128); + for (int i = 0; i < __error_msg_size; i++) { + if (i != 0) sb.append(" "); + sb.append(Integer.toHexString(this.getError_msg()[i]).length() > 1 ? Integer.toHexString(this.getError_msg()[i]).substring(Integer.toHexString(this.getError_msg()[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.getError_msg()[i]).toUpperCase()); + } + if (this.getError_msg().length > 128) sb.append(" ..."); + } + first = false; + } + sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git a/client/src/main/generated/com/vesoft/nebula/storage/ChainAddEdgesRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/ChainAddEdgesRequest.java new file mode 100644 index 000000000..60e78656c --- /dev/null +++ b/client/src/main/generated/com/vesoft/nebula/storage/ChainAddEdgesRequest.java @@ -0,0 +1,705 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.vesoft.nebula.storage; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.Set; +import java.util.HashSet; +import java.util.Collections; +import java.util.BitSet; +import java.util.Arrays; +import com.facebook.thrift.*; +import com.facebook.thrift.annotations.*; +import com.facebook.thrift.async.*; +import com.facebook.thrift.meta_data.*; +import com.facebook.thrift.server.*; +import com.facebook.thrift.transport.*; +import com.facebook.thrift.protocol.*; + +@SuppressWarnings({ "unused", "serial" }) +public class ChainAddEdgesRequest implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("ChainAddEdgesRequest"); + private static final TField SPACE_ID_FIELD_DESC = new TField("space_id", TType.I32, (short)1); + private static final TField PARTS_FIELD_DESC = new TField("parts", TType.MAP, (short)2); + private static final TField PROP_NAMES_FIELD_DESC = new TField("prop_names", TType.LIST, (short)3); + private static final TField IF_NOT_EXISTS_FIELD_DESC = new TField("if_not_exists", TType.BOOL, (short)4); + private static final TField TERM_FIELD_DESC = new TField("term", TType.I64, (short)5); + private static final TField EDGE_VERSION_FIELD_DESC = new TField("edge_version", TType.I64, (short)6); + + public int space_id; + public Map> parts; + public List prop_names; + public boolean if_not_exists; + public long term; + public long edge_version; + public static final int SPACE_ID = 1; + public static final int PARTS = 2; + public static final int PROP_NAMES = 3; + public static final int IF_NOT_EXISTS = 4; + public static final int TERM = 5; + public static final int EDGE_VERSION = 6; + + // isset id assignments + private static final int __SPACE_ID_ISSET_ID = 0; + private static final int __IF_NOT_EXISTS_ISSET_ID = 1; + private static final int __TERM_ISSET_ID = 2; + private static final int __EDGE_VERSION_ISSET_ID = 3; + private BitSet __isset_bit_vector = new BitSet(4); + + public static final Map metaDataMap; + + static { + Map tmpMetaDataMap = new HashMap(); + tmpMetaDataMap.put(SPACE_ID, new FieldMetaData("space_id", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMetaDataMap.put(PARTS, new FieldMetaData("parts", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.I32), + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, NewEdge.class))))); + tmpMetaDataMap.put(PROP_NAMES, new FieldMetaData("prop_names", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMetaDataMap.put(IF_NOT_EXISTS, new FieldMetaData("if_not_exists", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + tmpMetaDataMap.put(TERM, new FieldMetaData("term", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + tmpMetaDataMap.put(EDGE_VERSION, new FieldMetaData("edge_version", TFieldRequirementType.OPTIONAL, + new FieldValueMetaData(TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(ChainAddEdgesRequest.class, metaDataMap); + } + + public ChainAddEdgesRequest() { + } + + public ChainAddEdgesRequest( + int space_id, + Map> parts, + List prop_names, + boolean if_not_exists, + long term) { + this(); + this.space_id = space_id; + setSpace_idIsSet(true); + this.parts = parts; + this.prop_names = prop_names; + this.if_not_exists = if_not_exists; + setIf_not_existsIsSet(true); + this.term = term; + setTermIsSet(true); + } + + public ChainAddEdgesRequest( + int space_id, + Map> parts, + List prop_names, + boolean if_not_exists, + long term, + long edge_version) { + this(); + this.space_id = space_id; + setSpace_idIsSet(true); + this.parts = parts; + this.prop_names = prop_names; + this.if_not_exists = if_not_exists; + setIf_not_existsIsSet(true); + this.term = term; + setTermIsSet(true); + this.edge_version = edge_version; + setEdge_versionIsSet(true); + } + + public static class Builder { + private int space_id; + private Map> parts; + private List prop_names; + private boolean if_not_exists; + private long term; + private long edge_version; + + BitSet __optional_isset = new BitSet(4); + + public Builder() { + } + + public Builder setSpace_id(final int space_id) { + this.space_id = space_id; + __optional_isset.set(__SPACE_ID_ISSET_ID, true); + return this; + } + + public Builder setParts(final Map> parts) { + this.parts = parts; + return this; + } + + public Builder setProp_names(final List prop_names) { + this.prop_names = prop_names; + return this; + } + + public Builder setIf_not_exists(final boolean if_not_exists) { + this.if_not_exists = if_not_exists; + __optional_isset.set(__IF_NOT_EXISTS_ISSET_ID, true); + return this; + } + + public Builder setTerm(final long term) { + this.term = term; + __optional_isset.set(__TERM_ISSET_ID, true); + return this; + } + + public Builder setEdge_version(final long edge_version) { + this.edge_version = edge_version; + __optional_isset.set(__EDGE_VERSION_ISSET_ID, true); + return this; + } + + public ChainAddEdgesRequest build() { + ChainAddEdgesRequest result = new ChainAddEdgesRequest(); + if (__optional_isset.get(__SPACE_ID_ISSET_ID)) { + result.setSpace_id(this.space_id); + } + result.setParts(this.parts); + result.setProp_names(this.prop_names); + if (__optional_isset.get(__IF_NOT_EXISTS_ISSET_ID)) { + result.setIf_not_exists(this.if_not_exists); + } + if (__optional_isset.get(__TERM_ISSET_ID)) { + result.setTerm(this.term); + } + if (__optional_isset.get(__EDGE_VERSION_ISSET_ID)) { + result.setEdge_version(this.edge_version); + } + return result; + } + } + + public static Builder builder() { + return new Builder(); + } + + /** + * Performs a deep copy on other. + */ + public ChainAddEdgesRequest(ChainAddEdgesRequest other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.space_id = TBaseHelper.deepCopy(other.space_id); + if (other.isSetParts()) { + this.parts = TBaseHelper.deepCopy(other.parts); + } + if (other.isSetProp_names()) { + this.prop_names = TBaseHelper.deepCopy(other.prop_names); + } + this.if_not_exists = TBaseHelper.deepCopy(other.if_not_exists); + this.term = TBaseHelper.deepCopy(other.term); + this.edge_version = TBaseHelper.deepCopy(other.edge_version); + } + + public ChainAddEdgesRequest deepCopy() { + return new ChainAddEdgesRequest(this); + } + + public int getSpace_id() { + return this.space_id; + } + + public ChainAddEdgesRequest setSpace_id(int space_id) { + this.space_id = space_id; + setSpace_idIsSet(true); + return this; + } + + public void unsetSpace_id() { + __isset_bit_vector.clear(__SPACE_ID_ISSET_ID); + } + + // Returns true if field space_id is set (has been assigned a value) and false otherwise + public boolean isSetSpace_id() { + return __isset_bit_vector.get(__SPACE_ID_ISSET_ID); + } + + public void setSpace_idIsSet(boolean __value) { + __isset_bit_vector.set(__SPACE_ID_ISSET_ID, __value); + } + + public Map> getParts() { + return this.parts; + } + + public ChainAddEdgesRequest setParts(Map> parts) { + this.parts = parts; + return this; + } + + public void unsetParts() { + this.parts = null; + } + + // Returns true if field parts is set (has been assigned a value) and false otherwise + public boolean isSetParts() { + return this.parts != null; + } + + public void setPartsIsSet(boolean __value) { + if (!__value) { + this.parts = null; + } + } + + public List getProp_names() { + return this.prop_names; + } + + public ChainAddEdgesRequest setProp_names(List prop_names) { + this.prop_names = prop_names; + return this; + } + + public void unsetProp_names() { + this.prop_names = null; + } + + // Returns true if field prop_names is set (has been assigned a value) and false otherwise + public boolean isSetProp_names() { + return this.prop_names != null; + } + + public void setProp_namesIsSet(boolean __value) { + if (!__value) { + this.prop_names = null; + } + } + + public boolean isIf_not_exists() { + return this.if_not_exists; + } + + public ChainAddEdgesRequest setIf_not_exists(boolean if_not_exists) { + this.if_not_exists = if_not_exists; + setIf_not_existsIsSet(true); + return this; + } + + public void unsetIf_not_exists() { + __isset_bit_vector.clear(__IF_NOT_EXISTS_ISSET_ID); + } + + // Returns true if field if_not_exists is set (has been assigned a value) and false otherwise + public boolean isSetIf_not_exists() { + return __isset_bit_vector.get(__IF_NOT_EXISTS_ISSET_ID); + } + + public void setIf_not_existsIsSet(boolean __value) { + __isset_bit_vector.set(__IF_NOT_EXISTS_ISSET_ID, __value); + } + + public long getTerm() { + return this.term; + } + + public ChainAddEdgesRequest setTerm(long term) { + this.term = term; + setTermIsSet(true); + return this; + } + + public void unsetTerm() { + __isset_bit_vector.clear(__TERM_ISSET_ID); + } + + // Returns true if field term is set (has been assigned a value) and false otherwise + public boolean isSetTerm() { + return __isset_bit_vector.get(__TERM_ISSET_ID); + } + + public void setTermIsSet(boolean __value) { + __isset_bit_vector.set(__TERM_ISSET_ID, __value); + } + + public long getEdge_version() { + return this.edge_version; + } + + public ChainAddEdgesRequest setEdge_version(long edge_version) { + this.edge_version = edge_version; + setEdge_versionIsSet(true); + return this; + } + + public void unsetEdge_version() { + __isset_bit_vector.clear(__EDGE_VERSION_ISSET_ID); + } + + // Returns true if field edge_version is set (has been assigned a value) and false otherwise + public boolean isSetEdge_version() { + return __isset_bit_vector.get(__EDGE_VERSION_ISSET_ID); + } + + public void setEdge_versionIsSet(boolean __value) { + __isset_bit_vector.set(__EDGE_VERSION_ISSET_ID, __value); + } + + @SuppressWarnings("unchecked") + public void setFieldValue(int fieldID, Object __value) { + switch (fieldID) { + case SPACE_ID: + if (__value == null) { + unsetSpace_id(); + } else { + setSpace_id((Integer)__value); + } + break; + + case PARTS: + if (__value == null) { + unsetParts(); + } else { + setParts((Map>)__value); + } + break; + + case PROP_NAMES: + if (__value == null) { + unsetProp_names(); + } else { + setProp_names((List)__value); + } + break; + + case IF_NOT_EXISTS: + if (__value == null) { + unsetIf_not_exists(); + } else { + setIf_not_exists((Boolean)__value); + } + break; + + case TERM: + if (__value == null) { + unsetTerm(); + } else { + setTerm((Long)__value); + } + break; + + case EDGE_VERSION: + if (__value == null) { + unsetEdge_version(); + } else { + setEdge_version((Long)__value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SPACE_ID: + return new Integer(getSpace_id()); + + case PARTS: + return getParts(); + + case PROP_NAMES: + return getProp_names(); + + case IF_NOT_EXISTS: + return new Boolean(isIf_not_exists()); + + case TERM: + return new Long(getTerm()); + + case EDGE_VERSION: + return new Long(getEdge_version()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object _that) { + if (_that == null) + return false; + if (this == _that) + return true; + if (!(_that instanceof ChainAddEdgesRequest)) + return false; + ChainAddEdgesRequest that = (ChainAddEdgesRequest)_that; + + if (!TBaseHelper.equalsNobinary(this.space_id, that.space_id)) { return false; } + + if (!TBaseHelper.equalsNobinary(this.isSetParts(), that.isSetParts(), this.parts, that.parts)) { return false; } + + if (!TBaseHelper.equalsSlow(this.isSetProp_names(), that.isSetProp_names(), this.prop_names, that.prop_names)) { return false; } + + if (!TBaseHelper.equalsNobinary(this.if_not_exists, that.if_not_exists)) { return false; } + + if (!TBaseHelper.equalsNobinary(this.term, that.term)) { return false; } + + if (!TBaseHelper.equalsNobinary(this.isSetEdge_version(), that.isSetEdge_version(), this.edge_version, that.edge_version)) { return false; } + + return true; + } + + @Override + public int hashCode() { + return Arrays.deepHashCode(new Object[] {space_id, parts, prop_names, if_not_exists, term, edge_version}); + } + + public void read(TProtocol iprot) throws TException { + TField __field; + iprot.readStructBegin(metaDataMap); + while (true) + { + __field = iprot.readFieldBegin(); + if (__field.type == TType.STOP) { + break; + } + switch (__field.id) + { + case SPACE_ID: + if (__field.type == TType.I32) { + this.space_id = iprot.readI32(); + setSpace_idIsSet(true); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + case PARTS: + if (__field.type == TType.MAP) { + { + TMap _map268 = iprot.readMapBegin(); + this.parts = new HashMap>(Math.max(0, 2*_map268.size)); + for (int _i269 = 0; + (_map268.size < 0) ? iprot.peekMap() : (_i269 < _map268.size); + ++_i269) + { + int _key270; + List _val271; + _key270 = iprot.readI32(); + { + TList _list272 = iprot.readListBegin(); + _val271 = new ArrayList(Math.max(0, _list272.size)); + for (int _i273 = 0; + (_list272.size < 0) ? iprot.peekList() : (_i273 < _list272.size); + ++_i273) + { + NewEdge _elem274; + _elem274 = new NewEdge(); + _elem274.read(iprot); + _val271.add(_elem274); + } + iprot.readListEnd(); + } + this.parts.put(_key270, _val271); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + case PROP_NAMES: + if (__field.type == TType.LIST) { + { + TList _list275 = iprot.readListBegin(); + this.prop_names = new ArrayList(Math.max(0, _list275.size)); + for (int _i276 = 0; + (_list275.size < 0) ? iprot.peekList() : (_i276 < _list275.size); + ++_i276) + { + byte[] _elem277; + _elem277 = iprot.readBinary(); + this.prop_names.add(_elem277); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + case IF_NOT_EXISTS: + if (__field.type == TType.BOOL) { + this.if_not_exists = iprot.readBool(); + setIf_not_existsIsSet(true); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + case TERM: + if (__field.type == TType.I64) { + this.term = iprot.readI64(); + setTermIsSet(true); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + case EDGE_VERSION: + if (__field.type == TType.I64) { + this.edge_version = iprot.readI64(); + setEdge_versionIsSet(true); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + default: + TProtocolUtil.skip(iprot, __field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SPACE_ID_FIELD_DESC); + oprot.writeI32(this.space_id); + oprot.writeFieldEnd(); + if (this.parts != null) { + oprot.writeFieldBegin(PARTS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.I32, TType.LIST, this.parts.size())); + for (Map.Entry> _iter278 : this.parts.entrySet()) { + oprot.writeI32(_iter278.getKey()); + { + oprot.writeListBegin(new TList(TType.STRUCT, _iter278.getValue().size())); + for (NewEdge _iter279 : _iter278.getValue()) { + _iter279.write(oprot); + } + oprot.writeListEnd(); + } + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.prop_names != null) { + oprot.writeFieldBegin(PROP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.prop_names.size())); + for (byte[] _iter280 : this.prop_names) { + oprot.writeBinary(_iter280); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IF_NOT_EXISTS_FIELD_DESC); + oprot.writeBool(this.if_not_exists); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(TERM_FIELD_DESC); + oprot.writeI64(this.term); + oprot.writeFieldEnd(); + if (isSetEdge_version()) { + oprot.writeFieldBegin(EDGE_VERSION_FIELD_DESC); + oprot.writeI64(this.edge_version); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + return toString(1, true); + } + + @Override + public String toString(int indent, boolean prettyPrint) { + String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; + String newLine = prettyPrint ? "\n" : ""; + String space = prettyPrint ? " " : ""; + StringBuilder sb = new StringBuilder("ChainAddEdgesRequest"); + sb.append(space); + sb.append("("); + sb.append(newLine); + boolean first = true; + + sb.append(indentStr); + sb.append("space_id"); + sb.append(space); + sb.append(":").append(space); + sb.append(TBaseHelper.toString(this.getSpace_id(), indent + 1, prettyPrint)); + first = false; + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("parts"); + sb.append(space); + sb.append(":").append(space); + if (this.getParts() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getParts(), indent + 1, prettyPrint)); + } + first = false; + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("prop_names"); + sb.append(space); + sb.append(":").append(space); + if (this.getProp_names() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getProp_names(), indent + 1, prettyPrint)); + } + first = false; + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("if_not_exists"); + sb.append(space); + sb.append(":").append(space); + sb.append(TBaseHelper.toString(this.isIf_not_exists(), indent + 1, prettyPrint)); + first = false; + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("term"); + sb.append(space); + sb.append(":").append(space); + sb.append(TBaseHelper.toString(this.getTerm(), indent + 1, prettyPrint)); + first = false; + if (isSetEdge_version()) + { + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("edge_version"); + sb.append(space); + sb.append(":").append(space); + sb.append(TBaseHelper.toString(this.getEdge_version(), indent + 1, prettyPrint)); + first = false; + } + sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git a/client/src/main/generated/com/vesoft/nebula/storage/ChainUpdateEdgeRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/ChainUpdateEdgeRequest.java new file mode 100644 index 000000000..ef8fad589 --- /dev/null +++ b/client/src/main/generated/com/vesoft/nebula/storage/ChainUpdateEdgeRequest.java @@ -0,0 +1,595 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.vesoft.nebula.storage; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.Set; +import java.util.HashSet; +import java.util.Collections; +import java.util.BitSet; +import java.util.Arrays; +import com.facebook.thrift.*; +import com.facebook.thrift.annotations.*; +import com.facebook.thrift.async.*; +import com.facebook.thrift.meta_data.*; +import com.facebook.thrift.server.*; +import com.facebook.thrift.transport.*; +import com.facebook.thrift.protocol.*; + +@SuppressWarnings({ "unused", "serial" }) +public class ChainUpdateEdgeRequest implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("ChainUpdateEdgeRequest"); + private static final TField UPDATE_EDGE_REQUEST_FIELD_DESC = new TField("update_edge_request", TType.STRUCT, (short)1); + private static final TField TERM_FIELD_DESC = new TField("term", TType.I64, (short)2); + private static final TField EDGE_VERSION_FIELD_DESC = new TField("edge_version", TType.I64, (short)3); + private static final TField SPACE_ID_FIELD_DESC = new TField("space_id", TType.I32, (short)4); + private static final TField PARTS_FIELD_DESC = new TField("parts", TType.LIST, (short)5); + + public UpdateEdgeRequest update_edge_request; + public long term; + public long edge_version; + public int space_id; + public List parts; + public static final int UPDATE_EDGE_REQUEST = 1; + public static final int TERM = 2; + public static final int EDGE_VERSION = 3; + public static final int SPACE_ID = 4; + public static final int PARTS = 5; + + // isset id assignments + private static final int __TERM_ISSET_ID = 0; + private static final int __EDGE_VERSION_ISSET_ID = 1; + private static final int __SPACE_ID_ISSET_ID = 2; + private BitSet __isset_bit_vector = new BitSet(3); + + public static final Map metaDataMap; + + static { + Map tmpMetaDataMap = new HashMap(); + tmpMetaDataMap.put(UPDATE_EDGE_REQUEST, new FieldMetaData("update_edge_request", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, UpdateEdgeRequest.class))); + tmpMetaDataMap.put(TERM, new FieldMetaData("term", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I64))); + tmpMetaDataMap.put(EDGE_VERSION, new FieldMetaData("edge_version", TFieldRequirementType.OPTIONAL, + new FieldValueMetaData(TType.I64))); + tmpMetaDataMap.put(SPACE_ID, new FieldMetaData("space_id", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMetaDataMap.put(PARTS, new FieldMetaData("parts", TFieldRequirementType.REQUIRED, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.I32)))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(ChainUpdateEdgeRequest.class, metaDataMap); + } + + public ChainUpdateEdgeRequest() { + } + + public ChainUpdateEdgeRequest( + List parts) { + this(); + this.parts = parts; + } + + public ChainUpdateEdgeRequest( + UpdateEdgeRequest update_edge_request, + long term, + int space_id, + List parts) { + this(); + this.update_edge_request = update_edge_request; + this.term = term; + setTermIsSet(true); + this.space_id = space_id; + setSpace_idIsSet(true); + this.parts = parts; + } + + public ChainUpdateEdgeRequest( + UpdateEdgeRequest update_edge_request, + long term, + long edge_version, + int space_id, + List parts) { + this(); + this.update_edge_request = update_edge_request; + this.term = term; + setTermIsSet(true); + this.edge_version = edge_version; + setEdge_versionIsSet(true); + this.space_id = space_id; + setSpace_idIsSet(true); + this.parts = parts; + } + + public static class Builder { + private UpdateEdgeRequest update_edge_request; + private long term; + private long edge_version; + private int space_id; + private List parts; + + BitSet __optional_isset = new BitSet(3); + + public Builder() { + } + + public Builder setUpdate_edge_request(final UpdateEdgeRequest update_edge_request) { + this.update_edge_request = update_edge_request; + return this; + } + + public Builder setTerm(final long term) { + this.term = term; + __optional_isset.set(__TERM_ISSET_ID, true); + return this; + } + + public Builder setEdge_version(final long edge_version) { + this.edge_version = edge_version; + __optional_isset.set(__EDGE_VERSION_ISSET_ID, true); + return this; + } + + public Builder setSpace_id(final int space_id) { + this.space_id = space_id; + __optional_isset.set(__SPACE_ID_ISSET_ID, true); + return this; + } + + public Builder setParts(final List parts) { + this.parts = parts; + return this; + } + + public ChainUpdateEdgeRequest build() { + ChainUpdateEdgeRequest result = new ChainUpdateEdgeRequest(); + result.setUpdate_edge_request(this.update_edge_request); + if (__optional_isset.get(__TERM_ISSET_ID)) { + result.setTerm(this.term); + } + if (__optional_isset.get(__EDGE_VERSION_ISSET_ID)) { + result.setEdge_version(this.edge_version); + } + if (__optional_isset.get(__SPACE_ID_ISSET_ID)) { + result.setSpace_id(this.space_id); + } + result.setParts(this.parts); + return result; + } + } + + public static Builder builder() { + return new Builder(); + } + + /** + * Performs a deep copy on other. + */ + public ChainUpdateEdgeRequest(ChainUpdateEdgeRequest other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetUpdate_edge_request()) { + this.update_edge_request = TBaseHelper.deepCopy(other.update_edge_request); + } + this.term = TBaseHelper.deepCopy(other.term); + this.edge_version = TBaseHelper.deepCopy(other.edge_version); + this.space_id = TBaseHelper.deepCopy(other.space_id); + if (other.isSetParts()) { + this.parts = TBaseHelper.deepCopy(other.parts); + } + } + + public ChainUpdateEdgeRequest deepCopy() { + return new ChainUpdateEdgeRequest(this); + } + + public UpdateEdgeRequest getUpdate_edge_request() { + return this.update_edge_request; + } + + public ChainUpdateEdgeRequest setUpdate_edge_request(UpdateEdgeRequest update_edge_request) { + this.update_edge_request = update_edge_request; + return this; + } + + public void unsetUpdate_edge_request() { + this.update_edge_request = null; + } + + // Returns true if field update_edge_request is set (has been assigned a value) and false otherwise + public boolean isSetUpdate_edge_request() { + return this.update_edge_request != null; + } + + public void setUpdate_edge_requestIsSet(boolean __value) { + if (!__value) { + this.update_edge_request = null; + } + } + + public long getTerm() { + return this.term; + } + + public ChainUpdateEdgeRequest setTerm(long term) { + this.term = term; + setTermIsSet(true); + return this; + } + + public void unsetTerm() { + __isset_bit_vector.clear(__TERM_ISSET_ID); + } + + // Returns true if field term is set (has been assigned a value) and false otherwise + public boolean isSetTerm() { + return __isset_bit_vector.get(__TERM_ISSET_ID); + } + + public void setTermIsSet(boolean __value) { + __isset_bit_vector.set(__TERM_ISSET_ID, __value); + } + + public long getEdge_version() { + return this.edge_version; + } + + public ChainUpdateEdgeRequest setEdge_version(long edge_version) { + this.edge_version = edge_version; + setEdge_versionIsSet(true); + return this; + } + + public void unsetEdge_version() { + __isset_bit_vector.clear(__EDGE_VERSION_ISSET_ID); + } + + // Returns true if field edge_version is set (has been assigned a value) and false otherwise + public boolean isSetEdge_version() { + return __isset_bit_vector.get(__EDGE_VERSION_ISSET_ID); + } + + public void setEdge_versionIsSet(boolean __value) { + __isset_bit_vector.set(__EDGE_VERSION_ISSET_ID, __value); + } + + public int getSpace_id() { + return this.space_id; + } + + public ChainUpdateEdgeRequest setSpace_id(int space_id) { + this.space_id = space_id; + setSpace_idIsSet(true); + return this; + } + + public void unsetSpace_id() { + __isset_bit_vector.clear(__SPACE_ID_ISSET_ID); + } + + // Returns true if field space_id is set (has been assigned a value) and false otherwise + public boolean isSetSpace_id() { + return __isset_bit_vector.get(__SPACE_ID_ISSET_ID); + } + + public void setSpace_idIsSet(boolean __value) { + __isset_bit_vector.set(__SPACE_ID_ISSET_ID, __value); + } + + public List getParts() { + return this.parts; + } + + public ChainUpdateEdgeRequest setParts(List parts) { + this.parts = parts; + return this; + } + + public void unsetParts() { + this.parts = null; + } + + // Returns true if field parts is set (has been assigned a value) and false otherwise + public boolean isSetParts() { + return this.parts != null; + } + + public void setPartsIsSet(boolean __value) { + if (!__value) { + this.parts = null; + } + } + + @SuppressWarnings("unchecked") + public void setFieldValue(int fieldID, Object __value) { + switch (fieldID) { + case UPDATE_EDGE_REQUEST: + if (__value == null) { + unsetUpdate_edge_request(); + } else { + setUpdate_edge_request((UpdateEdgeRequest)__value); + } + break; + + case TERM: + if (__value == null) { + unsetTerm(); + } else { + setTerm((Long)__value); + } + break; + + case EDGE_VERSION: + if (__value == null) { + unsetEdge_version(); + } else { + setEdge_version((Long)__value); + } + break; + + case SPACE_ID: + if (__value == null) { + unsetSpace_id(); + } else { + setSpace_id((Integer)__value); + } + break; + + case PARTS: + if (__value == null) { + unsetParts(); + } else { + setParts((List)__value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case UPDATE_EDGE_REQUEST: + return getUpdate_edge_request(); + + case TERM: + return new Long(getTerm()); + + case EDGE_VERSION: + return new Long(getEdge_version()); + + case SPACE_ID: + return new Integer(getSpace_id()); + + case PARTS: + return getParts(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object _that) { + if (_that == null) + return false; + if (this == _that) + return true; + if (!(_that instanceof ChainUpdateEdgeRequest)) + return false; + ChainUpdateEdgeRequest that = (ChainUpdateEdgeRequest)_that; + + if (!TBaseHelper.equalsNobinary(this.isSetUpdate_edge_request(), that.isSetUpdate_edge_request(), this.update_edge_request, that.update_edge_request)) { return false; } + + if (!TBaseHelper.equalsNobinary(this.term, that.term)) { return false; } + + if (!TBaseHelper.equalsNobinary(this.isSetEdge_version(), that.isSetEdge_version(), this.edge_version, that.edge_version)) { return false; } + + if (!TBaseHelper.equalsNobinary(this.space_id, that.space_id)) { return false; } + + if (!TBaseHelper.equalsNobinary(this.isSetParts(), that.isSetParts(), this.parts, that.parts)) { return false; } + + return true; + } + + @Override + public int hashCode() { + return Arrays.deepHashCode(new Object[] {update_edge_request, term, edge_version, space_id, parts}); + } + + public void read(TProtocol iprot) throws TException { + TField __field; + iprot.readStructBegin(metaDataMap); + while (true) + { + __field = iprot.readFieldBegin(); + if (__field.type == TType.STOP) { + break; + } + switch (__field.id) + { + case UPDATE_EDGE_REQUEST: + if (__field.type == TType.STRUCT) { + this.update_edge_request = new UpdateEdgeRequest(); + this.update_edge_request.read(iprot); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + case TERM: + if (__field.type == TType.I64) { + this.term = iprot.readI64(); + setTermIsSet(true); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + case EDGE_VERSION: + if (__field.type == TType.I64) { + this.edge_version = iprot.readI64(); + setEdge_versionIsSet(true); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + case SPACE_ID: + if (__field.type == TType.I32) { + this.space_id = iprot.readI32(); + setSpace_idIsSet(true); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + case PARTS: + if (__field.type == TType.LIST) { + { + TList _list281 = iprot.readListBegin(); + this.parts = new ArrayList(Math.max(0, _list281.size)); + for (int _i282 = 0; + (_list281.size < 0) ? iprot.peekList() : (_i282 < _list281.size); + ++_i282) + { + int _elem283; + _elem283 = iprot.readI32(); + this.parts.add(_elem283); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + default: + TProtocolUtil.skip(iprot, __field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.update_edge_request != null) { + oprot.writeFieldBegin(UPDATE_EDGE_REQUEST_FIELD_DESC); + this.update_edge_request.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(TERM_FIELD_DESC); + oprot.writeI64(this.term); + oprot.writeFieldEnd(); + if (isSetEdge_version()) { + oprot.writeFieldBegin(EDGE_VERSION_FIELD_DESC); + oprot.writeI64(this.edge_version); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(SPACE_ID_FIELD_DESC); + oprot.writeI32(this.space_id); + oprot.writeFieldEnd(); + if (this.parts != null) { + oprot.writeFieldBegin(PARTS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.I32, this.parts.size())); + for (int _iter284 : this.parts) { + oprot.writeI32(_iter284); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + return toString(1, true); + } + + @Override + public String toString(int indent, boolean prettyPrint) { + String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; + String newLine = prettyPrint ? "\n" : ""; + String space = prettyPrint ? " " : ""; + StringBuilder sb = new StringBuilder("ChainUpdateEdgeRequest"); + sb.append(space); + sb.append("("); + sb.append(newLine); + boolean first = true; + + sb.append(indentStr); + sb.append("update_edge_request"); + sb.append(space); + sb.append(":").append(space); + if (this.getUpdate_edge_request() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getUpdate_edge_request(), indent + 1, prettyPrint)); + } + first = false; + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("term"); + sb.append(space); + sb.append(":").append(space); + sb.append(TBaseHelper.toString(this.getTerm(), indent + 1, prettyPrint)); + first = false; + if (isSetEdge_version()) + { + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("edge_version"); + sb.append(space); + sb.append(":").append(space); + sb.append(TBaseHelper.toString(this.getEdge_version(), indent + 1, prettyPrint)); + first = false; + } + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("space_id"); + sb.append(space); + sb.append(":").append(space); + sb.append(TBaseHelper.toString(this.getSpace_id(), indent + 1, prettyPrint)); + first = false; + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("parts"); + sb.append(space); + sb.append(":").append(space); + if (this.getParts() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getParts(), indent + 1, prettyPrint)); + } + first = false; + sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + if (parts == null) { + throw new TProtocolException(TProtocolException.MISSING_REQUIRED_FIELD, "Required field 'parts' was not present! Struct: " + toString()); + } + } + +} + diff --git a/client/src/main/generated/com/vesoft/nebula/storage/GeneralStorageService.java b/client/src/main/generated/com/vesoft/nebula/storage/GeneralStorageService.java index faea62896..351d4458e 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/GeneralStorageService.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/GeneralStorageService.java @@ -231,17 +231,17 @@ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientM super(protocolFactory, clientManager, transport); } - public void get(KVGetRequest req, AsyncMethodCallback resultHandler454) throws TException { + public void get(KVGetRequest req, AsyncMethodCallback resultHandler483) throws TException { checkReady(); - get_call method_call = new get_call(req, resultHandler454, this, ___protocolFactory, ___transport); + get_call method_call = new get_call(req, resultHandler483, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_call extends TAsyncMethodCall { private KVGetRequest req; - public get_call(KVGetRequest req, AsyncMethodCallback resultHandler455, TAsyncClient client451, TProtocolFactory protocolFactory452, TNonblockingTransport transport453) throws TException { - super(client451, protocolFactory452, transport453, resultHandler455, false); + public get_call(KVGetRequest req, AsyncMethodCallback resultHandler484, TAsyncClient client480, TProtocolFactory protocolFactory481, TNonblockingTransport transport482) throws TException { + super(client480, protocolFactory481, transport482, resultHandler484, false); this.req = req; } @@ -263,17 +263,17 @@ public KVGetResponse getResult() throws TException { } } - public void put(KVPutRequest req, AsyncMethodCallback resultHandler459) throws TException { + public void put(KVPutRequest req, AsyncMethodCallback resultHandler488) throws TException { checkReady(); - put_call method_call = new put_call(req, resultHandler459, this, ___protocolFactory, ___transport); + put_call method_call = new put_call(req, resultHandler488, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class put_call extends TAsyncMethodCall { private KVPutRequest req; - public put_call(KVPutRequest req, AsyncMethodCallback resultHandler460, TAsyncClient client456, TProtocolFactory protocolFactory457, TNonblockingTransport transport458) throws TException { - super(client456, protocolFactory457, transport458, resultHandler460, false); + public put_call(KVPutRequest req, AsyncMethodCallback resultHandler489, TAsyncClient client485, TProtocolFactory protocolFactory486, TNonblockingTransport transport487) throws TException { + super(client485, protocolFactory486, transport487, resultHandler489, false); this.req = req; } @@ -295,17 +295,17 @@ public ExecResponse getResult() throws TException { } } - public void remove(KVRemoveRequest req, AsyncMethodCallback resultHandler464) throws TException { + public void remove(KVRemoveRequest req, AsyncMethodCallback resultHandler493) throws TException { checkReady(); - remove_call method_call = new remove_call(req, resultHandler464, this, ___protocolFactory, ___transport); + remove_call method_call = new remove_call(req, resultHandler493, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class remove_call extends TAsyncMethodCall { private KVRemoveRequest req; - public remove_call(KVRemoveRequest req, AsyncMethodCallback resultHandler465, TAsyncClient client461, TProtocolFactory protocolFactory462, TNonblockingTransport transport463) throws TException { - super(client461, protocolFactory462, transport463, resultHandler465, false); + public remove_call(KVRemoveRequest req, AsyncMethodCallback resultHandler494, TAsyncClient client490, TProtocolFactory protocolFactory491, TNonblockingTransport transport492) throws TException { + super(client490, protocolFactory491, transport492, resultHandler494, false); this.req = req; } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/GetValueRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/GetValueRequest.java deleted file mode 100644 index 4712c0e7f..000000000 --- a/client/src/main/generated/com/vesoft/nebula/storage/GetValueRequest.java +++ /dev/null @@ -1,439 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.vesoft.nebula.storage; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import java.util.BitSet; -import java.util.Arrays; -import com.facebook.thrift.*; -import com.facebook.thrift.annotations.*; -import com.facebook.thrift.async.*; -import com.facebook.thrift.meta_data.*; -import com.facebook.thrift.server.*; -import com.facebook.thrift.transport.*; -import com.facebook.thrift.protocol.*; - -@SuppressWarnings({ "unused", "serial" }) -public class GetValueRequest implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("GetValueRequest"); - private static final TField SPACE_ID_FIELD_DESC = new TField("space_id", TType.I32, (short)1); - private static final TField PART_ID_FIELD_DESC = new TField("part_id", TType.I32, (short)2); - private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)3); - - public int space_id; - public int part_id; - public byte[] key; - public static final int SPACE_ID = 1; - public static final int PART_ID = 2; - public static final int KEY = 3; - - // isset id assignments - private static final int __SPACE_ID_ISSET_ID = 0; - private static final int __PART_ID_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); - - public static final Map metaDataMap; - - static { - Map tmpMetaDataMap = new HashMap(); - tmpMetaDataMap.put(SPACE_ID, new FieldMetaData("space_id", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - tmpMetaDataMap.put(PART_ID, new FieldMetaData("part_id", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - tmpMetaDataMap.put(KEY, new FieldMetaData("key", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); - } - - static { - FieldMetaData.addStructMetaDataMap(GetValueRequest.class, metaDataMap); - } - - public GetValueRequest() { - } - - public GetValueRequest( - int space_id, - int part_id, - byte[] key) { - this(); - this.space_id = space_id; - setSpace_idIsSet(true); - this.part_id = part_id; - setPart_idIsSet(true); - this.key = key; - } - - public static class Builder { - private int space_id; - private int part_id; - private byte[] key; - - BitSet __optional_isset = new BitSet(2); - - public Builder() { - } - - public Builder setSpace_id(final int space_id) { - this.space_id = space_id; - __optional_isset.set(__SPACE_ID_ISSET_ID, true); - return this; - } - - public Builder setPart_id(final int part_id) { - this.part_id = part_id; - __optional_isset.set(__PART_ID_ISSET_ID, true); - return this; - } - - public Builder setKey(final byte[] key) { - this.key = key; - return this; - } - - public GetValueRequest build() { - GetValueRequest result = new GetValueRequest(); - if (__optional_isset.get(__SPACE_ID_ISSET_ID)) { - result.setSpace_id(this.space_id); - } - if (__optional_isset.get(__PART_ID_ISSET_ID)) { - result.setPart_id(this.part_id); - } - result.setKey(this.key); - return result; - } - } - - public static Builder builder() { - return new Builder(); - } - - /** - * Performs a deep copy on other. - */ - public GetValueRequest(GetValueRequest other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - this.space_id = TBaseHelper.deepCopy(other.space_id); - this.part_id = TBaseHelper.deepCopy(other.part_id); - if (other.isSetKey()) { - this.key = TBaseHelper.deepCopy(other.key); - } - } - - public GetValueRequest deepCopy() { - return new GetValueRequest(this); - } - - public int getSpace_id() { - return this.space_id; - } - - public GetValueRequest setSpace_id(int space_id) { - this.space_id = space_id; - setSpace_idIsSet(true); - return this; - } - - public void unsetSpace_id() { - __isset_bit_vector.clear(__SPACE_ID_ISSET_ID); - } - - // Returns true if field space_id is set (has been assigned a value) and false otherwise - public boolean isSetSpace_id() { - return __isset_bit_vector.get(__SPACE_ID_ISSET_ID); - } - - public void setSpace_idIsSet(boolean __value) { - __isset_bit_vector.set(__SPACE_ID_ISSET_ID, __value); - } - - public int getPart_id() { - return this.part_id; - } - - public GetValueRequest setPart_id(int part_id) { - this.part_id = part_id; - setPart_idIsSet(true); - return this; - } - - public void unsetPart_id() { - __isset_bit_vector.clear(__PART_ID_ISSET_ID); - } - - // Returns true if field part_id is set (has been assigned a value) and false otherwise - public boolean isSetPart_id() { - return __isset_bit_vector.get(__PART_ID_ISSET_ID); - } - - public void setPart_idIsSet(boolean __value) { - __isset_bit_vector.set(__PART_ID_ISSET_ID, __value); - } - - public byte[] getKey() { - return this.key; - } - - public GetValueRequest setKey(byte[] key) { - this.key = key; - return this; - } - - public void unsetKey() { - this.key = null; - } - - // Returns true if field key is set (has been assigned a value) and false otherwise - public boolean isSetKey() { - return this.key != null; - } - - public void setKeyIsSet(boolean __value) { - if (!__value) { - this.key = null; - } - } - - public void setFieldValue(int fieldID, Object __value) { - switch (fieldID) { - case SPACE_ID: - if (__value == null) { - unsetSpace_id(); - } else { - setSpace_id((Integer)__value); - } - break; - - case PART_ID: - if (__value == null) { - unsetPart_id(); - } else { - setPart_id((Integer)__value); - } - break; - - case KEY: - if (__value == null) { - unsetKey(); - } else { - setKey((byte[])__value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SPACE_ID: - return new Integer(getSpace_id()); - - case PART_ID: - return new Integer(getPart_id()); - - case KEY: - return getKey(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object _that) { - if (_that == null) - return false; - if (this == _that) - return true; - if (!(_that instanceof GetValueRequest)) - return false; - GetValueRequest that = (GetValueRequest)_that; - - if (!TBaseHelper.equalsNobinary(this.space_id, that.space_id)) { return false; } - - if (!TBaseHelper.equalsNobinary(this.part_id, that.part_id)) { return false; } - - if (!TBaseHelper.equalsSlow(this.isSetKey(), that.isSetKey(), this.key, that.key)) { return false; } - - return true; - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(new Object[] {space_id, part_id, key}); - } - - @Override - public int compareTo(GetValueRequest other) { - if (other == null) { - // See java.lang.Comparable docs - throw new NullPointerException(); - } - - if (other == this) { - return 0; - } - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSpace_id()).compareTo(other.isSetSpace_id()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(space_id, other.space_id); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = Boolean.valueOf(isSetPart_id()).compareTo(other.isSetPart_id()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(part_id, other.part_id); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(key, other.key); - if (lastComparison != 0) { - return lastComparison; - } - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField __field; - iprot.readStructBegin(metaDataMap); - while (true) - { - __field = iprot.readFieldBegin(); - if (__field.type == TType.STOP) { - break; - } - switch (__field.id) - { - case SPACE_ID: - if (__field.type == TType.I32) { - this.space_id = iprot.readI32(); - setSpace_idIsSet(true); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - case PART_ID: - if (__field.type == TType.I32) { - this.part_id = iprot.readI32(); - setPart_idIsSet(true); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - case KEY: - if (__field.type == TType.STRING) { - this.key = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - default: - TProtocolUtil.skip(iprot, __field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SPACE_ID_FIELD_DESC); - oprot.writeI32(this.space_id); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(PART_ID_FIELD_DESC); - oprot.writeI32(this.part_id); - oprot.writeFieldEnd(); - if (this.key != null) { - oprot.writeFieldBegin(KEY_FIELD_DESC); - oprot.writeBinary(this.key); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - return toString(1, true); - } - - @Override - public String toString(int indent, boolean prettyPrint) { - String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; - String newLine = prettyPrint ? "\n" : ""; - String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("GetValueRequest"); - sb.append(space); - sb.append("("); - sb.append(newLine); - boolean first = true; - - sb.append(indentStr); - sb.append("space_id"); - sb.append(space); - sb.append(":").append(space); - sb.append(TBaseHelper.toString(this.getSpace_id(), indent + 1, prettyPrint)); - first = false; - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("part_id"); - sb.append(space); - sb.append(":").append(space); - sb.append(TBaseHelper.toString(this.getPart_id(), indent + 1, prettyPrint)); - first = false; - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("key"); - sb.append(space); - sb.append(":").append(space); - if (this.getKey() == null) { - sb.append("null"); - } else { - int __key_size = Math.min(this.getKey().length, 128); - for (int i = 0; i < __key_size; i++) { - if (i != 0) sb.append(" "); - sb.append(Integer.toHexString(this.getKey()[i]).length() > 1 ? Integer.toHexString(this.getKey()[i]).substring(Integer.toHexString(this.getKey()[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.getKey()[i]).toUpperCase()); - } - if (this.getKey().length > 128) sb.append(" ..."); - } - first = false; - sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - } - -} - diff --git a/client/src/main/generated/com/vesoft/nebula/storage/GetValueResponse.java b/client/src/main/generated/com/vesoft/nebula/storage/GetValueResponse.java deleted file mode 100644 index 8a0b704b8..000000000 --- a/client/src/main/generated/com/vesoft/nebula/storage/GetValueResponse.java +++ /dev/null @@ -1,365 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.vesoft.nebula.storage; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import java.util.BitSet; -import java.util.Arrays; -import com.facebook.thrift.*; -import com.facebook.thrift.annotations.*; -import com.facebook.thrift.async.*; -import com.facebook.thrift.meta_data.*; -import com.facebook.thrift.server.*; -import com.facebook.thrift.transport.*; -import com.facebook.thrift.protocol.*; - -@SuppressWarnings({ "unused", "serial" }) -public class GetValueResponse implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("GetValueResponse"); - private static final TField RESULT_FIELD_DESC = new TField("result", TType.STRUCT, (short)1); - private static final TField VALUE_FIELD_DESC = new TField("value", TType.STRING, (short)2); - - public ResponseCommon result; - public byte[] value; - public static final int RESULT = 1; - public static final int VALUE = 2; - - // isset id assignments - - public static final Map metaDataMap; - - static { - Map tmpMetaDataMap = new HashMap(); - tmpMetaDataMap.put(RESULT, new FieldMetaData("result", TFieldRequirementType.REQUIRED, - new StructMetaData(TType.STRUCT, ResponseCommon.class))); - tmpMetaDataMap.put(VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); - } - - static { - FieldMetaData.addStructMetaDataMap(GetValueResponse.class, metaDataMap); - } - - public GetValueResponse() { - } - - public GetValueResponse( - ResponseCommon result) { - this(); - this.result = result; - } - - public GetValueResponse( - ResponseCommon result, - byte[] value) { - this(); - this.result = result; - this.value = value; - } - - public static class Builder { - private ResponseCommon result; - private byte[] value; - - public Builder() { - } - - public Builder setResult(final ResponseCommon result) { - this.result = result; - return this; - } - - public Builder setValue(final byte[] value) { - this.value = value; - return this; - } - - public GetValueResponse build() { - GetValueResponse result = new GetValueResponse(); - result.setResult(this.result); - result.setValue(this.value); - return result; - } - } - - public static Builder builder() { - return new Builder(); - } - - /** - * Performs a deep copy on other. - */ - public GetValueResponse(GetValueResponse other) { - if (other.isSetResult()) { - this.result = TBaseHelper.deepCopy(other.result); - } - if (other.isSetValue()) { - this.value = TBaseHelper.deepCopy(other.value); - } - } - - public GetValueResponse deepCopy() { - return new GetValueResponse(this); - } - - public ResponseCommon getResult() { - return this.result; - } - - public GetValueResponse setResult(ResponseCommon result) { - this.result = result; - return this; - } - - public void unsetResult() { - this.result = null; - } - - // Returns true if field result is set (has been assigned a value) and false otherwise - public boolean isSetResult() { - return this.result != null; - } - - public void setResultIsSet(boolean __value) { - if (!__value) { - this.result = null; - } - } - - public byte[] getValue() { - return this.value; - } - - public GetValueResponse setValue(byte[] value) { - this.value = value; - return this; - } - - public void unsetValue() { - this.value = null; - } - - // Returns true if field value is set (has been assigned a value) and false otherwise - public boolean isSetValue() { - return this.value != null; - } - - public void setValueIsSet(boolean __value) { - if (!__value) { - this.value = null; - } - } - - public void setFieldValue(int fieldID, Object __value) { - switch (fieldID) { - case RESULT: - if (__value == null) { - unsetResult(); - } else { - setResult((ResponseCommon)__value); - } - break; - - case VALUE: - if (__value == null) { - unsetValue(); - } else { - setValue((byte[])__value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case RESULT: - return getResult(); - - case VALUE: - return getValue(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object _that) { - if (_that == null) - return false; - if (this == _that) - return true; - if (!(_that instanceof GetValueResponse)) - return false; - GetValueResponse that = (GetValueResponse)_that; - - if (!TBaseHelper.equalsNobinary(this.isSetResult(), that.isSetResult(), this.result, that.result)) { return false; } - - if (!TBaseHelper.equalsSlow(this.isSetValue(), that.isSetValue(), this.value, that.value)) { return false; } - - return true; - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(new Object[] {result, value}); - } - - @Override - public int compareTo(GetValueResponse other) { - if (other == null) { - // See java.lang.Comparable docs - throw new NullPointerException(); - } - - if (other == this) { - return 0; - } - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetResult()).compareTo(other.isSetResult()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(result, other.result); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(value, other.value); - if (lastComparison != 0) { - return lastComparison; - } - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField __field; - iprot.readStructBegin(metaDataMap); - while (true) - { - __field = iprot.readFieldBegin(); - if (__field.type == TType.STOP) { - break; - } - switch (__field.id) - { - case RESULT: - if (__field.type == TType.STRUCT) { - this.result = new ResponseCommon(); - this.result.read(iprot); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - case VALUE: - if (__field.type == TType.STRING) { - this.value = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - default: - TProtocolUtil.skip(iprot, __field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.result != null) { - oprot.writeFieldBegin(RESULT_FIELD_DESC); - this.result.write(oprot); - oprot.writeFieldEnd(); - } - if (this.value != null) { - oprot.writeFieldBegin(VALUE_FIELD_DESC); - oprot.writeBinary(this.value); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - return toString(1, true); - } - - @Override - public String toString(int indent, boolean prettyPrint) { - String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; - String newLine = prettyPrint ? "\n" : ""; - String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("GetValueResponse"); - sb.append(space); - sb.append("("); - sb.append(newLine); - boolean first = true; - - sb.append(indentStr); - sb.append("result"); - sb.append(space); - sb.append(":").append(space); - if (this.getResult() == null) { - sb.append("null"); - } else { - sb.append(TBaseHelper.toString(this.getResult(), indent + 1, prettyPrint)); - } - first = false; - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("value"); - sb.append(space); - sb.append(":").append(space); - if (this.getValue() == null) { - sb.append("null"); - } else { - int __value_size = Math.min(this.getValue().length, 128); - for (int i = 0; i < __value_size; i++) { - if (i != 0) sb.append(" "); - sb.append(Integer.toHexString(this.getValue()[i]).length() > 1 ? Integer.toHexString(this.getValue()[i]).substring(Integer.toHexString(this.getValue()[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.getValue()[i]).toUpperCase()); - } - if (this.getValue().length > 128) sb.append(" ..."); - } - first = false; - sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - if (result == null) { - throw new TProtocolException(TProtocolException.MISSING_REQUIRED_FIELD, "Required field 'result' was not present! Struct: " + toString()); - } - } - -} - diff --git a/client/src/main/generated/com/vesoft/nebula/storage/GraphStorageService.java b/client/src/main/generated/com/vesoft/nebula/storage/GraphStorageService.java index 844249043..99ea338d6 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/GraphStorageService.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/GraphStorageService.java @@ -59,7 +59,9 @@ public interface Iface { public GetNeighborsResponse lookupAndTraverse(LookupAndTraverseRequest req) throws TException; - public ExecResponse addEdgesAtomic(AddEdgesRequest req) throws TException; + public UpdateResponse chainUpdateEdge(UpdateEdgeRequest req) throws TException; + + public ExecResponse chainAddEdges(AddEdgesRequest req) throws TException; } @@ -93,7 +95,9 @@ public interface AsyncIface { public void lookupAndTraverse(LookupAndTraverseRequest req, AsyncMethodCallback resultHandler) throws TException; - public void addEdgesAtomic(AddEdgesRequest req, AsyncMethodCallback resultHandler) throws TException; + public void chainUpdateEdge(UpdateEdgeRequest req, AsyncMethodCallback resultHandler) throws TException; + + public void chainAddEdges(AddEdgesRequest req, AsyncMethodCallback resultHandler) throws TException; } @@ -756,49 +760,94 @@ public GetNeighborsResponse recv_lookupAndTraverse() throws TException throw new TApplicationException(TApplicationException.MISSING_RESULT, "lookupAndTraverse failed: unknown result"); } - public ExecResponse addEdgesAtomic(AddEdgesRequest req) throws TException + public UpdateResponse chainUpdateEdge(UpdateEdgeRequest req) throws TException { - ContextStack ctx = getContextStack("GraphStorageService.addEdgesAtomic", null); + ContextStack ctx = getContextStack("GraphStorageService.chainUpdateEdge", null); this.setContextStack(ctx); - send_addEdgesAtomic(req); - return recv_addEdgesAtomic(); + send_chainUpdateEdge(req); + return recv_chainUpdateEdge(); } - public void send_addEdgesAtomic(AddEdgesRequest req) throws TException + public void send_chainUpdateEdge(UpdateEdgeRequest req) throws TException { ContextStack ctx = this.getContextStack(); - super.preWrite(ctx, "GraphStorageService.addEdgesAtomic", null); - oprot_.writeMessageBegin(new TMessage("addEdgesAtomic", TMessageType.CALL, seqid_)); - addEdgesAtomic_args args = new addEdgesAtomic_args(); + super.preWrite(ctx, "GraphStorageService.chainUpdateEdge", null); + oprot_.writeMessageBegin(new TMessage("chainUpdateEdge", TMessageType.CALL, seqid_)); + chainUpdateEdge_args args = new chainUpdateEdge_args(); args.req = req; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); - super.postWrite(ctx, "GraphStorageService.addEdgesAtomic", args); + super.postWrite(ctx, "GraphStorageService.chainUpdateEdge", args); return; } - public ExecResponse recv_addEdgesAtomic() throws TException + public UpdateResponse recv_chainUpdateEdge() throws TException { ContextStack ctx = super.getContextStack(); long bytes; TMessageType mtype; - super.preRead(ctx, "GraphStorageService.addEdgesAtomic"); + super.preRead(ctx, "GraphStorageService.chainUpdateEdge"); TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } - addEdgesAtomic_result result = new addEdgesAtomic_result(); + chainUpdateEdge_result result = new chainUpdateEdge_result(); result.read(iprot_); iprot_.readMessageEnd(); - super.postRead(ctx, "GraphStorageService.addEdgesAtomic", result); + super.postRead(ctx, "GraphStorageService.chainUpdateEdge", result); if (result.isSetSuccess()) { return result.success; } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "addEdgesAtomic failed: unknown result"); + throw new TApplicationException(TApplicationException.MISSING_RESULT, "chainUpdateEdge failed: unknown result"); + } + + public ExecResponse chainAddEdges(AddEdgesRequest req) throws TException + { + ContextStack ctx = getContextStack("GraphStorageService.chainAddEdges", null); + this.setContextStack(ctx); + send_chainAddEdges(req); + return recv_chainAddEdges(); + } + + public void send_chainAddEdges(AddEdgesRequest req) throws TException + { + ContextStack ctx = this.getContextStack(); + super.preWrite(ctx, "GraphStorageService.chainAddEdges", null); + oprot_.writeMessageBegin(new TMessage("chainAddEdges", TMessageType.CALL, seqid_)); + chainAddEdges_args args = new chainAddEdges_args(); + args.req = req; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + super.postWrite(ctx, "GraphStorageService.chainAddEdges", args); + return; + } + + public ExecResponse recv_chainAddEdges() throws TException + { + ContextStack ctx = super.getContextStack(); + long bytes; + TMessageType mtype; + super.preRead(ctx, "GraphStorageService.chainAddEdges"); + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + chainAddEdges_result result = new chainAddEdges_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + super.postRead(ctx, "GraphStorageService.chainAddEdges", result); + + if (result.isSetSuccess()) { + return result.success; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "chainAddEdges failed: unknown result"); } } @@ -819,17 +868,17 @@ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientM super(protocolFactory, clientManager, transport); } - public void getNeighbors(GetNeighborsRequest req, AsyncMethodCallback resultHandler280) throws TException { + public void getNeighbors(GetNeighborsRequest req, AsyncMethodCallback resultHandler304) throws TException { checkReady(); - getNeighbors_call method_call = new getNeighbors_call(req, resultHandler280, this, ___protocolFactory, ___transport); + getNeighbors_call method_call = new getNeighbors_call(req, resultHandler304, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getNeighbors_call extends TAsyncMethodCall { private GetNeighborsRequest req; - public getNeighbors_call(GetNeighborsRequest req, AsyncMethodCallback resultHandler281, TAsyncClient client277, TProtocolFactory protocolFactory278, TNonblockingTransport transport279) throws TException { - super(client277, protocolFactory278, transport279, resultHandler281, false); + public getNeighbors_call(GetNeighborsRequest req, AsyncMethodCallback resultHandler305, TAsyncClient client301, TProtocolFactory protocolFactory302, TNonblockingTransport transport303) throws TException { + super(client301, protocolFactory302, transport303, resultHandler305, false); this.req = req; } @@ -851,17 +900,17 @@ public GetNeighborsResponse getResult() throws TException { } } - public void getProps(GetPropRequest req, AsyncMethodCallback resultHandler285) throws TException { + public void getProps(GetPropRequest req, AsyncMethodCallback resultHandler309) throws TException { checkReady(); - getProps_call method_call = new getProps_call(req, resultHandler285, this, ___protocolFactory, ___transport); + getProps_call method_call = new getProps_call(req, resultHandler309, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getProps_call extends TAsyncMethodCall { private GetPropRequest req; - public getProps_call(GetPropRequest req, AsyncMethodCallback resultHandler286, TAsyncClient client282, TProtocolFactory protocolFactory283, TNonblockingTransport transport284) throws TException { - super(client282, protocolFactory283, transport284, resultHandler286, false); + public getProps_call(GetPropRequest req, AsyncMethodCallback resultHandler310, TAsyncClient client306, TProtocolFactory protocolFactory307, TNonblockingTransport transport308) throws TException { + super(client306, protocolFactory307, transport308, resultHandler310, false); this.req = req; } @@ -883,17 +932,17 @@ public GetPropResponse getResult() throws TException { } } - public void addVertices(AddVerticesRequest req, AsyncMethodCallback resultHandler290) throws TException { + public void addVertices(AddVerticesRequest req, AsyncMethodCallback resultHandler314) throws TException { checkReady(); - addVertices_call method_call = new addVertices_call(req, resultHandler290, this, ___protocolFactory, ___transport); + addVertices_call method_call = new addVertices_call(req, resultHandler314, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addVertices_call extends TAsyncMethodCall { private AddVerticesRequest req; - public addVertices_call(AddVerticesRequest req, AsyncMethodCallback resultHandler291, TAsyncClient client287, TProtocolFactory protocolFactory288, TNonblockingTransport transport289) throws TException { - super(client287, protocolFactory288, transport289, resultHandler291, false); + public addVertices_call(AddVerticesRequest req, AsyncMethodCallback resultHandler315, TAsyncClient client311, TProtocolFactory protocolFactory312, TNonblockingTransport transport313) throws TException { + super(client311, protocolFactory312, transport313, resultHandler315, false); this.req = req; } @@ -915,17 +964,17 @@ public ExecResponse getResult() throws TException { } } - public void addEdges(AddEdgesRequest req, AsyncMethodCallback resultHandler295) throws TException { + public void addEdges(AddEdgesRequest req, AsyncMethodCallback resultHandler319) throws TException { checkReady(); - addEdges_call method_call = new addEdges_call(req, resultHandler295, this, ___protocolFactory, ___transport); + addEdges_call method_call = new addEdges_call(req, resultHandler319, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addEdges_call extends TAsyncMethodCall { private AddEdgesRequest req; - public addEdges_call(AddEdgesRequest req, AsyncMethodCallback resultHandler296, TAsyncClient client292, TProtocolFactory protocolFactory293, TNonblockingTransport transport294) throws TException { - super(client292, protocolFactory293, transport294, resultHandler296, false); + public addEdges_call(AddEdgesRequest req, AsyncMethodCallback resultHandler320, TAsyncClient client316, TProtocolFactory protocolFactory317, TNonblockingTransport transport318) throws TException { + super(client316, protocolFactory317, transport318, resultHandler320, false); this.req = req; } @@ -947,17 +996,17 @@ public ExecResponse getResult() throws TException { } } - public void deleteEdges(DeleteEdgesRequest req, AsyncMethodCallback resultHandler300) throws TException { + public void deleteEdges(DeleteEdgesRequest req, AsyncMethodCallback resultHandler324) throws TException { checkReady(); - deleteEdges_call method_call = new deleteEdges_call(req, resultHandler300, this, ___protocolFactory, ___transport); + deleteEdges_call method_call = new deleteEdges_call(req, resultHandler324, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class deleteEdges_call extends TAsyncMethodCall { private DeleteEdgesRequest req; - public deleteEdges_call(DeleteEdgesRequest req, AsyncMethodCallback resultHandler301, TAsyncClient client297, TProtocolFactory protocolFactory298, TNonblockingTransport transport299) throws TException { - super(client297, protocolFactory298, transport299, resultHandler301, false); + public deleteEdges_call(DeleteEdgesRequest req, AsyncMethodCallback resultHandler325, TAsyncClient client321, TProtocolFactory protocolFactory322, TNonblockingTransport transport323) throws TException { + super(client321, protocolFactory322, transport323, resultHandler325, false); this.req = req; } @@ -979,17 +1028,17 @@ public ExecResponse getResult() throws TException { } } - public void deleteVertices(DeleteVerticesRequest req, AsyncMethodCallback resultHandler305) throws TException { + public void deleteVertices(DeleteVerticesRequest req, AsyncMethodCallback resultHandler329) throws TException { checkReady(); - deleteVertices_call method_call = new deleteVertices_call(req, resultHandler305, this, ___protocolFactory, ___transport); + deleteVertices_call method_call = new deleteVertices_call(req, resultHandler329, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class deleteVertices_call extends TAsyncMethodCall { private DeleteVerticesRequest req; - public deleteVertices_call(DeleteVerticesRequest req, AsyncMethodCallback resultHandler306, TAsyncClient client302, TProtocolFactory protocolFactory303, TNonblockingTransport transport304) throws TException { - super(client302, protocolFactory303, transport304, resultHandler306, false); + public deleteVertices_call(DeleteVerticesRequest req, AsyncMethodCallback resultHandler330, TAsyncClient client326, TProtocolFactory protocolFactory327, TNonblockingTransport transport328) throws TException { + super(client326, protocolFactory327, transport328, resultHandler330, false); this.req = req; } @@ -1011,17 +1060,17 @@ public ExecResponse getResult() throws TException { } } - public void deleteTags(DeleteTagsRequest req, AsyncMethodCallback resultHandler310) throws TException { + public void deleteTags(DeleteTagsRequest req, AsyncMethodCallback resultHandler334) throws TException { checkReady(); - deleteTags_call method_call = new deleteTags_call(req, resultHandler310, this, ___protocolFactory, ___transport); + deleteTags_call method_call = new deleteTags_call(req, resultHandler334, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class deleteTags_call extends TAsyncMethodCall { private DeleteTagsRequest req; - public deleteTags_call(DeleteTagsRequest req, AsyncMethodCallback resultHandler311, TAsyncClient client307, TProtocolFactory protocolFactory308, TNonblockingTransport transport309) throws TException { - super(client307, protocolFactory308, transport309, resultHandler311, false); + public deleteTags_call(DeleteTagsRequest req, AsyncMethodCallback resultHandler335, TAsyncClient client331, TProtocolFactory protocolFactory332, TNonblockingTransport transport333) throws TException { + super(client331, protocolFactory332, transport333, resultHandler335, false); this.req = req; } @@ -1043,17 +1092,17 @@ public ExecResponse getResult() throws TException { } } - public void updateVertex(UpdateVertexRequest req, AsyncMethodCallback resultHandler315) throws TException { + public void updateVertex(UpdateVertexRequest req, AsyncMethodCallback resultHandler339) throws TException { checkReady(); - updateVertex_call method_call = new updateVertex_call(req, resultHandler315, this, ___protocolFactory, ___transport); + updateVertex_call method_call = new updateVertex_call(req, resultHandler339, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class updateVertex_call extends TAsyncMethodCall { private UpdateVertexRequest req; - public updateVertex_call(UpdateVertexRequest req, AsyncMethodCallback resultHandler316, TAsyncClient client312, TProtocolFactory protocolFactory313, TNonblockingTransport transport314) throws TException { - super(client312, protocolFactory313, transport314, resultHandler316, false); + public updateVertex_call(UpdateVertexRequest req, AsyncMethodCallback resultHandler340, TAsyncClient client336, TProtocolFactory protocolFactory337, TNonblockingTransport transport338) throws TException { + super(client336, protocolFactory337, transport338, resultHandler340, false); this.req = req; } @@ -1075,17 +1124,17 @@ public UpdateResponse getResult() throws TException { } } - public void updateEdge(UpdateEdgeRequest req, AsyncMethodCallback resultHandler320) throws TException { + public void updateEdge(UpdateEdgeRequest req, AsyncMethodCallback resultHandler344) throws TException { checkReady(); - updateEdge_call method_call = new updateEdge_call(req, resultHandler320, this, ___protocolFactory, ___transport); + updateEdge_call method_call = new updateEdge_call(req, resultHandler344, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class updateEdge_call extends TAsyncMethodCall { private UpdateEdgeRequest req; - public updateEdge_call(UpdateEdgeRequest req, AsyncMethodCallback resultHandler321, TAsyncClient client317, TProtocolFactory protocolFactory318, TNonblockingTransport transport319) throws TException { - super(client317, protocolFactory318, transport319, resultHandler321, false); + public updateEdge_call(UpdateEdgeRequest req, AsyncMethodCallback resultHandler345, TAsyncClient client341, TProtocolFactory protocolFactory342, TNonblockingTransport transport343) throws TException { + super(client341, protocolFactory342, transport343, resultHandler345, false); this.req = req; } @@ -1107,17 +1156,17 @@ public UpdateResponse getResult() throws TException { } } - public void scanVertex(ScanVertexRequest req, AsyncMethodCallback resultHandler325) throws TException { + public void scanVertex(ScanVertexRequest req, AsyncMethodCallback resultHandler349) throws TException { checkReady(); - scanVertex_call method_call = new scanVertex_call(req, resultHandler325, this, ___protocolFactory, ___transport); + scanVertex_call method_call = new scanVertex_call(req, resultHandler349, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class scanVertex_call extends TAsyncMethodCall { private ScanVertexRequest req; - public scanVertex_call(ScanVertexRequest req, AsyncMethodCallback resultHandler326, TAsyncClient client322, TProtocolFactory protocolFactory323, TNonblockingTransport transport324) throws TException { - super(client322, protocolFactory323, transport324, resultHandler326, false); + public scanVertex_call(ScanVertexRequest req, AsyncMethodCallback resultHandler350, TAsyncClient client346, TProtocolFactory protocolFactory347, TNonblockingTransport transport348) throws TException { + super(client346, protocolFactory347, transport348, resultHandler350, false); this.req = req; } @@ -1139,17 +1188,17 @@ public ScanVertexResponse getResult() throws TException { } } - public void scanEdge(ScanEdgeRequest req, AsyncMethodCallback resultHandler330) throws TException { + public void scanEdge(ScanEdgeRequest req, AsyncMethodCallback resultHandler354) throws TException { checkReady(); - scanEdge_call method_call = new scanEdge_call(req, resultHandler330, this, ___protocolFactory, ___transport); + scanEdge_call method_call = new scanEdge_call(req, resultHandler354, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class scanEdge_call extends TAsyncMethodCall { private ScanEdgeRequest req; - public scanEdge_call(ScanEdgeRequest req, AsyncMethodCallback resultHandler331, TAsyncClient client327, TProtocolFactory protocolFactory328, TNonblockingTransport transport329) throws TException { - super(client327, protocolFactory328, transport329, resultHandler331, false); + public scanEdge_call(ScanEdgeRequest req, AsyncMethodCallback resultHandler355, TAsyncClient client351, TProtocolFactory protocolFactory352, TNonblockingTransport transport353) throws TException { + super(client351, protocolFactory352, transport353, resultHandler355, false); this.req = req; } @@ -1171,17 +1220,17 @@ public ScanEdgeResponse getResult() throws TException { } } - public void getUUID(GetUUIDReq req, AsyncMethodCallback resultHandler335) throws TException { + public void getUUID(GetUUIDReq req, AsyncMethodCallback resultHandler359) throws TException { checkReady(); - getUUID_call method_call = new getUUID_call(req, resultHandler335, this, ___protocolFactory, ___transport); + getUUID_call method_call = new getUUID_call(req, resultHandler359, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getUUID_call extends TAsyncMethodCall { private GetUUIDReq req; - public getUUID_call(GetUUIDReq req, AsyncMethodCallback resultHandler336, TAsyncClient client332, TProtocolFactory protocolFactory333, TNonblockingTransport transport334) throws TException { - super(client332, protocolFactory333, transport334, resultHandler336, false); + public getUUID_call(GetUUIDReq req, AsyncMethodCallback resultHandler360, TAsyncClient client356, TProtocolFactory protocolFactory357, TNonblockingTransport transport358) throws TException { + super(client356, protocolFactory357, transport358, resultHandler360, false); this.req = req; } @@ -1203,17 +1252,17 @@ public GetUUIDResp getResult() throws TException { } } - public void lookupIndex(LookupIndexRequest req, AsyncMethodCallback resultHandler340) throws TException { + public void lookupIndex(LookupIndexRequest req, AsyncMethodCallback resultHandler364) throws TException { checkReady(); - lookupIndex_call method_call = new lookupIndex_call(req, resultHandler340, this, ___protocolFactory, ___transport); + lookupIndex_call method_call = new lookupIndex_call(req, resultHandler364, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class lookupIndex_call extends TAsyncMethodCall { private LookupIndexRequest req; - public lookupIndex_call(LookupIndexRequest req, AsyncMethodCallback resultHandler341, TAsyncClient client337, TProtocolFactory protocolFactory338, TNonblockingTransport transport339) throws TException { - super(client337, protocolFactory338, transport339, resultHandler341, false); + public lookupIndex_call(LookupIndexRequest req, AsyncMethodCallback resultHandler365, TAsyncClient client361, TProtocolFactory protocolFactory362, TNonblockingTransport transport363) throws TException { + super(client361, protocolFactory362, transport363, resultHandler365, false); this.req = req; } @@ -1235,17 +1284,17 @@ public LookupIndexResp getResult() throws TException { } } - public void lookupAndTraverse(LookupAndTraverseRequest req, AsyncMethodCallback resultHandler345) throws TException { + public void lookupAndTraverse(LookupAndTraverseRequest req, AsyncMethodCallback resultHandler369) throws TException { checkReady(); - lookupAndTraverse_call method_call = new lookupAndTraverse_call(req, resultHandler345, this, ___protocolFactory, ___transport); + lookupAndTraverse_call method_call = new lookupAndTraverse_call(req, resultHandler369, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class lookupAndTraverse_call extends TAsyncMethodCall { private LookupAndTraverseRequest req; - public lookupAndTraverse_call(LookupAndTraverseRequest req, AsyncMethodCallback resultHandler346, TAsyncClient client342, TProtocolFactory protocolFactory343, TNonblockingTransport transport344) throws TException { - super(client342, protocolFactory343, transport344, resultHandler346, false); + public lookupAndTraverse_call(LookupAndTraverseRequest req, AsyncMethodCallback resultHandler370, TAsyncClient client366, TProtocolFactory protocolFactory367, TNonblockingTransport transport368) throws TException { + super(client366, protocolFactory367, transport368, resultHandler370, false); this.req = req; } @@ -1267,23 +1316,55 @@ public GetNeighborsResponse getResult() throws TException { } } - public void addEdgesAtomic(AddEdgesRequest req, AsyncMethodCallback resultHandler350) throws TException { + public void chainUpdateEdge(UpdateEdgeRequest req, AsyncMethodCallback resultHandler374) throws TException { checkReady(); - addEdgesAtomic_call method_call = new addEdgesAtomic_call(req, resultHandler350, this, ___protocolFactory, ___transport); + chainUpdateEdge_call method_call = new chainUpdateEdge_call(req, resultHandler374, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class addEdgesAtomic_call extends TAsyncMethodCall { + public static class chainUpdateEdge_call extends TAsyncMethodCall { + private UpdateEdgeRequest req; + public chainUpdateEdge_call(UpdateEdgeRequest req, AsyncMethodCallback resultHandler375, TAsyncClient client371, TProtocolFactory protocolFactory372, TNonblockingTransport transport373) throws TException { + super(client371, protocolFactory372, transport373, resultHandler375, false); + this.req = req; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("chainUpdateEdge", TMessageType.CALL, 0)); + chainUpdateEdge_args args = new chainUpdateEdge_args(); + args.setReq(req); + args.write(prot); + prot.writeMessageEnd(); + } + + public UpdateResponse getResult() throws TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_chainUpdateEdge(); + } + } + + public void chainAddEdges(AddEdgesRequest req, AsyncMethodCallback resultHandler379) throws TException { + checkReady(); + chainAddEdges_call method_call = new chainAddEdges_call(req, resultHandler379, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class chainAddEdges_call extends TAsyncMethodCall { private AddEdgesRequest req; - public addEdgesAtomic_call(AddEdgesRequest req, AsyncMethodCallback resultHandler351, TAsyncClient client347, TProtocolFactory protocolFactory348, TNonblockingTransport transport349) throws TException { - super(client347, protocolFactory348, transport349, resultHandler351, false); + public chainAddEdges_call(AddEdgesRequest req, AsyncMethodCallback resultHandler380, TAsyncClient client376, TProtocolFactory protocolFactory377, TNonblockingTransport transport378) throws TException { + super(client376, protocolFactory377, transport378, resultHandler380, false); this.req = req; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("addEdgesAtomic", TMessageType.CALL, 0)); - addEdgesAtomic_args args = new addEdgesAtomic_args(); + prot.writeMessageBegin(new TMessage("chainAddEdges", TMessageType.CALL, 0)); + chainAddEdges_args args = new chainAddEdges_args(); args.setReq(req); args.write(prot); prot.writeMessageEnd(); @@ -1295,7 +1376,7 @@ public ExecResponse getResult() throws TException { } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_addEdgesAtomic(); + return (new Client(prot)).recv_chainAddEdges(); } } @@ -1321,7 +1402,8 @@ public Processor(Iface iface) processMap_.put("getUUID", new getUUID()); processMap_.put("lookupIndex", new lookupIndex()); processMap_.put("lookupAndTraverse", new lookupAndTraverse()); - processMap_.put("addEdgesAtomic", new addEdgesAtomic()); + processMap_.put("chainUpdateEdge", new chainUpdateEdge()); + processMap_.put("chainAddEdges", new chainAddEdges()); } protected static interface ProcessFunction { @@ -1648,23 +1730,44 @@ public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionCont } - private class addEdgesAtomic implements ProcessFunction { + private class chainUpdateEdge implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException + { + Object handler_ctx = event_handler_.getContext("GraphStorageService.chainUpdateEdge", server_ctx); + chainUpdateEdge_args args = new chainUpdateEdge_args(); + event_handler_.preRead(handler_ctx, "GraphStorageService.chainUpdateEdge"); + args.read(iprot); + iprot.readMessageEnd(); + event_handler_.postRead(handler_ctx, "GraphStorageService.chainUpdateEdge", args); + chainUpdateEdge_result result = new chainUpdateEdge_result(); + result.success = iface_.chainUpdateEdge(args.req); + event_handler_.preWrite(handler_ctx, "GraphStorageService.chainUpdateEdge", result); + oprot.writeMessageBegin(new TMessage("chainUpdateEdge", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + event_handler_.postWrite(handler_ctx, "GraphStorageService.chainUpdateEdge", result); + } + + } + + private class chainAddEdges implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException { - Object handler_ctx = event_handler_.getContext("GraphStorageService.addEdgesAtomic", server_ctx); - addEdgesAtomic_args args = new addEdgesAtomic_args(); - event_handler_.preRead(handler_ctx, "GraphStorageService.addEdgesAtomic"); + Object handler_ctx = event_handler_.getContext("GraphStorageService.chainAddEdges", server_ctx); + chainAddEdges_args args = new chainAddEdges_args(); + event_handler_.preRead(handler_ctx, "GraphStorageService.chainAddEdges"); args.read(iprot); iprot.readMessageEnd(); - event_handler_.postRead(handler_ctx, "GraphStorageService.addEdgesAtomic", args); - addEdgesAtomic_result result = new addEdgesAtomic_result(); - result.success = iface_.addEdgesAtomic(args.req); - event_handler_.preWrite(handler_ctx, "GraphStorageService.addEdgesAtomic", result); - oprot.writeMessageBegin(new TMessage("addEdgesAtomic", TMessageType.REPLY, seqid)); + event_handler_.postRead(handler_ctx, "GraphStorageService.chainAddEdges", args); + chainAddEdges_result result = new chainAddEdges_result(); + result.success = iface_.chainAddEdges(args.req); + event_handler_.preWrite(handler_ctx, "GraphStorageService.chainAddEdges", result); + oprot.writeMessageBegin(new TMessage("chainAddEdges", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); - event_handler_.postWrite(handler_ctx, "GraphStorageService.addEdgesAtomic", result); + event_handler_.postWrite(handler_ctx, "GraphStorageService.chainAddEdges", result); } } @@ -7301,8 +7404,397 @@ public void validate() throws TException { } - public static class addEdgesAtomic_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("addEdgesAtomic_args"); + public static class chainUpdateEdge_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("chainUpdateEdge_args"); + private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1); + + public UpdateEdgeRequest req; + public static final int REQ = 1; + + // isset id assignments + + public static final Map metaDataMap; + + static { + Map tmpMetaDataMap = new HashMap(); + tmpMetaDataMap.put(REQ, new FieldMetaData("req", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, UpdateEdgeRequest.class))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(chainUpdateEdge_args.class, metaDataMap); + } + + public chainUpdateEdge_args() { + } + + public chainUpdateEdge_args( + UpdateEdgeRequest req) { + this(); + this.req = req; + } + + /** + * Performs a deep copy on other. + */ + public chainUpdateEdge_args(chainUpdateEdge_args other) { + if (other.isSetReq()) { + this.req = TBaseHelper.deepCopy(other.req); + } + } + + public chainUpdateEdge_args deepCopy() { + return new chainUpdateEdge_args(this); + } + + public UpdateEdgeRequest getReq() { + return this.req; + } + + public chainUpdateEdge_args setReq(UpdateEdgeRequest req) { + this.req = req; + return this; + } + + public void unsetReq() { + this.req = null; + } + + // Returns true if field req is set (has been assigned a value) and false otherwise + public boolean isSetReq() { + return this.req != null; + } + + public void setReqIsSet(boolean __value) { + if (!__value) { + this.req = null; + } + } + + public void setFieldValue(int fieldID, Object __value) { + switch (fieldID) { + case REQ: + if (__value == null) { + unsetReq(); + } else { + setReq((UpdateEdgeRequest)__value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case REQ: + return getReq(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object _that) { + if (_that == null) + return false; + if (this == _that) + return true; + if (!(_that instanceof chainUpdateEdge_args)) + return false; + chainUpdateEdge_args that = (chainUpdateEdge_args)_that; + + if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; } + + return true; + } + + @Override + public int hashCode() { + return Arrays.deepHashCode(new Object[] {req}); + } + + public void read(TProtocol iprot) throws TException { + TField __field; + iprot.readStructBegin(metaDataMap); + while (true) + { + __field = iprot.readFieldBegin(); + if (__field.type == TType.STOP) { + break; + } + switch (__field.id) + { + case REQ: + if (__field.type == TType.STRUCT) { + this.req = new UpdateEdgeRequest(); + this.req.read(iprot); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + default: + TProtocolUtil.skip(iprot, __field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.req != null) { + oprot.writeFieldBegin(REQ_FIELD_DESC); + this.req.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + return toString(1, true); + } + + @Override + public String toString(int indent, boolean prettyPrint) { + String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; + String newLine = prettyPrint ? "\n" : ""; + String space = prettyPrint ? " " : ""; + StringBuilder sb = new StringBuilder("chainUpdateEdge_args"); + sb.append(space); + sb.append("("); + sb.append(newLine); + boolean first = true; + + sb.append(indentStr); + sb.append("req"); + sb.append(space); + sb.append(":").append(space); + if (this.getReq() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getReq(), indent + 1, prettyPrint)); + } + first = false; + sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class chainUpdateEdge_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("chainUpdateEdge_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + + public UpdateResponse success; + public static final int SUCCESS = 0; + + // isset id assignments + + public static final Map metaDataMap; + + static { + Map tmpMetaDataMap = new HashMap(); + tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, UpdateResponse.class))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(chainUpdateEdge_result.class, metaDataMap); + } + + public chainUpdateEdge_result() { + } + + public chainUpdateEdge_result( + UpdateResponse success) { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public chainUpdateEdge_result(chainUpdateEdge_result other) { + if (other.isSetSuccess()) { + this.success = TBaseHelper.deepCopy(other.success); + } + } + + public chainUpdateEdge_result deepCopy() { + return new chainUpdateEdge_result(this); + } + + public UpdateResponse getSuccess() { + return this.success; + } + + public chainUpdateEdge_result setSuccess(UpdateResponse 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 void setFieldValue(int fieldID, Object __value) { + switch (fieldID) { + case SUCCESS: + if (__value == null) { + unsetSuccess(); + } else { + setSuccess((UpdateResponse)__value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object _that) { + if (_that == null) + return false; + if (this == _that) + return true; + if (!(_that instanceof chainUpdateEdge_result)) + return false; + chainUpdateEdge_result that = (chainUpdateEdge_result)_that; + + if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; } + + return true; + } + + @Override + public int hashCode() { + return Arrays.deepHashCode(new Object[] {success}); + } + + public void read(TProtocol iprot) throws TException { + TField __field; + iprot.readStructBegin(metaDataMap); + while (true) + { + __field = iprot.readFieldBegin(); + if (__field.type == TType.STOP) { + break; + } + switch (__field.id) + { + case SUCCESS: + if (__field.type == TType.STRUCT) { + this.success = new UpdateResponse(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + default: + TProtocolUtil.skip(iprot, __field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + return toString(1, true); + } + + @Override + public String toString(int indent, boolean prettyPrint) { + String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; + String newLine = prettyPrint ? "\n" : ""; + String space = prettyPrint ? " " : ""; + StringBuilder sb = new StringBuilder("chainUpdateEdge_result"); + sb.append(space); + sb.append("("); + sb.append(newLine); + boolean first = true; + + sb.append(indentStr); + sb.append("success"); + sb.append(space); + sb.append(":").append(space); + if (this.getSuccess() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getSuccess(), indent + 1, prettyPrint)); + } + first = false; + sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class chainAddEdges_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("chainAddEdges_args"); private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1); public AddEdgesRequest req; @@ -7320,13 +7812,13 @@ public static class addEdgesAtomic_args implements TBase, java.io.Serializable, } static { - FieldMetaData.addStructMetaDataMap(addEdgesAtomic_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(chainAddEdges_args.class, metaDataMap); } - public addEdgesAtomic_args() { + public chainAddEdges_args() { } - public addEdgesAtomic_args( + public chainAddEdges_args( AddEdgesRequest req) { this(); this.req = req; @@ -7335,21 +7827,21 @@ public addEdgesAtomic_args( /** * Performs a deep copy on other. */ - public addEdgesAtomic_args(addEdgesAtomic_args other) { + public chainAddEdges_args(chainAddEdges_args other) { if (other.isSetReq()) { this.req = TBaseHelper.deepCopy(other.req); } } - public addEdgesAtomic_args deepCopy() { - return new addEdgesAtomic_args(this); + public chainAddEdges_args deepCopy() { + return new chainAddEdges_args(this); } public AddEdgesRequest getReq() { return this.req; } - public addEdgesAtomic_args setReq(AddEdgesRequest req) { + public chainAddEdges_args setReq(AddEdgesRequest req) { this.req = req; return this; } @@ -7400,9 +7892,9 @@ public boolean equals(Object _that) { return false; if (this == _that) return true; - if (!(_that instanceof addEdgesAtomic_args)) + if (!(_that instanceof chainAddEdges_args)) return false; - addEdgesAtomic_args that = (addEdgesAtomic_args)_that; + chainAddEdges_args that = (chainAddEdges_args)_that; if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; } @@ -7469,7 +7961,7 @@ public String toString(int indent, boolean prettyPrint) { String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; String newLine = prettyPrint ? "\n" : ""; String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("addEdgesAtomic_args"); + StringBuilder sb = new StringBuilder("chainAddEdges_args"); sb.append(space); sb.append("("); sb.append(newLine); @@ -7496,8 +7988,8 @@ public void validate() throws TException { } - public static class addEdgesAtomic_result implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("addEdgesAtomic_result"); + public static class chainAddEdges_result implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("chainAddEdges_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); public ExecResponse success; @@ -7515,13 +8007,13 @@ public static class addEdgesAtomic_result implements TBase, java.io.Serializable } static { - FieldMetaData.addStructMetaDataMap(addEdgesAtomic_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(chainAddEdges_result.class, metaDataMap); } - public addEdgesAtomic_result() { + public chainAddEdges_result() { } - public addEdgesAtomic_result( + public chainAddEdges_result( ExecResponse success) { this(); this.success = success; @@ -7530,21 +8022,21 @@ public addEdgesAtomic_result( /** * Performs a deep copy on other. */ - public addEdgesAtomic_result(addEdgesAtomic_result other) { + public chainAddEdges_result(chainAddEdges_result other) { if (other.isSetSuccess()) { this.success = TBaseHelper.deepCopy(other.success); } } - public addEdgesAtomic_result deepCopy() { - return new addEdgesAtomic_result(this); + public chainAddEdges_result deepCopy() { + return new chainAddEdges_result(this); } public ExecResponse getSuccess() { return this.success; } - public addEdgesAtomic_result setSuccess(ExecResponse success) { + public chainAddEdges_result setSuccess(ExecResponse success) { this.success = success; return this; } @@ -7595,9 +8087,9 @@ public boolean equals(Object _that) { return false; if (this == _that) return true; - if (!(_that instanceof addEdgesAtomic_result)) + if (!(_that instanceof chainAddEdges_result)) return false; - addEdgesAtomic_result that = (addEdgesAtomic_result)_that; + chainAddEdges_result that = (chainAddEdges_result)_that; if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; } @@ -7610,7 +8102,7 @@ public int hashCode() { } @Override - public int compareTo(addEdgesAtomic_result other) { + public int compareTo(chainAddEdges_result other) { if (other == null) { // See java.lang.Comparable docs throw new NullPointerException(); @@ -7686,7 +8178,7 @@ public String toString(int indent, boolean prettyPrint) { String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; String newLine = prettyPrint ? "\n" : ""; String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("addEdgesAtomic_result"); + StringBuilder sb = new StringBuilder("chainAddEdges_result"); sb.append(space); sb.append("("); sb.append(newLine); diff --git a/client/src/main/generated/com/vesoft/nebula/storage/InternalStorageService.java b/client/src/main/generated/com/vesoft/nebula/storage/InternalStorageService.java index 0b7b04369..dc8f229b4 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/InternalStorageService.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/InternalStorageService.java @@ -31,17 +31,17 @@ public class InternalStorageService { public interface Iface { - public GetValueResponse getValue(GetValueRequest req) throws TException; + public ExecResponse chainAddEdges(ChainAddEdgesRequest req) throws TException; - public ExecResponse forwardTransaction(InternalTxnRequest req) throws TException; + public UpdateResponse chainUpdateEdge(ChainUpdateEdgeRequest req) throws TException; } public interface AsyncIface { - public void getValue(GetValueRequest req, AsyncMethodCallback resultHandler) throws TException; + public void chainAddEdges(ChainAddEdgesRequest req, AsyncMethodCallback resultHandler) throws TException; - public void forwardTransaction(InternalTxnRequest req, AsyncMethodCallback resultHandler) throws TException; + public void chainUpdateEdge(ChainUpdateEdgeRequest req, AsyncMethodCallback resultHandler) throws TException; } @@ -74,94 +74,94 @@ public TProtocol getOutputProtocol() return this.oprot_; } - public GetValueResponse getValue(GetValueRequest req) throws TException + public ExecResponse chainAddEdges(ChainAddEdgesRequest req) throws TException { - ContextStack ctx = getContextStack("InternalStorageService.getValue", null); + ContextStack ctx = getContextStack("InternalStorageService.chainAddEdges", null); this.setContextStack(ctx); - send_getValue(req); - return recv_getValue(); + send_chainAddEdges(req); + return recv_chainAddEdges(); } - public void send_getValue(GetValueRequest req) throws TException + public void send_chainAddEdges(ChainAddEdgesRequest req) throws TException { ContextStack ctx = this.getContextStack(); - super.preWrite(ctx, "InternalStorageService.getValue", null); - oprot_.writeMessageBegin(new TMessage("getValue", TMessageType.CALL, seqid_)); - getValue_args args = new getValue_args(); + super.preWrite(ctx, "InternalStorageService.chainAddEdges", null); + oprot_.writeMessageBegin(new TMessage("chainAddEdges", TMessageType.CALL, seqid_)); + chainAddEdges_args args = new chainAddEdges_args(); args.req = req; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); - super.postWrite(ctx, "InternalStorageService.getValue", args); + super.postWrite(ctx, "InternalStorageService.chainAddEdges", args); return; } - public GetValueResponse recv_getValue() throws TException + public ExecResponse recv_chainAddEdges() throws TException { ContextStack ctx = super.getContextStack(); long bytes; TMessageType mtype; - super.preRead(ctx, "InternalStorageService.getValue"); + super.preRead(ctx, "InternalStorageService.chainAddEdges"); TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } - getValue_result result = new getValue_result(); + chainAddEdges_result result = new chainAddEdges_result(); result.read(iprot_); iprot_.readMessageEnd(); - super.postRead(ctx, "InternalStorageService.getValue", result); + super.postRead(ctx, "InternalStorageService.chainAddEdges", result); if (result.isSetSuccess()) { return result.success; } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValue failed: unknown result"); + throw new TApplicationException(TApplicationException.MISSING_RESULT, "chainAddEdges failed: unknown result"); } - public ExecResponse forwardTransaction(InternalTxnRequest req) throws TException + public UpdateResponse chainUpdateEdge(ChainUpdateEdgeRequest req) throws TException { - ContextStack ctx = getContextStack("InternalStorageService.forwardTransaction", null); + ContextStack ctx = getContextStack("InternalStorageService.chainUpdateEdge", null); this.setContextStack(ctx); - send_forwardTransaction(req); - return recv_forwardTransaction(); + send_chainUpdateEdge(req); + return recv_chainUpdateEdge(); } - public void send_forwardTransaction(InternalTxnRequest req) throws TException + public void send_chainUpdateEdge(ChainUpdateEdgeRequest req) throws TException { ContextStack ctx = this.getContextStack(); - super.preWrite(ctx, "InternalStorageService.forwardTransaction", null); - oprot_.writeMessageBegin(new TMessage("forwardTransaction", TMessageType.CALL, seqid_)); - forwardTransaction_args args = new forwardTransaction_args(); + super.preWrite(ctx, "InternalStorageService.chainUpdateEdge", null); + oprot_.writeMessageBegin(new TMessage("chainUpdateEdge", TMessageType.CALL, seqid_)); + chainUpdateEdge_args args = new chainUpdateEdge_args(); args.req = req; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); - super.postWrite(ctx, "InternalStorageService.forwardTransaction", args); + super.postWrite(ctx, "InternalStorageService.chainUpdateEdge", args); return; } - public ExecResponse recv_forwardTransaction() throws TException + public UpdateResponse recv_chainUpdateEdge() throws TException { ContextStack ctx = super.getContextStack(); long bytes; TMessageType mtype; - super.preRead(ctx, "InternalStorageService.forwardTransaction"); + super.preRead(ctx, "InternalStorageService.chainUpdateEdge"); TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } - forwardTransaction_result result = new forwardTransaction_result(); + chainUpdateEdge_result result = new chainUpdateEdge_result(); result.read(iprot_); iprot_.readMessageEnd(); - super.postRead(ctx, "InternalStorageService.forwardTransaction", result); + super.postRead(ctx, "InternalStorageService.chainUpdateEdge", result); if (result.isSetSuccess()) { return result.success; } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "forwardTransaction failed: unknown result"); + throw new TApplicationException(TApplicationException.MISSING_RESULT, "chainUpdateEdge failed: unknown result"); } } @@ -182,67 +182,67 @@ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientM super(protocolFactory, clientManager, transport); } - public void getValue(GetValueRequest req, AsyncMethodCallback resultHandler471) throws TException { + public void chainAddEdges(ChainAddEdgesRequest req, AsyncMethodCallback resultHandler500) throws TException { checkReady(); - getValue_call method_call = new getValue_call(req, resultHandler471, this, ___protocolFactory, ___transport); + chainAddEdges_call method_call = new chainAddEdges_call(req, resultHandler500, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class getValue_call extends TAsyncMethodCall { - private GetValueRequest req; - public getValue_call(GetValueRequest req, AsyncMethodCallback resultHandler472, TAsyncClient client468, TProtocolFactory protocolFactory469, TNonblockingTransport transport470) throws TException { - super(client468, protocolFactory469, transport470, resultHandler472, false); + public static class chainAddEdges_call extends TAsyncMethodCall { + private ChainAddEdgesRequest req; + public chainAddEdges_call(ChainAddEdgesRequest req, AsyncMethodCallback resultHandler501, TAsyncClient client497, TProtocolFactory protocolFactory498, TNonblockingTransport transport499) throws TException { + super(client497, protocolFactory498, transport499, resultHandler501, false); this.req = req; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("getValue", TMessageType.CALL, 0)); - getValue_args args = new getValue_args(); + prot.writeMessageBegin(new TMessage("chainAddEdges", TMessageType.CALL, 0)); + chainAddEdges_args args = new chainAddEdges_args(); args.setReq(req); args.write(prot); prot.writeMessageEnd(); } - public GetValueResponse getResult() throws TException { + public ExecResponse getResult() throws TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_getValue(); + return (new Client(prot)).recv_chainAddEdges(); } } - public void forwardTransaction(InternalTxnRequest req, AsyncMethodCallback resultHandler476) throws TException { + public void chainUpdateEdge(ChainUpdateEdgeRequest req, AsyncMethodCallback resultHandler505) throws TException { checkReady(); - forwardTransaction_call method_call = new forwardTransaction_call(req, resultHandler476, this, ___protocolFactory, ___transport); + chainUpdateEdge_call method_call = new chainUpdateEdge_call(req, resultHandler505, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class forwardTransaction_call extends TAsyncMethodCall { - private InternalTxnRequest req; - public forwardTransaction_call(InternalTxnRequest req, AsyncMethodCallback resultHandler477, TAsyncClient client473, TProtocolFactory protocolFactory474, TNonblockingTransport transport475) throws TException { - super(client473, protocolFactory474, transport475, resultHandler477, false); + public static class chainUpdateEdge_call extends TAsyncMethodCall { + private ChainUpdateEdgeRequest req; + public chainUpdateEdge_call(ChainUpdateEdgeRequest req, AsyncMethodCallback resultHandler506, TAsyncClient client502, TProtocolFactory protocolFactory503, TNonblockingTransport transport504) throws TException { + super(client502, protocolFactory503, transport504, resultHandler506, false); this.req = req; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("forwardTransaction", TMessageType.CALL, 0)); - forwardTransaction_args args = new forwardTransaction_args(); + prot.writeMessageBegin(new TMessage("chainUpdateEdge", TMessageType.CALL, 0)); + chainUpdateEdge_args args = new chainUpdateEdge_args(); args.setReq(req); args.write(prot); prot.writeMessageEnd(); } - public ExecResponse getResult() throws TException { + public UpdateResponse getResult() throws TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_forwardTransaction(); + return (new Client(prot)).recv_chainUpdateEdge(); } } @@ -254,8 +254,8 @@ public Processor(Iface iface) { iface_ = iface; event_handler_ = new TProcessorEventHandler(); // Empty handler - processMap_.put("getValue", new getValue()); - processMap_.put("forwardTransaction", new forwardTransaction()); + processMap_.put("chainAddEdges", new chainAddEdges()); + processMap_.put("chainUpdateEdge", new chainUpdateEdge()); } protected static interface ProcessFunction { @@ -288,55 +288,55 @@ public boolean process(TProtocol iprot, TProtocol oprot, TConnectionContext serv return true; } - private class getValue implements ProcessFunction { + private class chainAddEdges implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException { - Object handler_ctx = event_handler_.getContext("InternalStorageService.getValue", server_ctx); - getValue_args args = new getValue_args(); - event_handler_.preRead(handler_ctx, "InternalStorageService.getValue"); + Object handler_ctx = event_handler_.getContext("InternalStorageService.chainAddEdges", server_ctx); + chainAddEdges_args args = new chainAddEdges_args(); + event_handler_.preRead(handler_ctx, "InternalStorageService.chainAddEdges"); args.read(iprot); iprot.readMessageEnd(); - event_handler_.postRead(handler_ctx, "InternalStorageService.getValue", args); - getValue_result result = new getValue_result(); - result.success = iface_.getValue(args.req); - event_handler_.preWrite(handler_ctx, "InternalStorageService.getValue", result); - oprot.writeMessageBegin(new TMessage("getValue", TMessageType.REPLY, seqid)); + event_handler_.postRead(handler_ctx, "InternalStorageService.chainAddEdges", args); + chainAddEdges_result result = new chainAddEdges_result(); + result.success = iface_.chainAddEdges(args.req); + event_handler_.preWrite(handler_ctx, "InternalStorageService.chainAddEdges", result); + oprot.writeMessageBegin(new TMessage("chainAddEdges", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); - event_handler_.postWrite(handler_ctx, "InternalStorageService.getValue", result); + event_handler_.postWrite(handler_ctx, "InternalStorageService.chainAddEdges", result); } } - private class forwardTransaction implements ProcessFunction { + private class chainUpdateEdge implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException { - Object handler_ctx = event_handler_.getContext("InternalStorageService.forwardTransaction", server_ctx); - forwardTransaction_args args = new forwardTransaction_args(); - event_handler_.preRead(handler_ctx, "InternalStorageService.forwardTransaction"); + Object handler_ctx = event_handler_.getContext("InternalStorageService.chainUpdateEdge", server_ctx); + chainUpdateEdge_args args = new chainUpdateEdge_args(); + event_handler_.preRead(handler_ctx, "InternalStorageService.chainUpdateEdge"); args.read(iprot); iprot.readMessageEnd(); - event_handler_.postRead(handler_ctx, "InternalStorageService.forwardTransaction", args); - forwardTransaction_result result = new forwardTransaction_result(); - result.success = iface_.forwardTransaction(args.req); - event_handler_.preWrite(handler_ctx, "InternalStorageService.forwardTransaction", result); - oprot.writeMessageBegin(new TMessage("forwardTransaction", TMessageType.REPLY, seqid)); + event_handler_.postRead(handler_ctx, "InternalStorageService.chainUpdateEdge", args); + chainUpdateEdge_result result = new chainUpdateEdge_result(); + result.success = iface_.chainUpdateEdge(args.req); + event_handler_.preWrite(handler_ctx, "InternalStorageService.chainUpdateEdge", result); + oprot.writeMessageBegin(new TMessage("chainUpdateEdge", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); - event_handler_.postWrite(handler_ctx, "InternalStorageService.forwardTransaction", result); + event_handler_.postWrite(handler_ctx, "InternalStorageService.chainUpdateEdge", result); } } } - public static class getValue_args implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("getValue_args"); + public static class chainAddEdges_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("chainAddEdges_args"); private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1); - public GetValueRequest req; + public ChainAddEdgesRequest req; public static final int REQ = 1; // isset id assignments @@ -346,19 +346,19 @@ public static class getValue_args implements TBase, java.io.Serializable, Clonea static { Map tmpMetaDataMap = new HashMap(); tmpMetaDataMap.put(REQ, new FieldMetaData("req", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, GetValueRequest.class))); + new StructMetaData(TType.STRUCT, ChainAddEdgesRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } static { - FieldMetaData.addStructMetaDataMap(getValue_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(chainAddEdges_args.class, metaDataMap); } - public getValue_args() { + public chainAddEdges_args() { } - public getValue_args( - GetValueRequest req) { + public chainAddEdges_args( + ChainAddEdgesRequest req) { this(); this.req = req; } @@ -366,21 +366,21 @@ public getValue_args( /** * Performs a deep copy on other. */ - public getValue_args(getValue_args other) { + public chainAddEdges_args(chainAddEdges_args other) { if (other.isSetReq()) { this.req = TBaseHelper.deepCopy(other.req); } } - public getValue_args deepCopy() { - return new getValue_args(this); + public chainAddEdges_args deepCopy() { + return new chainAddEdges_args(this); } - public GetValueRequest getReq() { + public ChainAddEdgesRequest getReq() { return this.req; } - public getValue_args setReq(GetValueRequest req) { + public chainAddEdges_args setReq(ChainAddEdgesRequest req) { this.req = req; return this; } @@ -406,7 +406,7 @@ public void setFieldValue(int fieldID, Object __value) { if (__value == null) { unsetReq(); } else { - setReq((GetValueRequest)__value); + setReq((ChainAddEdgesRequest)__value); } break; @@ -431,9 +431,9 @@ public boolean equals(Object _that) { return false; if (this == _that) return true; - if (!(_that instanceof getValue_args)) + if (!(_that instanceof chainAddEdges_args)) return false; - getValue_args that = (getValue_args)_that; + chainAddEdges_args that = (chainAddEdges_args)_that; if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; } @@ -445,29 +445,6 @@ public int hashCode() { return Arrays.deepHashCode(new Object[] {req}); } - @Override - public int compareTo(getValue_args other) { - if (other == null) { - // See java.lang.Comparable docs - throw new NullPointerException(); - } - - if (other == this) { - return 0; - } - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - return 0; - } - public void read(TProtocol iprot) throws TException { TField __field; iprot.readStructBegin(metaDataMap); @@ -481,7 +458,7 @@ public void read(TProtocol iprot) throws TException { { case REQ: if (__field.type == TType.STRUCT) { - this.req = new GetValueRequest(); + this.req = new ChainAddEdgesRequest(); this.req.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); @@ -523,7 +500,7 @@ public String toString(int indent, boolean prettyPrint) { String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; String newLine = prettyPrint ? "\n" : ""; String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("getValue_args"); + StringBuilder sb = new StringBuilder("chainAddEdges_args"); sb.append(space); sb.append("("); sb.append(newLine); @@ -550,11 +527,11 @@ public void validate() throws TException { } - public static class getValue_result implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("getValue_result"); + public static class chainAddEdges_result implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("chainAddEdges_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - public GetValueResponse success; + public ExecResponse success; public static final int SUCCESS = 0; // isset id assignments @@ -564,19 +541,19 @@ public static class getValue_result implements TBase, java.io.Serializable, Clon static { Map tmpMetaDataMap = new HashMap(); tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, GetValueResponse.class))); + new StructMetaData(TType.STRUCT, ExecResponse.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } static { - FieldMetaData.addStructMetaDataMap(getValue_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(chainAddEdges_result.class, metaDataMap); } - public getValue_result() { + public chainAddEdges_result() { } - public getValue_result( - GetValueResponse success) { + public chainAddEdges_result( + ExecResponse success) { this(); this.success = success; } @@ -584,21 +561,21 @@ public getValue_result( /** * Performs a deep copy on other. */ - public getValue_result(getValue_result other) { + public chainAddEdges_result(chainAddEdges_result other) { if (other.isSetSuccess()) { this.success = TBaseHelper.deepCopy(other.success); } } - public getValue_result deepCopy() { - return new getValue_result(this); + public chainAddEdges_result deepCopy() { + return new chainAddEdges_result(this); } - public GetValueResponse getSuccess() { + public ExecResponse getSuccess() { return this.success; } - public getValue_result setSuccess(GetValueResponse success) { + public chainAddEdges_result setSuccess(ExecResponse success) { this.success = success; return this; } @@ -624,7 +601,7 @@ public void setFieldValue(int fieldID, Object __value) { if (__value == null) { unsetSuccess(); } else { - setSuccess((GetValueResponse)__value); + setSuccess((ExecResponse)__value); } break; @@ -649,9 +626,9 @@ public boolean equals(Object _that) { return false; if (this == _that) return true; - if (!(_that instanceof getValue_result)) + if (!(_that instanceof chainAddEdges_result)) return false; - getValue_result that = (getValue_result)_that; + chainAddEdges_result that = (chainAddEdges_result)_that; if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; } @@ -664,7 +641,7 @@ public int hashCode() { } @Override - public int compareTo(getValue_result other) { + public int compareTo(chainAddEdges_result other) { if (other == null) { // See java.lang.Comparable docs throw new NullPointerException(); @@ -699,7 +676,7 @@ public void read(TProtocol iprot) throws TException { { case SUCCESS: if (__field.type == TType.STRUCT) { - this.success = new GetValueResponse(); + this.success = new ExecResponse(); this.success.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); @@ -740,7 +717,7 @@ public String toString(int indent, boolean prettyPrint) { String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; String newLine = prettyPrint ? "\n" : ""; String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("getValue_result"); + StringBuilder sb = new StringBuilder("chainAddEdges_result"); sb.append(space); sb.append("("); sb.append(newLine); @@ -767,11 +744,11 @@ public void validate() throws TException { } - public static class forwardTransaction_args implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("forwardTransaction_args"); + public static class chainUpdateEdge_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("chainUpdateEdge_args"); private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1); - public InternalTxnRequest req; + public ChainUpdateEdgeRequest req; public static final int REQ = 1; // isset id assignments @@ -781,19 +758,19 @@ public static class forwardTransaction_args implements TBase, java.io.Serializab static { Map tmpMetaDataMap = new HashMap(); tmpMetaDataMap.put(REQ, new FieldMetaData("req", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, InternalTxnRequest.class))); + new StructMetaData(TType.STRUCT, ChainUpdateEdgeRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } static { - FieldMetaData.addStructMetaDataMap(forwardTransaction_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(chainUpdateEdge_args.class, metaDataMap); } - public forwardTransaction_args() { + public chainUpdateEdge_args() { } - public forwardTransaction_args( - InternalTxnRequest req) { + public chainUpdateEdge_args( + ChainUpdateEdgeRequest req) { this(); this.req = req; } @@ -801,21 +778,21 @@ public forwardTransaction_args( /** * Performs a deep copy on other. */ - public forwardTransaction_args(forwardTransaction_args other) { + public chainUpdateEdge_args(chainUpdateEdge_args other) { if (other.isSetReq()) { this.req = TBaseHelper.deepCopy(other.req); } } - public forwardTransaction_args deepCopy() { - return new forwardTransaction_args(this); + public chainUpdateEdge_args deepCopy() { + return new chainUpdateEdge_args(this); } - public InternalTxnRequest getReq() { + public ChainUpdateEdgeRequest getReq() { return this.req; } - public forwardTransaction_args setReq(InternalTxnRequest req) { + public chainUpdateEdge_args setReq(ChainUpdateEdgeRequest req) { this.req = req; return this; } @@ -841,7 +818,7 @@ public void setFieldValue(int fieldID, Object __value) { if (__value == null) { unsetReq(); } else { - setReq((InternalTxnRequest)__value); + setReq((ChainUpdateEdgeRequest)__value); } break; @@ -866,9 +843,9 @@ public boolean equals(Object _that) { return false; if (this == _that) return true; - if (!(_that instanceof forwardTransaction_args)) + if (!(_that instanceof chainUpdateEdge_args)) return false; - forwardTransaction_args that = (forwardTransaction_args)_that; + chainUpdateEdge_args that = (chainUpdateEdge_args)_that; if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; } @@ -880,29 +857,6 @@ public int hashCode() { return Arrays.deepHashCode(new Object[] {req}); } - @Override - public int compareTo(forwardTransaction_args other) { - if (other == null) { - // See java.lang.Comparable docs - throw new NullPointerException(); - } - - if (other == this) { - return 0; - } - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - return 0; - } - public void read(TProtocol iprot) throws TException { TField __field; iprot.readStructBegin(metaDataMap); @@ -916,7 +870,7 @@ public void read(TProtocol iprot) throws TException { { case REQ: if (__field.type == TType.STRUCT) { - this.req = new InternalTxnRequest(); + this.req = new ChainUpdateEdgeRequest(); this.req.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); @@ -958,7 +912,7 @@ public String toString(int indent, boolean prettyPrint) { String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; String newLine = prettyPrint ? "\n" : ""; String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("forwardTransaction_args"); + StringBuilder sb = new StringBuilder("chainUpdateEdge_args"); sb.append(space); sb.append("("); sb.append(newLine); @@ -985,11 +939,11 @@ public void validate() throws TException { } - public static class forwardTransaction_result implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("forwardTransaction_result"); + public static class chainUpdateEdge_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("chainUpdateEdge_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - public ExecResponse success; + public UpdateResponse success; public static final int SUCCESS = 0; // isset id assignments @@ -999,19 +953,19 @@ public static class forwardTransaction_result implements TBase, java.io.Serializ static { Map tmpMetaDataMap = new HashMap(); tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, ExecResponse.class))); + new StructMetaData(TType.STRUCT, UpdateResponse.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } static { - FieldMetaData.addStructMetaDataMap(forwardTransaction_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(chainUpdateEdge_result.class, metaDataMap); } - public forwardTransaction_result() { + public chainUpdateEdge_result() { } - public forwardTransaction_result( - ExecResponse success) { + public chainUpdateEdge_result( + UpdateResponse success) { this(); this.success = success; } @@ -1019,21 +973,21 @@ public forwardTransaction_result( /** * Performs a deep copy on other. */ - public forwardTransaction_result(forwardTransaction_result other) { + public chainUpdateEdge_result(chainUpdateEdge_result other) { if (other.isSetSuccess()) { this.success = TBaseHelper.deepCopy(other.success); } } - public forwardTransaction_result deepCopy() { - return new forwardTransaction_result(this); + public chainUpdateEdge_result deepCopy() { + return new chainUpdateEdge_result(this); } - public ExecResponse getSuccess() { + public UpdateResponse getSuccess() { return this.success; } - public forwardTransaction_result setSuccess(ExecResponse success) { + public chainUpdateEdge_result setSuccess(UpdateResponse success) { this.success = success; return this; } @@ -1059,7 +1013,7 @@ public void setFieldValue(int fieldID, Object __value) { if (__value == null) { unsetSuccess(); } else { - setSuccess((ExecResponse)__value); + setSuccess((UpdateResponse)__value); } break; @@ -1084,9 +1038,9 @@ public boolean equals(Object _that) { return false; if (this == _that) return true; - if (!(_that instanceof forwardTransaction_result)) + if (!(_that instanceof chainUpdateEdge_result)) return false; - forwardTransaction_result that = (forwardTransaction_result)_that; + chainUpdateEdge_result that = (chainUpdateEdge_result)_that; if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; } @@ -1098,29 +1052,6 @@ public int hashCode() { return Arrays.deepHashCode(new Object[] {success}); } - @Override - public int compareTo(forwardTransaction_result other) { - if (other == null) { - // See java.lang.Comparable docs - throw new NullPointerException(); - } - - if (other == this) { - return 0; - } - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - return 0; - } - public void read(TProtocol iprot) throws TException { TField __field; iprot.readStructBegin(metaDataMap); @@ -1134,7 +1065,7 @@ public void read(TProtocol iprot) throws TException { { case SUCCESS: if (__field.type == TType.STRUCT) { - this.success = new ExecResponse(); + this.success = new UpdateResponse(); this.success.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); @@ -1175,7 +1106,7 @@ public String toString(int indent, boolean prettyPrint) { String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; String newLine = prettyPrint ? "\n" : ""; String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("forwardTransaction_result"); + StringBuilder sb = new StringBuilder("chainUpdateEdge_result"); sb.append(space); sb.append("("); sb.append(newLine); diff --git a/client/src/main/generated/com/vesoft/nebula/storage/InternalTxnRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/InternalTxnRequest.java index 36b4e5cd5..1fc752175 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/InternalTxnRequest.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/InternalTxnRequest.java @@ -24,31 +24,28 @@ import com.facebook.thrift.protocol.*; @SuppressWarnings({ "unused", "serial" }) -public class InternalTxnRequest implements TBase, java.io.Serializable, Cloneable, Comparable { +public class InternalTxnRequest implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("InternalTxnRequest"); private static final TField TXN_ID_FIELD_DESC = new TField("txn_id", TType.I64, (short)1); - private static final TField SPACE_ID_FIELD_DESC = new TField("space_id", TType.I32, (short)2); - private static final TField PART_ID_FIELD_DESC = new TField("part_id", TType.I32, (short)3); - private static final TField POSITION_FIELD_DESC = new TField("position", TType.I32, (short)4); - private static final TField DATA_FIELD_DESC = new TField("data", TType.LIST, (short)5); + private static final TField TERM_OF_PARTS_FIELD_DESC = new TField("term_of_parts", TType.MAP, (short)2); + private static final TField ADD_EDGE_REQ_FIELD_DESC = new TField("add_edge_req", TType.STRUCT, (short)3); + private static final TField UPD_EDGE_REQ_FIELD_DESC = new TField("upd_edge_req", TType.STRUCT, (short)4); + private static final TField EDGE_VER_FIELD_DESC = new TField("edge_ver", TType.MAP, (short)5); public long txn_id; - public int space_id; - public int part_id; - public int position; - public List> data; + public Map term_of_parts; + public AddEdgesRequest add_edge_req; + public UpdateEdgeRequest upd_edge_req; + public Map> edge_ver; public static final int TXN_ID = 1; - public static final int SPACE_ID = 2; - public static final int PART_ID = 3; - public static final int POSITION = 4; - public static final int DATA = 5; + public static final int TERM_OF_PARTS = 2; + public static final int ADD_EDGE_REQ = 3; + public static final int UPD_EDGE_REQ = 4; + public static final int EDGE_VER = 5; // isset id assignments private static final int __TXN_ID_ISSET_ID = 0; - private static final int __SPACE_ID_ISSET_ID = 1; - private static final int __PART_ID_ISSET_ID = 2; - private static final int __POSITION_ISSET_ID = 3; - private BitSet __isset_bit_vector = new BitSet(4); + private BitSet __isset_bit_vector = new BitSet(1); public static final Map metaDataMap; @@ -56,16 +53,19 @@ public class InternalTxnRequest implements TBase, java.io.Serializable, Cloneabl Map tmpMetaDataMap = new HashMap(); tmpMetaDataMap.put(TXN_ID, new FieldMetaData("txn_id", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64))); - tmpMetaDataMap.put(SPACE_ID, new FieldMetaData("space_id", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - tmpMetaDataMap.put(PART_ID, new FieldMetaData("part_id", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - tmpMetaDataMap.put(POSITION, new FieldMetaData("position", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - tmpMetaDataMap.put(DATA, new FieldMetaData("data", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, + tmpMetaDataMap.put(TERM_OF_PARTS, new FieldMetaData("term_of_parts", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.I32), + new FieldValueMetaData(TType.I64)))); + tmpMetaDataMap.put(ADD_EDGE_REQ, new FieldMetaData("add_edge_req", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, AddEdgesRequest.class))); + tmpMetaDataMap.put(UPD_EDGE_REQ, new FieldMetaData("upd_edge_req", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, UpdateEdgeRequest.class))); + tmpMetaDataMap.put(EDGE_VER, new FieldMetaData("edge_ver", TFieldRequirementType.OPTIONAL, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.I32), new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING))))); + new FieldValueMetaData(TType.I64))))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -78,30 +78,36 @@ public InternalTxnRequest() { public InternalTxnRequest( long txn_id, - int space_id, - int part_id, - int position, - List> data) { + Map term_of_parts) { this(); this.txn_id = txn_id; setTxn_idIsSet(true); - this.space_id = space_id; - setSpace_idIsSet(true); - this.part_id = part_id; - setPart_idIsSet(true); - this.position = position; - setPositionIsSet(true); - this.data = data; + this.term_of_parts = term_of_parts; + } + + public InternalTxnRequest( + long txn_id, + Map term_of_parts, + AddEdgesRequest add_edge_req, + UpdateEdgeRequest upd_edge_req, + Map> edge_ver) { + this(); + this.txn_id = txn_id; + setTxn_idIsSet(true); + this.term_of_parts = term_of_parts; + this.add_edge_req = add_edge_req; + this.upd_edge_req = upd_edge_req; + this.edge_ver = edge_ver; } public static class Builder { private long txn_id; - private int space_id; - private int part_id; - private int position; - private List> data; + private Map term_of_parts; + private AddEdgesRequest add_edge_req; + private UpdateEdgeRequest upd_edge_req; + private Map> edge_ver; - BitSet __optional_isset = new BitSet(4); + BitSet __optional_isset = new BitSet(1); public Builder() { } @@ -112,26 +118,23 @@ public Builder setTxn_id(final long txn_id) { return this; } - public Builder setSpace_id(final int space_id) { - this.space_id = space_id; - __optional_isset.set(__SPACE_ID_ISSET_ID, true); + public Builder setTerm_of_parts(final Map term_of_parts) { + this.term_of_parts = term_of_parts; return this; } - public Builder setPart_id(final int part_id) { - this.part_id = part_id; - __optional_isset.set(__PART_ID_ISSET_ID, true); + public Builder setAdd_edge_req(final AddEdgesRequest add_edge_req) { + this.add_edge_req = add_edge_req; return this; } - public Builder setPosition(final int position) { - this.position = position; - __optional_isset.set(__POSITION_ISSET_ID, true); + public Builder setUpd_edge_req(final UpdateEdgeRequest upd_edge_req) { + this.upd_edge_req = upd_edge_req; return this; } - public Builder setData(final List> data) { - this.data = data; + public Builder setEdge_ver(final Map> edge_ver) { + this.edge_ver = edge_ver; return this; } @@ -140,16 +143,10 @@ public InternalTxnRequest build() { if (__optional_isset.get(__TXN_ID_ISSET_ID)) { result.setTxn_id(this.txn_id); } - if (__optional_isset.get(__SPACE_ID_ISSET_ID)) { - result.setSpace_id(this.space_id); - } - if (__optional_isset.get(__PART_ID_ISSET_ID)) { - result.setPart_id(this.part_id); - } - if (__optional_isset.get(__POSITION_ISSET_ID)) { - result.setPosition(this.position); - } - result.setData(this.data); + result.setTerm_of_parts(this.term_of_parts); + result.setAdd_edge_req(this.add_edge_req); + result.setUpd_edge_req(this.upd_edge_req); + result.setEdge_ver(this.edge_ver); return result; } } @@ -165,11 +162,17 @@ public InternalTxnRequest(InternalTxnRequest other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); this.txn_id = TBaseHelper.deepCopy(other.txn_id); - this.space_id = TBaseHelper.deepCopy(other.space_id); - this.part_id = TBaseHelper.deepCopy(other.part_id); - this.position = TBaseHelper.deepCopy(other.position); - if (other.isSetData()) { - this.data = TBaseHelper.deepCopy(other.data); + if (other.isSetTerm_of_parts()) { + this.term_of_parts = TBaseHelper.deepCopy(other.term_of_parts); + } + if (other.isSetAdd_edge_req()) { + this.add_edge_req = TBaseHelper.deepCopy(other.add_edge_req); + } + if (other.isSetUpd_edge_req()) { + this.upd_edge_req = TBaseHelper.deepCopy(other.upd_edge_req); + } + if (other.isSetEdge_ver()) { + this.edge_ver = TBaseHelper.deepCopy(other.edge_ver); } } @@ -200,96 +203,99 @@ public void setTxn_idIsSet(boolean __value) { __isset_bit_vector.set(__TXN_ID_ISSET_ID, __value); } - public int getSpace_id() { - return this.space_id; + public Map getTerm_of_parts() { + return this.term_of_parts; } - public InternalTxnRequest setSpace_id(int space_id) { - this.space_id = space_id; - setSpace_idIsSet(true); + public InternalTxnRequest setTerm_of_parts(Map term_of_parts) { + this.term_of_parts = term_of_parts; return this; } - public void unsetSpace_id() { - __isset_bit_vector.clear(__SPACE_ID_ISSET_ID); + public void unsetTerm_of_parts() { + this.term_of_parts = null; } - // Returns true if field space_id is set (has been assigned a value) and false otherwise - public boolean isSetSpace_id() { - return __isset_bit_vector.get(__SPACE_ID_ISSET_ID); + // Returns true if field term_of_parts is set (has been assigned a value) and false otherwise + public boolean isSetTerm_of_parts() { + return this.term_of_parts != null; } - public void setSpace_idIsSet(boolean __value) { - __isset_bit_vector.set(__SPACE_ID_ISSET_ID, __value); + public void setTerm_of_partsIsSet(boolean __value) { + if (!__value) { + this.term_of_parts = null; + } } - public int getPart_id() { - return this.part_id; + public AddEdgesRequest getAdd_edge_req() { + return this.add_edge_req; } - public InternalTxnRequest setPart_id(int part_id) { - this.part_id = part_id; - setPart_idIsSet(true); + public InternalTxnRequest setAdd_edge_req(AddEdgesRequest add_edge_req) { + this.add_edge_req = add_edge_req; return this; } - public void unsetPart_id() { - __isset_bit_vector.clear(__PART_ID_ISSET_ID); + public void unsetAdd_edge_req() { + this.add_edge_req = null; } - // Returns true if field part_id is set (has been assigned a value) and false otherwise - public boolean isSetPart_id() { - return __isset_bit_vector.get(__PART_ID_ISSET_ID); + // Returns true if field add_edge_req is set (has been assigned a value) and false otherwise + public boolean isSetAdd_edge_req() { + return this.add_edge_req != null; } - public void setPart_idIsSet(boolean __value) { - __isset_bit_vector.set(__PART_ID_ISSET_ID, __value); + public void setAdd_edge_reqIsSet(boolean __value) { + if (!__value) { + this.add_edge_req = null; + } } - public int getPosition() { - return this.position; + public UpdateEdgeRequest getUpd_edge_req() { + return this.upd_edge_req; } - public InternalTxnRequest setPosition(int position) { - this.position = position; - setPositionIsSet(true); + public InternalTxnRequest setUpd_edge_req(UpdateEdgeRequest upd_edge_req) { + this.upd_edge_req = upd_edge_req; return this; } - public void unsetPosition() { - __isset_bit_vector.clear(__POSITION_ISSET_ID); + public void unsetUpd_edge_req() { + this.upd_edge_req = null; } - // Returns true if field position is set (has been assigned a value) and false otherwise - public boolean isSetPosition() { - return __isset_bit_vector.get(__POSITION_ISSET_ID); + // Returns true if field upd_edge_req is set (has been assigned a value) and false otherwise + public boolean isSetUpd_edge_req() { + return this.upd_edge_req != null; } - public void setPositionIsSet(boolean __value) { - __isset_bit_vector.set(__POSITION_ISSET_ID, __value); + public void setUpd_edge_reqIsSet(boolean __value) { + if (!__value) { + this.upd_edge_req = null; + } } - public List> getData() { - return this.data; + public Map> getEdge_ver() { + return this.edge_ver; } - public InternalTxnRequest setData(List> data) { - this.data = data; + public InternalTxnRequest setEdge_ver(Map> edge_ver) { + this.edge_ver = edge_ver; return this; } - public void unsetData() { - this.data = null; + public void unsetEdge_ver() { + this.edge_ver = null; } - // Returns true if field data is set (has been assigned a value) and false otherwise - public boolean isSetData() { - return this.data != null; + // Returns true if field edge_ver is set (has been assigned a value) and false otherwise + public boolean isSetEdge_ver() { + return this.edge_ver != null; } - public void setDataIsSet(boolean __value) { + public void setEdge_verIsSet(boolean __value) { if (!__value) { - this.data = null; + this.edge_ver = null; } } @@ -304,35 +310,35 @@ public void setFieldValue(int fieldID, Object __value) { } break; - case SPACE_ID: + case TERM_OF_PARTS: if (__value == null) { - unsetSpace_id(); + unsetTerm_of_parts(); } else { - setSpace_id((Integer)__value); + setTerm_of_parts((Map)__value); } break; - case PART_ID: + case ADD_EDGE_REQ: if (__value == null) { - unsetPart_id(); + unsetAdd_edge_req(); } else { - setPart_id((Integer)__value); + setAdd_edge_req((AddEdgesRequest)__value); } break; - case POSITION: + case UPD_EDGE_REQ: if (__value == null) { - unsetPosition(); + unsetUpd_edge_req(); } else { - setPosition((Integer)__value); + setUpd_edge_req((UpdateEdgeRequest)__value); } break; - case DATA: + case EDGE_VER: if (__value == null) { - unsetData(); + unsetEdge_ver(); } else { - setData((List>)__value); + setEdge_ver((Map>)__value); } break; @@ -346,17 +352,17 @@ public Object getFieldValue(int fieldID) { case TXN_ID: return new Long(getTxn_id()); - case SPACE_ID: - return new Integer(getSpace_id()); + case TERM_OF_PARTS: + return getTerm_of_parts(); - case PART_ID: - return new Integer(getPart_id()); + case ADD_EDGE_REQ: + return getAdd_edge_req(); - case POSITION: - return new Integer(getPosition()); + case UPD_EDGE_REQ: + return getUpd_edge_req(); - case DATA: - return getData(); + case EDGE_VER: + return getEdge_ver(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -375,75 +381,20 @@ public boolean equals(Object _that) { if (!TBaseHelper.equalsNobinary(this.txn_id, that.txn_id)) { return false; } - if (!TBaseHelper.equalsNobinary(this.space_id, that.space_id)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetTerm_of_parts(), that.isSetTerm_of_parts(), this.term_of_parts, that.term_of_parts)) { return false; } - if (!TBaseHelper.equalsNobinary(this.part_id, that.part_id)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetAdd_edge_req(), that.isSetAdd_edge_req(), this.add_edge_req, that.add_edge_req)) { return false; } - if (!TBaseHelper.equalsNobinary(this.position, that.position)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetUpd_edge_req(), that.isSetUpd_edge_req(), this.upd_edge_req, that.upd_edge_req)) { return false; } - if (!TBaseHelper.equalsSlow(this.isSetData(), that.isSetData(), this.data, that.data)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetEdge_ver(), that.isSetEdge_ver(), this.edge_ver, that.edge_ver)) { return false; } return true; } @Override public int hashCode() { - return Arrays.deepHashCode(new Object[] {txn_id, space_id, part_id, position, data}); - } - - @Override - public int compareTo(InternalTxnRequest other) { - if (other == null) { - // See java.lang.Comparable docs - throw new NullPointerException(); - } - - if (other == this) { - return 0; - } - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetTxn_id()).compareTo(other.isSetTxn_id()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(txn_id, other.txn_id); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = Boolean.valueOf(isSetSpace_id()).compareTo(other.isSetSpace_id()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(space_id, other.space_id); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = Boolean.valueOf(isSetPart_id()).compareTo(other.isSetPart_id()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(part_id, other.part_id); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = Boolean.valueOf(isSetPosition()).compareTo(other.isSetPosition()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(position, other.position); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(data, other.data); - if (lastComparison != 0) { - return lastComparison; - } - return 0; + return Arrays.deepHashCode(new Object[] {txn_id, term_of_parts, add_edge_req, upd_edge_req, edge_ver}); } public void read(TProtocol iprot) throws TException { @@ -465,56 +416,71 @@ public void read(TProtocol iprot) throws TException { TProtocolUtil.skip(iprot, __field.type); } break; - case SPACE_ID: - if (__field.type == TType.I32) { - this.space_id = iprot.readI32(); - setSpace_idIsSet(true); + case TERM_OF_PARTS: + if (__field.type == TType.MAP) { + { + TMap _map254 = iprot.readMapBegin(); + this.term_of_parts = new HashMap(Math.max(0, 2*_map254.size)); + for (int _i255 = 0; + (_map254.size < 0) ? iprot.peekMap() : (_i255 < _map254.size); + ++_i255) + { + int _key256; + long _val257; + _key256 = iprot.readI32(); + _val257 = iprot.readI64(); + this.term_of_parts.put(_key256, _val257); + } + iprot.readMapEnd(); + } } else { TProtocolUtil.skip(iprot, __field.type); } break; - case PART_ID: - if (__field.type == TType.I32) { - this.part_id = iprot.readI32(); - setPart_idIsSet(true); + case ADD_EDGE_REQ: + if (__field.type == TType.STRUCT) { + this.add_edge_req = new AddEdgesRequest(); + this.add_edge_req.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case POSITION: - if (__field.type == TType.I32) { - this.position = iprot.readI32(); - setPositionIsSet(true); + case UPD_EDGE_REQ: + if (__field.type == TType.STRUCT) { + this.upd_edge_req = new UpdateEdgeRequest(); + this.upd_edge_req.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case DATA: - if (__field.type == TType.LIST) { + case EDGE_VER: + if (__field.type == TType.MAP) { { - TList _list254 = iprot.readListBegin(); - this.data = new ArrayList>(Math.max(0, _list254.size)); - for (int _i255 = 0; - (_list254.size < 0) ? iprot.peekList() : (_i255 < _list254.size); - ++_i255) + TMap _map258 = iprot.readMapBegin(); + this.edge_ver = new HashMap>(Math.max(0, 2*_map258.size)); + for (int _i259 = 0; + (_map258.size < 0) ? iprot.peekMap() : (_i259 < _map258.size); + ++_i259) { - List _elem256; + int _key260; + List _val261; + _key260 = iprot.readI32(); { - TList _list257 = iprot.readListBegin(); - _elem256 = new ArrayList(Math.max(0, _list257.size)); - for (int _i258 = 0; - (_list257.size < 0) ? iprot.peekList() : (_i258 < _list257.size); - ++_i258) + TList _list262 = iprot.readListBegin(); + _val261 = new ArrayList(Math.max(0, _list262.size)); + for (int _i263 = 0; + (_list262.size < 0) ? iprot.peekList() : (_i263 < _list262.size); + ++_i263) { - byte[] _elem259; - _elem259 = iprot.readBinary(); - _elem256.add(_elem259); + long _elem264; + _elem264 = iprot.readI64(); + _val261.add(_elem264); } iprot.readListEnd(); } - this.data.add(_elem256); + this.edge_ver.put(_key260, _val261); } - iprot.readListEnd(); + iprot.readMapEnd(); } } else { TProtocolUtil.skip(iprot, __field.type); @@ -540,31 +506,51 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(TXN_ID_FIELD_DESC); oprot.writeI64(this.txn_id); oprot.writeFieldEnd(); - oprot.writeFieldBegin(SPACE_ID_FIELD_DESC); - oprot.writeI32(this.space_id); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(PART_ID_FIELD_DESC); - oprot.writeI32(this.part_id); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(POSITION_FIELD_DESC); - oprot.writeI32(this.position); - oprot.writeFieldEnd(); - if (this.data != null) { - oprot.writeFieldBegin(DATA_FIELD_DESC); + if (this.term_of_parts != null) { + oprot.writeFieldBegin(TERM_OF_PARTS_FIELD_DESC); { - oprot.writeListBegin(new TList(TType.LIST, this.data.size())); - for (List _iter260 : this.data) { - { - oprot.writeListBegin(new TList(TType.STRING, _iter260.size())); - for (byte[] _iter261 : _iter260) { - oprot.writeBinary(_iter261); + oprot.writeMapBegin(new TMap(TType.I32, TType.I64, this.term_of_parts.size())); + for (Map.Entry _iter265 : this.term_of_parts.entrySet()) { + oprot.writeI32(_iter265.getKey()); + oprot.writeI64(_iter265.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.add_edge_req != null) { + if (isSetAdd_edge_req()) { + oprot.writeFieldBegin(ADD_EDGE_REQ_FIELD_DESC); + this.add_edge_req.write(oprot); + oprot.writeFieldEnd(); + } + } + if (this.upd_edge_req != null) { + if (isSetUpd_edge_req()) { + oprot.writeFieldBegin(UPD_EDGE_REQ_FIELD_DESC); + this.upd_edge_req.write(oprot); + oprot.writeFieldEnd(); + } + } + if (this.edge_ver != null) { + if (isSetEdge_ver()) { + oprot.writeFieldBegin(EDGE_VER_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.I32, TType.LIST, this.edge_ver.size())); + for (Map.Entry> _iter266 : this.edge_ver.entrySet()) { + oprot.writeI32(_iter266.getKey()); + { + oprot.writeListBegin(new TList(TType.I64, _iter266.getValue().size())); + for (long _iter267 : _iter266.getValue()) { + oprot.writeI64(_iter267); + } + oprot.writeListEnd(); } - oprot.writeListEnd(); } + oprot.writeMapEnd(); } - oprot.writeListEnd(); + oprot.writeFieldEnd(); } - oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -594,36 +580,57 @@ public String toString(int indent, boolean prettyPrint) { first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("space_id"); - sb.append(space); - sb.append(":").append(space); - sb.append(TBaseHelper.toString(this.getSpace_id(), indent + 1, prettyPrint)); - first = false; - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("part_id"); - sb.append(space); - sb.append(":").append(space); - sb.append(TBaseHelper.toString(this.getPart_id(), indent + 1, prettyPrint)); - first = false; - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("position"); + sb.append("term_of_parts"); sb.append(space); sb.append(":").append(space); - sb.append(TBaseHelper.toString(this.getPosition(), indent + 1, prettyPrint)); - first = false; - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("data"); - sb.append(space); - sb.append(":").append(space); - if (this.getData() == null) { + if (this.getTerm_of_parts() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getData(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getTerm_of_parts(), indent + 1, prettyPrint)); } first = false; + if (isSetAdd_edge_req()) + { + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("add_edge_req"); + sb.append(space); + sb.append(":").append(space); + if (this.getAdd_edge_req() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getAdd_edge_req(), indent + 1, prettyPrint)); + } + first = false; + } + if (isSetUpd_edge_req()) + { + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("upd_edge_req"); + sb.append(space); + sb.append(":").append(space); + if (this.getUpd_edge_req() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getUpd_edge_req(), indent + 1, prettyPrint)); + } + first = false; + } + if (isSetEdge_ver()) + { + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("edge_ver"); + sb.append(space); + sb.append(":").append(space); + if (this.getEdge_ver() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getEdge_ver(), indent + 1, prettyPrint)); + } + first = false; + } sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); sb.append(")"); return sb.toString(); diff --git a/client/src/main/generated/com/vesoft/nebula/storage/RequestCommon.java b/client/src/main/generated/com/vesoft/nebula/storage/RequestCommon.java index 96a5a568e..94c7bcb37 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/RequestCommon.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/RequestCommon.java @@ -28,16 +28,20 @@ public class RequestCommon implements TBase, java.io.Serializable, Cloneable, Co private static final TStruct STRUCT_DESC = new TStruct("RequestCommon"); private static final TField SESSION_ID_FIELD_DESC = new TField("session_id", TType.I64, (short)1); private static final TField PLAN_ID_FIELD_DESC = new TField("plan_id", TType.I64, (short)2); + private static final TField PROFILE_DETAIL_FIELD_DESC = new TField("profile_detail", TType.BOOL, (short)3); public long session_id; public long plan_id; + public boolean profile_detail; public static final int SESSION_ID = 1; public static final int PLAN_ID = 2; + public static final int PROFILE_DETAIL = 3; // isset id assignments private static final int __SESSION_ID_ISSET_ID = 0; private static final int __PLAN_ID_ISSET_ID = 1; - private BitSet __isset_bit_vector = new BitSet(2); + private static final int __PROFILE_DETAIL_ISSET_ID = 2; + private BitSet __isset_bit_vector = new BitSet(3); public static final Map metaDataMap; @@ -47,6 +51,8 @@ public class RequestCommon implements TBase, java.io.Serializable, Cloneable, Co new FieldValueMetaData(TType.I64))); tmpMetaDataMap.put(PLAN_ID, new FieldMetaData("plan_id", TFieldRequirementType.OPTIONAL, new FieldValueMetaData(TType.I64))); + tmpMetaDataMap.put(PROFILE_DETAIL, new FieldMetaData("profile_detail", TFieldRequirementType.OPTIONAL, + new FieldValueMetaData(TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -59,19 +65,23 @@ public RequestCommon() { public RequestCommon( long session_id, - long plan_id) { + long plan_id, + boolean profile_detail) { this(); this.session_id = session_id; setSession_idIsSet(true); this.plan_id = plan_id; setPlan_idIsSet(true); + this.profile_detail = profile_detail; + setProfile_detailIsSet(true); } public static class Builder { private long session_id; private long plan_id; + private boolean profile_detail; - BitSet __optional_isset = new BitSet(2); + BitSet __optional_isset = new BitSet(3); public Builder() { } @@ -88,6 +98,12 @@ public Builder setPlan_id(final long plan_id) { return this; } + public Builder setProfile_detail(final boolean profile_detail) { + this.profile_detail = profile_detail; + __optional_isset.set(__PROFILE_DETAIL_ISSET_ID, true); + return this; + } + public RequestCommon build() { RequestCommon result = new RequestCommon(); if (__optional_isset.get(__SESSION_ID_ISSET_ID)) { @@ -96,6 +112,9 @@ public RequestCommon build() { if (__optional_isset.get(__PLAN_ID_ISSET_ID)) { result.setPlan_id(this.plan_id); } + if (__optional_isset.get(__PROFILE_DETAIL_ISSET_ID)) { + result.setProfile_detail(this.profile_detail); + } return result; } } @@ -112,6 +131,7 @@ public RequestCommon(RequestCommon other) { __isset_bit_vector.or(other.__isset_bit_vector); this.session_id = TBaseHelper.deepCopy(other.session_id); this.plan_id = TBaseHelper.deepCopy(other.plan_id); + this.profile_detail = TBaseHelper.deepCopy(other.profile_detail); } public RequestCommon deepCopy() { @@ -164,6 +184,29 @@ public void setPlan_idIsSet(boolean __value) { __isset_bit_vector.set(__PLAN_ID_ISSET_ID, __value); } + public boolean isProfile_detail() { + return this.profile_detail; + } + + public RequestCommon setProfile_detail(boolean profile_detail) { + this.profile_detail = profile_detail; + setProfile_detailIsSet(true); + return this; + } + + public void unsetProfile_detail() { + __isset_bit_vector.clear(__PROFILE_DETAIL_ISSET_ID); + } + + // Returns true if field profile_detail is set (has been assigned a value) and false otherwise + public boolean isSetProfile_detail() { + return __isset_bit_vector.get(__PROFILE_DETAIL_ISSET_ID); + } + + public void setProfile_detailIsSet(boolean __value) { + __isset_bit_vector.set(__PROFILE_DETAIL_ISSET_ID, __value); + } + public void setFieldValue(int fieldID, Object __value) { switch (fieldID) { case SESSION_ID: @@ -182,6 +225,14 @@ public void setFieldValue(int fieldID, Object __value) { } break; + case PROFILE_DETAIL: + if (__value == null) { + unsetProfile_detail(); + } else { + setProfile_detail((Boolean)__value); + } + break; + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -195,6 +246,9 @@ public Object getFieldValue(int fieldID) { case PLAN_ID: return new Long(getPlan_id()); + case PROFILE_DETAIL: + return new Boolean(isProfile_detail()); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -214,12 +268,14 @@ public boolean equals(Object _that) { if (!TBaseHelper.equalsNobinary(this.isSetPlan_id(), that.isSetPlan_id(), this.plan_id, that.plan_id)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetProfile_detail(), that.isSetProfile_detail(), this.profile_detail, that.profile_detail)) { return false; } + return true; } @Override public int hashCode() { - return Arrays.deepHashCode(new Object[] {session_id, plan_id}); + return Arrays.deepHashCode(new Object[] {session_id, plan_id, profile_detail}); } @Override @@ -250,6 +306,14 @@ public int compareTo(RequestCommon other) { if (lastComparison != 0) { return lastComparison; } + lastComparison = Boolean.valueOf(isSetProfile_detail()).compareTo(other.isSetProfile_detail()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(profile_detail, other.profile_detail); + if (lastComparison != 0) { + return lastComparison; + } return 0; } @@ -280,6 +344,14 @@ public void read(TProtocol iprot) throws TException { TProtocolUtil.skip(iprot, __field.type); } break; + case PROFILE_DETAIL: + if (__field.type == TType.BOOL) { + this.profile_detail = iprot.readBool(); + setProfile_detailIsSet(true); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; default: TProtocolUtil.skip(iprot, __field.type); break; @@ -307,6 +379,11 @@ public void write(TProtocol oprot) throws TException { oprot.writeI64(this.plan_id); oprot.writeFieldEnd(); } + if (isSetProfile_detail()) { + oprot.writeFieldBegin(PROFILE_DETAIL_FIELD_DESC); + oprot.writeBool(this.profile_detail); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -346,6 +423,16 @@ public String toString(int indent, boolean prettyPrint) { sb.append(TBaseHelper.toString(this.getPlan_id(), indent + 1, prettyPrint)); first = false; } + if (isSetProfile_detail()) + { + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("profile_detail"); + sb.append(space); + sb.append(":").append(space); + sb.append(TBaseHelper.toString(this.isProfile_detail(), indent + 1, prettyPrint)); + first = false; + } sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); sb.append(")"); return sb.toString(); diff --git a/client/src/main/generated/com/vesoft/nebula/storage/StorageAdminService.java b/client/src/main/generated/com/vesoft/nebula/storage/StorageAdminService.java index 8b6e3019c..04627c6a4 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/StorageAdminService.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/StorageAdminService.java @@ -868,17 +868,17 @@ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientM super(protocolFactory, clientManager, transport); } - public void transLeader(TransLeaderReq req, AsyncMethodCallback resultHandler371) throws TException { + public void transLeader(TransLeaderReq req, AsyncMethodCallback resultHandler400) throws TException { checkReady(); - transLeader_call method_call = new transLeader_call(req, resultHandler371, this, ___protocolFactory, ___transport); + transLeader_call method_call = new transLeader_call(req, resultHandler400, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class transLeader_call extends TAsyncMethodCall { private TransLeaderReq req; - public transLeader_call(TransLeaderReq req, AsyncMethodCallback resultHandler372, TAsyncClient client368, TProtocolFactory protocolFactory369, TNonblockingTransport transport370) throws TException { - super(client368, protocolFactory369, transport370, resultHandler372, false); + public transLeader_call(TransLeaderReq req, AsyncMethodCallback resultHandler401, TAsyncClient client397, TProtocolFactory protocolFactory398, TNonblockingTransport transport399) throws TException { + super(client397, protocolFactory398, transport399, resultHandler401, false); this.req = req; } @@ -900,17 +900,17 @@ public AdminExecResp getResult() throws TException { } } - public void addPart(AddPartReq req, AsyncMethodCallback resultHandler376) throws TException { + public void addPart(AddPartReq req, AsyncMethodCallback resultHandler405) throws TException { checkReady(); - addPart_call method_call = new addPart_call(req, resultHandler376, this, ___protocolFactory, ___transport); + addPart_call method_call = new addPart_call(req, resultHandler405, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addPart_call extends TAsyncMethodCall { private AddPartReq req; - public addPart_call(AddPartReq req, AsyncMethodCallback resultHandler377, TAsyncClient client373, TProtocolFactory protocolFactory374, TNonblockingTransport transport375) throws TException { - super(client373, protocolFactory374, transport375, resultHandler377, false); + public addPart_call(AddPartReq req, AsyncMethodCallback resultHandler406, TAsyncClient client402, TProtocolFactory protocolFactory403, TNonblockingTransport transport404) throws TException { + super(client402, protocolFactory403, transport404, resultHandler406, false); this.req = req; } @@ -932,17 +932,17 @@ public AdminExecResp getResult() throws TException { } } - public void addLearner(AddLearnerReq req, AsyncMethodCallback resultHandler381) throws TException { + public void addLearner(AddLearnerReq req, AsyncMethodCallback resultHandler410) throws TException { checkReady(); - addLearner_call method_call = new addLearner_call(req, resultHandler381, this, ___protocolFactory, ___transport); + addLearner_call method_call = new addLearner_call(req, resultHandler410, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addLearner_call extends TAsyncMethodCall { private AddLearnerReq req; - public addLearner_call(AddLearnerReq req, AsyncMethodCallback resultHandler382, TAsyncClient client378, TProtocolFactory protocolFactory379, TNonblockingTransport transport380) throws TException { - super(client378, protocolFactory379, transport380, resultHandler382, false); + public addLearner_call(AddLearnerReq req, AsyncMethodCallback resultHandler411, TAsyncClient client407, TProtocolFactory protocolFactory408, TNonblockingTransport transport409) throws TException { + super(client407, protocolFactory408, transport409, resultHandler411, false); this.req = req; } @@ -964,17 +964,17 @@ public AdminExecResp getResult() throws TException { } } - public void removePart(RemovePartReq req, AsyncMethodCallback resultHandler386) throws TException { + public void removePart(RemovePartReq req, AsyncMethodCallback resultHandler415) throws TException { checkReady(); - removePart_call method_call = new removePart_call(req, resultHandler386, this, ___protocolFactory, ___transport); + removePart_call method_call = new removePart_call(req, resultHandler415, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class removePart_call extends TAsyncMethodCall { private RemovePartReq req; - public removePart_call(RemovePartReq req, AsyncMethodCallback resultHandler387, TAsyncClient client383, TProtocolFactory protocolFactory384, TNonblockingTransport transport385) throws TException { - super(client383, protocolFactory384, transport385, resultHandler387, false); + public removePart_call(RemovePartReq req, AsyncMethodCallback resultHandler416, TAsyncClient client412, TProtocolFactory protocolFactory413, TNonblockingTransport transport414) throws TException { + super(client412, protocolFactory413, transport414, resultHandler416, false); this.req = req; } @@ -996,17 +996,17 @@ public AdminExecResp getResult() throws TException { } } - public void memberChange(MemberChangeReq req, AsyncMethodCallback resultHandler391) throws TException { + public void memberChange(MemberChangeReq req, AsyncMethodCallback resultHandler420) throws TException { checkReady(); - memberChange_call method_call = new memberChange_call(req, resultHandler391, this, ___protocolFactory, ___transport); + memberChange_call method_call = new memberChange_call(req, resultHandler420, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class memberChange_call extends TAsyncMethodCall { private MemberChangeReq req; - public memberChange_call(MemberChangeReq req, AsyncMethodCallback resultHandler392, TAsyncClient client388, TProtocolFactory protocolFactory389, TNonblockingTransport transport390) throws TException { - super(client388, protocolFactory389, transport390, resultHandler392, false); + public memberChange_call(MemberChangeReq req, AsyncMethodCallback resultHandler421, TAsyncClient client417, TProtocolFactory protocolFactory418, TNonblockingTransport transport419) throws TException { + super(client417, protocolFactory418, transport419, resultHandler421, false); this.req = req; } @@ -1028,17 +1028,17 @@ public AdminExecResp getResult() throws TException { } } - public void waitingForCatchUpData(CatchUpDataReq req, AsyncMethodCallback resultHandler396) throws TException { + public void waitingForCatchUpData(CatchUpDataReq req, AsyncMethodCallback resultHandler425) throws TException { checkReady(); - waitingForCatchUpData_call method_call = new waitingForCatchUpData_call(req, resultHandler396, this, ___protocolFactory, ___transport); + waitingForCatchUpData_call method_call = new waitingForCatchUpData_call(req, resultHandler425, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class waitingForCatchUpData_call extends TAsyncMethodCall { private CatchUpDataReq req; - public waitingForCatchUpData_call(CatchUpDataReq req, AsyncMethodCallback resultHandler397, TAsyncClient client393, TProtocolFactory protocolFactory394, TNonblockingTransport transport395) throws TException { - super(client393, protocolFactory394, transport395, resultHandler397, false); + public waitingForCatchUpData_call(CatchUpDataReq req, AsyncMethodCallback resultHandler426, TAsyncClient client422, TProtocolFactory protocolFactory423, TNonblockingTransport transport424) throws TException { + super(client422, protocolFactory423, transport424, resultHandler426, false); this.req = req; } @@ -1060,17 +1060,17 @@ public AdminExecResp getResult() throws TException { } } - public void createCheckpoint(CreateCPRequest req, AsyncMethodCallback resultHandler401) throws TException { + public void createCheckpoint(CreateCPRequest req, AsyncMethodCallback resultHandler430) throws TException { checkReady(); - createCheckpoint_call method_call = new createCheckpoint_call(req, resultHandler401, this, ___protocolFactory, ___transport); + createCheckpoint_call method_call = new createCheckpoint_call(req, resultHandler430, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createCheckpoint_call extends TAsyncMethodCall { private CreateCPRequest req; - public createCheckpoint_call(CreateCPRequest req, AsyncMethodCallback resultHandler402, TAsyncClient client398, TProtocolFactory protocolFactory399, TNonblockingTransport transport400) throws TException { - super(client398, protocolFactory399, transport400, resultHandler402, false); + public createCheckpoint_call(CreateCPRequest req, AsyncMethodCallback resultHandler431, TAsyncClient client427, TProtocolFactory protocolFactory428, TNonblockingTransport transport429) throws TException { + super(client427, protocolFactory428, transport429, resultHandler431, false); this.req = req; } @@ -1092,17 +1092,17 @@ public CreateCPResp getResult() throws TException { } } - public void dropCheckpoint(DropCPRequest req, AsyncMethodCallback resultHandler406) throws TException { + public void dropCheckpoint(DropCPRequest req, AsyncMethodCallback resultHandler435) throws TException { checkReady(); - dropCheckpoint_call method_call = new dropCheckpoint_call(req, resultHandler406, this, ___protocolFactory, ___transport); + dropCheckpoint_call method_call = new dropCheckpoint_call(req, resultHandler435, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropCheckpoint_call extends TAsyncMethodCall { private DropCPRequest req; - public dropCheckpoint_call(DropCPRequest req, AsyncMethodCallback resultHandler407, TAsyncClient client403, TProtocolFactory protocolFactory404, TNonblockingTransport transport405) throws TException { - super(client403, protocolFactory404, transport405, resultHandler407, false); + public dropCheckpoint_call(DropCPRequest req, AsyncMethodCallback resultHandler436, TAsyncClient client432, TProtocolFactory protocolFactory433, TNonblockingTransport transport434) throws TException { + super(client432, protocolFactory433, transport434, resultHandler436, false); this.req = req; } @@ -1124,17 +1124,17 @@ public AdminExecResp getResult() throws TException { } } - public void blockingWrites(BlockingSignRequest req, AsyncMethodCallback resultHandler411) throws TException { + public void blockingWrites(BlockingSignRequest req, AsyncMethodCallback resultHandler440) throws TException { checkReady(); - blockingWrites_call method_call = new blockingWrites_call(req, resultHandler411, this, ___protocolFactory, ___transport); + blockingWrites_call method_call = new blockingWrites_call(req, resultHandler440, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class blockingWrites_call extends TAsyncMethodCall { private BlockingSignRequest req; - public blockingWrites_call(BlockingSignRequest req, AsyncMethodCallback resultHandler412, TAsyncClient client408, TProtocolFactory protocolFactory409, TNonblockingTransport transport410) throws TException { - super(client408, protocolFactory409, transport410, resultHandler412, false); + public blockingWrites_call(BlockingSignRequest req, AsyncMethodCallback resultHandler441, TAsyncClient client437, TProtocolFactory protocolFactory438, TNonblockingTransport transport439) throws TException { + super(client437, protocolFactory438, transport439, resultHandler441, false); this.req = req; } @@ -1156,17 +1156,17 @@ public AdminExecResp getResult() throws TException { } } - public void rebuildTagIndex(RebuildIndexRequest req, AsyncMethodCallback resultHandler416) throws TException { + public void rebuildTagIndex(RebuildIndexRequest req, AsyncMethodCallback resultHandler445) throws TException { checkReady(); - rebuildTagIndex_call method_call = new rebuildTagIndex_call(req, resultHandler416, this, ___protocolFactory, ___transport); + rebuildTagIndex_call method_call = new rebuildTagIndex_call(req, resultHandler445, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class rebuildTagIndex_call extends TAsyncMethodCall { private RebuildIndexRequest req; - public rebuildTagIndex_call(RebuildIndexRequest req, AsyncMethodCallback resultHandler417, TAsyncClient client413, TProtocolFactory protocolFactory414, TNonblockingTransport transport415) throws TException { - super(client413, protocolFactory414, transport415, resultHandler417, false); + public rebuildTagIndex_call(RebuildIndexRequest req, AsyncMethodCallback resultHandler446, TAsyncClient client442, TProtocolFactory protocolFactory443, TNonblockingTransport transport444) throws TException { + super(client442, protocolFactory443, transport444, resultHandler446, false); this.req = req; } @@ -1188,17 +1188,17 @@ public AdminExecResp getResult() throws TException { } } - public void rebuildEdgeIndex(RebuildIndexRequest req, AsyncMethodCallback resultHandler421) throws TException { + public void rebuildEdgeIndex(RebuildIndexRequest req, AsyncMethodCallback resultHandler450) throws TException { checkReady(); - rebuildEdgeIndex_call method_call = new rebuildEdgeIndex_call(req, resultHandler421, this, ___protocolFactory, ___transport); + rebuildEdgeIndex_call method_call = new rebuildEdgeIndex_call(req, resultHandler450, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class rebuildEdgeIndex_call extends TAsyncMethodCall { private RebuildIndexRequest req; - public rebuildEdgeIndex_call(RebuildIndexRequest req, AsyncMethodCallback resultHandler422, TAsyncClient client418, TProtocolFactory protocolFactory419, TNonblockingTransport transport420) throws TException { - super(client418, protocolFactory419, transport420, resultHandler422, false); + public rebuildEdgeIndex_call(RebuildIndexRequest req, AsyncMethodCallback resultHandler451, TAsyncClient client447, TProtocolFactory protocolFactory448, TNonblockingTransport transport449) throws TException { + super(client447, protocolFactory448, transport449, resultHandler451, false); this.req = req; } @@ -1220,17 +1220,17 @@ public AdminExecResp getResult() throws TException { } } - public void getLeaderParts(GetLeaderReq req, AsyncMethodCallback resultHandler426) throws TException { + public void getLeaderParts(GetLeaderReq req, AsyncMethodCallback resultHandler455) throws TException { checkReady(); - getLeaderParts_call method_call = new getLeaderParts_call(req, resultHandler426, this, ___protocolFactory, ___transport); + getLeaderParts_call method_call = new getLeaderParts_call(req, resultHandler455, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getLeaderParts_call extends TAsyncMethodCall { private GetLeaderReq req; - public getLeaderParts_call(GetLeaderReq req, AsyncMethodCallback resultHandler427, TAsyncClient client423, TProtocolFactory protocolFactory424, TNonblockingTransport transport425) throws TException { - super(client423, protocolFactory424, transport425, resultHandler427, false); + public getLeaderParts_call(GetLeaderReq req, AsyncMethodCallback resultHandler456, TAsyncClient client452, TProtocolFactory protocolFactory453, TNonblockingTransport transport454) throws TException { + super(client452, protocolFactory453, transport454, resultHandler456, false); this.req = req; } @@ -1252,17 +1252,17 @@ public GetLeaderPartsResp getResult() throws TException { } } - public void checkPeers(CheckPeersReq req, AsyncMethodCallback resultHandler431) throws TException { + public void checkPeers(CheckPeersReq req, AsyncMethodCallback resultHandler460) throws TException { checkReady(); - checkPeers_call method_call = new checkPeers_call(req, resultHandler431, this, ___protocolFactory, ___transport); + checkPeers_call method_call = new checkPeers_call(req, resultHandler460, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class checkPeers_call extends TAsyncMethodCall { private CheckPeersReq req; - public checkPeers_call(CheckPeersReq req, AsyncMethodCallback resultHandler432, TAsyncClient client428, TProtocolFactory protocolFactory429, TNonblockingTransport transport430) throws TException { - super(client428, protocolFactory429, transport430, resultHandler432, false); + public checkPeers_call(CheckPeersReq req, AsyncMethodCallback resultHandler461, TAsyncClient client457, TProtocolFactory protocolFactory458, TNonblockingTransport transport459) throws TException { + super(client457, protocolFactory458, transport459, resultHandler461, false); this.req = req; } @@ -1284,17 +1284,17 @@ public AdminExecResp getResult() throws TException { } } - public void addAdminTask(AddAdminTaskRequest req, AsyncMethodCallback resultHandler436) throws TException { + public void addAdminTask(AddAdminTaskRequest req, AsyncMethodCallback resultHandler465) throws TException { checkReady(); - addAdminTask_call method_call = new addAdminTask_call(req, resultHandler436, this, ___protocolFactory, ___transport); + addAdminTask_call method_call = new addAdminTask_call(req, resultHandler465, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addAdminTask_call extends TAsyncMethodCall { private AddAdminTaskRequest req; - public addAdminTask_call(AddAdminTaskRequest req, AsyncMethodCallback resultHandler437, TAsyncClient client433, TProtocolFactory protocolFactory434, TNonblockingTransport transport435) throws TException { - super(client433, protocolFactory434, transport435, resultHandler437, false); + public addAdminTask_call(AddAdminTaskRequest req, AsyncMethodCallback resultHandler466, TAsyncClient client462, TProtocolFactory protocolFactory463, TNonblockingTransport transport464) throws TException { + super(client462, protocolFactory463, transport464, resultHandler466, false); this.req = req; } @@ -1316,17 +1316,17 @@ public AdminExecResp getResult() throws TException { } } - public void stopAdminTask(StopAdminTaskRequest req, AsyncMethodCallback resultHandler441) throws TException { + public void stopAdminTask(StopAdminTaskRequest req, AsyncMethodCallback resultHandler470) throws TException { checkReady(); - stopAdminTask_call method_call = new stopAdminTask_call(req, resultHandler441, this, ___protocolFactory, ___transport); + stopAdminTask_call method_call = new stopAdminTask_call(req, resultHandler470, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class stopAdminTask_call extends TAsyncMethodCall { private StopAdminTaskRequest req; - public stopAdminTask_call(StopAdminTaskRequest req, AsyncMethodCallback resultHandler442, TAsyncClient client438, TProtocolFactory protocolFactory439, TNonblockingTransport transport440) throws TException { - super(client438, protocolFactory439, transport440, resultHandler442, false); + public stopAdminTask_call(StopAdminTaskRequest req, AsyncMethodCallback resultHandler471, TAsyncClient client467, TProtocolFactory protocolFactory468, TNonblockingTransport transport469) throws TException { + super(client467, protocolFactory468, transport469, resultHandler471, false); this.req = req; } @@ -1348,17 +1348,17 @@ public AdminExecResp getResult() throws TException { } } - public void listClusterInfo(ListClusterInfoReq req, AsyncMethodCallback resultHandler446) throws TException { + public void listClusterInfo(ListClusterInfoReq req, AsyncMethodCallback resultHandler475) throws TException { checkReady(); - listClusterInfo_call method_call = new listClusterInfo_call(req, resultHandler446, this, ___protocolFactory, ___transport); + listClusterInfo_call method_call = new listClusterInfo_call(req, resultHandler475, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listClusterInfo_call extends TAsyncMethodCall { private ListClusterInfoReq req; - public listClusterInfo_call(ListClusterInfoReq req, AsyncMethodCallback resultHandler447, TAsyncClient client443, TProtocolFactory protocolFactory444, TNonblockingTransport transport445) throws TException { - super(client443, protocolFactory444, transport445, resultHandler447, false); + public listClusterInfo_call(ListClusterInfoReq req, AsyncMethodCallback resultHandler476, TAsyncClient client472, TProtocolFactory protocolFactory473, TNonblockingTransport transport474) throws TException { + super(client472, protocolFactory473, transport474, resultHandler476, false); this.req = req; } From 19f1d21c6d1a1bc43a89b5bdae90885e62752d50 Mon Sep 17 00:00:00 2001 From: Klay Date: Sat, 9 Oct 2021 12:49:54 -0700 Subject: [PATCH 3/6] Code optimization --- .github/workflows/maven.yml | 2 - .../client/graph/data/CASignedSSLParam.java | 2 +- .../nebula/client/graph/data/SSLParam.java | 2 +- .../client/graph/data/SelfSignedSSLParam.java | 2 +- .../nebula/client/graph/net/NebulaPool.java | 4 +- .../graph/net/RoundRobinLoadBalancer.java | 7 +- .../client/graph/net/SyncConnection.java | 7 +- .../java/com/vesoft/nebula/util/SslUtil.java | 25 +- .../client/graph/data/TestDataFromServer.java | 43 +-- .../nebula/encoder/MetaCacheImplTest.java | 4 +- .../resources/docker-compose-casigned.yaml | 351 ++---------------- .../resources/docker-compose-selfsigned.yaml | 345 ++--------------- client/src/test/resources/ssl/selfsigned.key | 2 +- .../test/resources/ssl/selfsigned.password | 2 +- client/src/test/resources/ssl/selfsigned.pem | 2 +- .../src/test/resources/ssl/test.ca.password | 2 +- .../nebula/examples/GraphClientExample.java | 17 +- 17 files changed, 132 insertions(+), 687 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 82ffec2ca..9a28d7b4f 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -39,8 +39,6 @@ jobs: git clone https://github.com/vesoft-inc/nebula-docker-compose.git pushd nebula-docker-compose/ cp ../../client/src/test/resources/docker-compose.yaml . - cp ../../client/src/test/resources/docker-compose-casigned.yaml . - cp ../../client/src/test/resources/docker-compose-selfsigned.yaml . docker-compose up -d sleep 10 popd diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/data/CASignedSSLParam.java b/client/src/main/java/com/vesoft/nebula/client/graph/data/CASignedSSLParam.java index eb9644857..9667c70f9 100644 --- a/client/src/main/java/com/vesoft/nebula/client/graph/data/CASignedSSLParam.java +++ b/client/src/main/java/com/vesoft/nebula/client/graph/data/CASignedSSLParam.java @@ -1,4 +1,4 @@ -/* Copyright (c) 2020 vesoft inc. All rights reserved. +/* Copyright (c) 2021 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/data/SSLParam.java b/client/src/main/java/com/vesoft/nebula/client/graph/data/SSLParam.java index 05c346578..1a19ec48d 100644 --- a/client/src/main/java/com/vesoft/nebula/client/graph/data/SSLParam.java +++ b/client/src/main/java/com/vesoft/nebula/client/graph/data/SSLParam.java @@ -1,4 +1,4 @@ -/* Copyright (c) 2020 vesoft inc. All rights reserved. +/* Copyright (c) 2021 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/data/SelfSignedSSLParam.java b/client/src/main/java/com/vesoft/nebula/client/graph/data/SelfSignedSSLParam.java index 26dddc82c..d10046a6d 100644 --- a/client/src/main/java/com/vesoft/nebula/client/graph/data/SelfSignedSSLParam.java +++ b/client/src/main/java/com/vesoft/nebula/client/graph/data/SelfSignedSSLParam.java @@ -1,4 +1,4 @@ -/* Copyright (c) 2020 vesoft inc. All rights reserved. +/* Copyright (c) 2021 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/net/NebulaPool.java b/client/src/main/java/com/vesoft/nebula/client/graph/net/NebulaPool.java index a14c02a90..6fe80a2ba 100644 --- a/client/src/main/java/com/vesoft/nebula/client/graph/net/NebulaPool.java +++ b/client/src/main/java/com/vesoft/nebula/client/graph/net/NebulaPool.java @@ -86,8 +86,8 @@ public boolean init(List addresses, NebulaPoolConfig config) this.waitTime = config.getWaitTime(); List newAddrs = hostToIp(addresses); this.loadBalancer = config.isEnableSsl() - ? new RoundRobinLoadBalancer(newAddrs,config.getTimeout(), config.getSslParam()) - : new RoundRobinLoadBalancer(newAddrs,config.getTimeout()); + ? new RoundRobinLoadBalancer(newAddrs, config.getTimeout(), config.getSslParam()) + : new RoundRobinLoadBalancer(newAddrs, config.getTimeout()); ConnObjectPool objectPool = new ConnObjectPool(this.loadBalancer, config); this.objectPool = new GenericObjectPool<>(objectPool); GenericObjectPoolConfig objConfig = new GenericObjectPoolConfig(); diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/net/RoundRobinLoadBalancer.java b/client/src/main/java/com/vesoft/nebula/client/graph/net/RoundRobinLoadBalancer.java index e05e3a9df..9e7c9402a 100644 --- a/client/src/main/java/com/vesoft/nebula/client/graph/net/RoundRobinLoadBalancer.java +++ b/client/src/main/java/com/vesoft/nebula/client/graph/net/RoundRobinLoadBalancer.java @@ -35,14 +35,9 @@ public RoundRobinLoadBalancer(List addresses, int timeout) { } public RoundRobinLoadBalancer(List addresses, int timeout, SSLParam sslParam) { - this.timeout = timeout; + this(addresses,timeout); this.sslParam = sslParam; this.enabledSsl = true; - for (HostAddress addr : addresses) { - this.addresses.add(addr); - this.serversStatus.put(addr, S_BAD); - } - schedule.scheduleAtFixedRate(this::scheduleTask, 0, delayTime, TimeUnit.SECONDS); } public void close() { diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/net/SyncConnection.java b/client/src/main/java/com/vesoft/nebula/client/graph/net/SyncConnection.java index 83f911b23..ed4c3b3ae 100644 --- a/client/src/main/java/com/vesoft/nebula/client/graph/net/SyncConnection.java +++ b/client/src/main/java/com/vesoft/nebula/client/graph/net/SyncConnection.java @@ -41,14 +41,10 @@ public void open(HostAddress address, int timeout, SSLParam sslParam) throws IOE try { SSLSocketFactory sslSocketFactory; - this.sslParam = sslParam; - if (sslParam == null) { - open(address, timeout); - return; - } this.serverAddr = address; this.timeout = timeout <= 0 ? Integer.MAX_VALUE : timeout; this.enabledSsl = true; + this.sslParam = sslParam; if (sslParam.getSignMode() == SSLParam.SignMode.CA_SIGNED) { sslSocketFactory = SslUtil.getSSLSocketFactoryWithCA((CASignedSSLParam) sslParam); @@ -192,7 +188,6 @@ public boolean ping() { execute(0, "YIELD 1;"); return true; } catch (IOErrorException e) { - e.printStackTrace(); return false; } } diff --git a/client/src/main/java/com/vesoft/nebula/util/SslUtil.java b/client/src/main/java/com/vesoft/nebula/util/SslUtil.java index 12b91b774..30e6d1cd4 100644 --- a/client/src/main/java/com/vesoft/nebula/util/SslUtil.java +++ b/client/src/main/java/com/vesoft/nebula/util/SslUtil.java @@ -1,4 +1,4 @@ -/* Copyright (c) 2020 vesoft inc. All rights reserved. +/* Copyright (c) 2021 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. @@ -27,8 +27,11 @@ import org.bouncycastle.openssl.PEMParser; import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter; import org.bouncycastle.openssl.jcajce.JcePEMDecryptorProviderBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class SslUtil { + private static final Logger LOGGER = LoggerFactory.getLogger(SslUtil.class); public static SSLSocketFactory getSSLSocketFactoryWithCA(CASignedSSLParam param) { final String caCrtFile = param.getCaCrtFilePath(); @@ -100,7 +103,7 @@ public static SSLSocketFactory getSSLSocketFactoryWithCA(CASignedSSLParam param) return context.getSocketFactory(); } catch (Exception e) { - e.printStackTrace(); + LOGGER.error(e.getMessage()); } return null; @@ -132,7 +135,7 @@ public static SSLSocketFactory getSSLSocketFactoryWithoutCA(SelfSignedSSLParam p key = keyConverter.getKeyPair((PEMKeyPair) keyObject); } - // CA certificate is used to authenticate server + // certificate is used to authenticate server JcaX509CertificateConverter certificateConverter = new JcaX509CertificateConverter().setProvider("BC"); @@ -141,10 +144,18 @@ public static SSLSocketFactory getSSLSocketFactoryWithoutCA(SelfSignedSSLParam p X509CertificateHolder certHolder = (X509CertificateHolder) reader.readObject(); reader.close(); - // Client key and certificates are sent to server so it can authenticate the client - KeyStore clientKeyStore = KeyStore.getInstance(KeyStore.getDefaultType()); X509Certificate cert = certificateConverter.getCertificate(certHolder); + // certificate is used to authenticate server + KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + keyStore.load(null, null); + keyStore.setCertificateEntry("certificate", cert); + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance( + TrustManagerFactory.getDefaultAlgorithm()); + trustManagerFactory.init(keyStore); + + // Client key and certificates are sent to server so it can authenticate the client + KeyStore clientKeyStore = KeyStore.getInstance(KeyStore.getDefaultType()); clientKeyStore.load(null, null); clientKeyStore.setCertificateEntry("certificate", cert); clientKeyStore.setKeyEntry("private-key", key.getPrivate(), password.toCharArray(), @@ -157,12 +168,12 @@ public static SSLSocketFactory getSSLSocketFactoryWithoutCA(SelfSignedSSLParam p // Create SSL socket factory SSLContext context = SSLContext.getInstance("TLSv1.3"); context.init(keyManagerFactory.getKeyManagers(), - null, null); + trustManagerFactory.getTrustManagers(), null); // Return the newly created socket factory object return context.getSocketFactory(); } catch (Exception e) { - e.printStackTrace(); + LOGGER.error(e.getMessage()); } return null; diff --git a/client/src/test/java/com/vesoft/nebula/client/graph/data/TestDataFromServer.java b/client/src/test/java/com/vesoft/nebula/client/graph/data/TestDataFromServer.java index 8f73d7bd8..d71442857 100644 --- a/client/src/test/java/com/vesoft/nebula/client/graph/data/TestDataFromServer.java +++ b/client/src/test/java/com/vesoft/nebula/client/graph/data/TestDataFromServer.java @@ -458,34 +458,29 @@ public void testSelfSignedSsl() { NebulaPool sslPool = new NebulaPool(); try { Runtime runtime = Runtime.getRuntime(); - runtime.exec("docker-compose down").waitFor(10, TimeUnit.SECONDS); + runtime.exec("docker-compose -f src/test/resources/docker-compose" + + "-selfsigned.yaml up -d").waitFor(20,TimeUnit.SECONDS); - // boot docker with ca signed yml - runtime.exec("docker-compose -f docker-compose-selfsigned.yaml up -d") - .waitFor(15,TimeUnit.SECONDS); NebulaPoolConfig nebulaSslPoolConfig = new NebulaPoolConfig(); nebulaSslPoolConfig.setMaxConnSize(100); + nebulaSslPoolConfig.setEnableSsl(true); nebulaSslPoolConfig.setSslParam(new SelfSignedSSLParam( - "/share/resources/selfsigned.pem", - "/share/resources/selfsigned.key", + "src/test/resources/ssl/selfsigned.pem", + "src/test/resources/ssl/selfsigned.key", "vesoft")); - Assert.assertTrue(sslPool.init(Arrays.asList(new HostAddress("127.0.0.1", 9670)), + Assert.assertTrue(sslPool.init(Arrays.asList(new HostAddress("127.0.0.1", 8669)), nebulaSslPoolConfig)); sslSession = sslPool.getSession("root", "nebula", true); String ngql = "YIELD 1"; JSONObject resp = JSON.parseObject(sslSession.executeJson(ngql)); - System.out.println(resp); String rowData = resp.getJSONArray("results").getJSONObject(0).getJSONArray("data") .getJSONObject(0).getJSONArray("row").toJSONString(); String exp = "[1]"; Assert.assertEquals(rowData, exp); - runtime.exec("docker-compose -f docker-compose-selfsigned.yaml down") - .waitFor(15,TimeUnit.SECONDS); - - runtime.exec("docker-compose up -d") - .waitFor(10,TimeUnit.SECONDS); + runtime.exec("docker-compose -f src/test/resources/docker-compose" + + "-selfsigned.yaml down").waitFor(60,TimeUnit.SECONDS); } catch (Exception e) { e.printStackTrace(); assert false; @@ -503,18 +498,17 @@ public void testCASignedSsl() { NebulaPool sslPool = new NebulaPool(); try { Runtime runtime = Runtime.getRuntime(); - runtime.exec("docker-compose down").waitFor(10, TimeUnit.SECONDS); + runtime.exec("docker-compose -f src/test/resources/docker-compose" + + "-casigned.yaml up -d").waitFor(20,TimeUnit.SECONDS); - // boot docker with ca signed yml - runtime.exec("docker-compose -f docker-compose-casigned.yaml up -d") - .waitFor(15,TimeUnit.SECONDS); NebulaPoolConfig nebulaSslPoolConfig = new NebulaPoolConfig(); nebulaSslPoolConfig.setMaxConnSize(100); + nebulaSslPoolConfig.setEnableSsl(true); nebulaSslPoolConfig.setSslParam(new CASignedSSLParam( - "/share/resources/casigned.pem", - "/share/resources/casigned.crt", - "/share/resources/casigned.key")); - Assert.assertTrue(sslPool.init(Arrays.asList(new HostAddress("127.0.0.1", 9670)), + "src/test/resources/ssl/casigned.pem", + "src/test/resources/ssl/casigned.crt", + "src/test/resources/ssl/casigned.key")); + Assert.assertTrue(sslPool.init(Arrays.asList(new HostAddress("127.0.0.1", 8669)), nebulaSslPoolConfig)); sslSession = sslPool.getSession("root", "nebula", true); @@ -525,11 +519,8 @@ public void testCASignedSsl() { String exp = "[1]"; Assert.assertEquals(rowData, exp); - runtime.exec("docker-compose -f docker-compose-casigned.yaml down") - .waitFor(15,TimeUnit.SECONDS); - - runtime.exec("docker-compose up -d") - .waitFor(10,TimeUnit.SECONDS); + runtime.exec("docker-compose -f src/test/resources/docker-compose" + + "-casigned.yaml down").waitFor(60,TimeUnit.SECONDS); } catch (Exception e) { e.printStackTrace(); assert false; diff --git a/client/src/test/java/com/vesoft/nebula/encoder/MetaCacheImplTest.java b/client/src/test/java/com/vesoft/nebula/encoder/MetaCacheImplTest.java index ccfdff3f0..09bda6469 100644 --- a/client/src/test/java/com/vesoft/nebula/encoder/MetaCacheImplTest.java +++ b/client/src/test/java/com/vesoft/nebula/encoder/MetaCacheImplTest.java @@ -61,7 +61,7 @@ private Schema genNoDefaultVal() { new ColumnTypeDef(PropertyType.STRING)); columns.add(columnDef); columnDef = new ColumnDef(("Col09").getBytes(), - new ColumnTypeDef(PropertyType.FIXED_STRING, (short)12)); + new ColumnTypeDef(PropertyType.FIXED_STRING, (short)12, null)); columns.add(columnDef); columnDef = new ColumnDef(("Col10").getBytes(), new ColumnTypeDef(PropertyType.TIMESTAMP)); @@ -178,7 +178,7 @@ public MetaCacheImplTest() { "utf-8".getBytes(), "utf-8".getBytes(), new ColumnTypeDef( - PropertyType.FIXED_STRING, (short)20)); + PropertyType.FIXED_STRING, (short)20, null)); this.spaceItem = spaceItem; this.spaceItem.properties = spaceDesc; diff --git a/client/src/test/resources/docker-compose-casigned.yaml b/client/src/test/resources/docker-compose-casigned.yaml index 3351d068c..bfdd1b96d 100644 --- a/client/src/test/resources/docker-compose-casigned.yaml +++ b/client/src/test/resources/docker-compose-casigned.yaml @@ -1,15 +1,15 @@ version: '3.4' services: - metad0: + metad-casigned: image: vesoft/nebula-metad:nightly environment: USER: root TZ: "${TZ}" command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --local_ip=172.28.1.1 - - --ws_ip=172.28.1.1 - - --port=9559 + - --meta_server_addrs=172.29.1.1:8559 + - --local_ip=172.29.1.1 + - --ws_ip=172.29.1.1 + - --port=8559 - --data_path=/data/meta - --log_dir=/logs - --v=0 @@ -17,175 +17,41 @@ services: - --heartbeat_interval_secs=2 - --expired_time_factor=2 - --ws_h2_port=11000 - - --ca_path=/share/resources/test.ca.pem - --cert_path=/share/resources/test.derive.crt - --key_path=/share/resources/test.derive.key + - --password_path=/share/resources/test.ca.password - --enable_ssl=true - - --ca_signed=true healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.1.1:11000/status"] + test: ["CMD", "curl", "-f", "http://172.29.1.1:11000/status"] interval: 30s timeout: 10s retries: 3 start_period: 20s ports: - - "9559:9559" + - "8559:8559" - 11000 - 11002 volumes: - - ./data/meta0:/data/meta:Z - - ./logs/meta0:/logs:Z + - ./data/meta:/data/meta:Z + - ./logs/meta:/logs:Z - ./ssl:/share/resources:Z networks: - nebula-net: - ipv4_address: 172.28.1.1 + nebula-net-casigned: + ipv4_address: 172.29.1.1 restart: on-failure cap_add: - SYS_PTRACE - metad1: - image: vesoft/nebula-metad:nightly - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --local_ip=172.28.1.2 - - --ws_ip=172.28.1.2 - - --port=9559 - - --data_path=/data/meta - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - - --heartbeat_interval_secs=2 - - --expired_time_factor=2 - - --ws_h2_port=11000 - - --ca_path=/share/resources/test.ca.pem - - --cert_path=/share/resources/test.derive.crt - - --key_path=/share/resources/test.derive.key - - --enable_ssl=true - - --ca_signed=true - healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.1.2:11000/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - "9560:9559" - - 11000 - - 11002 - volumes: - - ./data/meta1:/data/meta:Z - - ./logs/meta1:/logs:Z - - ./ssl:/share/resources:Z - networks: - nebula-net: - ipv4_address: 172.28.1.2 - restart: on-failure - cap_add: - - SYS_PTRACE - - metad2: - image: vesoft/nebula-metad:nightly - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --local_ip=172.28.1.3 - - --ws_ip=172.28.1.3 - - --port=9559 - - --data_path=/data/meta - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - - --heartbeat_interval_secs=2 - - --expired_time_factor=2 - - --ws_h2_port=11000 - - --ca_path=/share/resources/test.ca.pem - - --cert_path=/share/resources/test.derive.crt - - --key_path=/share/resources/test.derive.key - - --enable_ssl=true - - --ca_signed=true - healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.1.3:11000/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - "9561:9559" - - 11000 - - 11002 - volumes: - - ./data/meta2:/data/meta:Z - - ./logs/meta2:/logs:Z - - ./ssl:/share/resources:Z - networks: - nebula-net: - ipv4_address: 172.28.1.3 - restart: on-failure - cap_add: - - SYS_PTRACE - - storaged0: - image: vesoft/nebula-storaged:nightly - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --local_ip=172.28.2.1 - - --ws_ip=172.28.2.1 - - --port=9779 - - --data_path=/data/storage - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - - --heartbeat_interval_secs=2 - - --timezone_name=+08:00:00 - - --ws_h2_port=12000 - - --ca_path=/share/resources/test.ca.pem - - --cert_path=/share/resources/test.derive.crt - - --key_path=/share/resources/test.derive.key - - --enable_ssl=true - - --ca_signed=true - depends_on: - - metad0 - - metad1 - - metad2 - healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.2.1:12000/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - "9779:9779" - - 12000 - - 12002 - volumes: - - ./data/storage0:/data/storage:Z - - ./logs/storage0:/logs:Z - - ./ssl:/share/resources:Z - networks: - nebula-net: - ipv4_address: 172.28.2.1 - restart: on-failure - cap_add: - - SYS_PTRACE - - storaged1: + storaged-casigned: image: vesoft/nebula-storaged:nightly environment: USER: root TZ: "${TZ}" command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --local_ip=172.28.2.2 - - --ws_ip=172.28.2.2 - - --port=9779 + - --meta_server_addrs=172.29.1.1:8559 + - --local_ip=172.29.2.1 + - --ws_ip=172.29.2.1 + - --port=8779 - --data_path=/data/storage - --log_dir=/logs - --v=0 @@ -193,218 +59,77 @@ services: - --heartbeat_interval_secs=2 - --timezone_name=+08:00:00 - --ws_h2_port=12000 - - --ca_path=/share/resources/test.ca.pem - --cert_path=/share/resources/test.derive.crt - --key_path=/share/resources/test.derive.key + - --password_path=/share/resources/test.ca.password - --enable_ssl=true - - --ca_signed=true depends_on: - - metad0 - - metad1 - - metad2 + - metad-casigned healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.2.2:12000/status"] + test: ["CMD", "curl", "-f", "http://172.29.2.1:12000/status"] interval: 30s timeout: 10s retries: 3 start_period: 20s ports: - - "9780:9779" + - "8779:8779" - 12000 - 12002 volumes: - - ./data/storage1:/data/storage:Z - - ./logs/storage1:/logs:Z + - ./data/storage:/data/storage:Z + - ./logs/storage:/logs:Z - ./ssl:/share/resources:Z networks: - nebula-net: - ipv4_address: 172.28.2.2 - restart: on-failure - cap_add: - - SYS_PTRACE - - storaged2: - image: vesoft/nebula-storaged:nightly - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --local_ip=172.28.2.3 - - --ws_ip=172.28.2.3 - - --port=9779 - - --data_path=/data/storage - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - - --heartbeat_interval_secs=2 - - --timezone_name=+08:00:00 - - --ws_h2_port=12000 - - --ca_path=/share/resources/test.ca.pem - - --cert_path=/share/resources/test.derive.crt - - --key_path=/share/resources/test.derive.key - - --enable_ssl=true - - --ca_signed=true - depends_on: - - metad0 - - metad1 - - metad2 - healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.2.3:12000/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - "9781:9779" - - 12000 - - 12002 - volumes: - - ./data/storage2:/data/storage:Z - - ./logs/storage2:/logs:Z - - ./ssl:/share/resources:Z - networks: - nebula-net: - ipv4_address: 172.28.2.3 - restart: on-failure - cap_add: - - SYS_PTRACE - - graphd0: - image: vesoft/nebula-graphd:nightly - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --port=9669 - - --ws_ip=172.28.3.1 - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - - --heartbeat_interval_secs=2 - - --timezone_name=+08:00:00 - - --ws_h2_port=13000 - - --ca_path=/share/resources/test.ca.pem - - --cert_path=/share/resources/test.derive.crt - - --key_path=/share/resources/test.derive.key - - --enable_ssl=true - - --ca_signed=true - depends_on: - - metad0 - - metad1 - - metad2 - healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.3.1:13000/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - "9669:9669" - - 13000 - - 13002 - volumes: - - ./logs/graph0:/logs:Z - - ./ssl:/share/resources:Z - networks: - nebula-net: - ipv4_address: 172.28.3.1 - restart: on-failure - cap_add: - - SYS_PTRACE - - graphd1: - image: vesoft/nebula-graphd:nightly - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --port=9669 - - --ws_ip=172.28.3.2 - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - - --heartbeat_interval_secs=2 - - --timezone_name=+08:00:00 - - --ws_h2_port=13000 - - --ca_path=/share/resources/test.ca.pem - - --cert_path=/share/resources/test.derive.crt - - --key_path=/share/resources/test.derive.key - - --enable_ssl=true - - --ca_signed=true - - ./ssl:/share/resources:Z - depends_on: - - metad0 - - metad1 - - metad2 - healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.3.2:13000/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - "9670:9669" - - 13000 - - 13002 - volumes: - - ./logs/graph1:/logs:Z - networks: - nebula-net: - ipv4_address: 172.28.3.2 + nebula-net-casigned: + ipv4_address: 172.29.2.1 restart: on-failure cap_add: - SYS_PTRACE - graphd2: + graphd-casigned: image: vesoft/nebula-graphd:nightly environment: USER: root TZ: "${TZ}" command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --port=9669 - - --ws_ip=172.28.3.3 + - --meta_server_addrs=172.29.1.1:8559 + - --port=8669 + - --ws_ip=172.29.3.1 - --log_dir=/logs - --v=0 - --minloglevel=0 - --heartbeat_interval_secs=2 - --timezone_name=+08:00:00 - --ws_h2_port=13000 - - --ca_path=/share/resources/test.ca.pem - --cert_path=/share/resources/test.derive.crt - --key_path=/share/resources/test.derive.key + - --password_path=/share/resources/test.ca.password - --enable_ssl=true - - --ca_signed=true depends_on: - - metad0 - - metad1 - - metad2 + - metad-casigned healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.3.3:13000/status"] + test: ["CMD", "curl", "-f", "http://172.29.3.1:13000/status"] interval: 30s timeout: 10s retries: 3 start_period: 20s ports: - - "9671:9669" + - "8669:8669" - 13000 - 13002 volumes: - - ./logs/graph2:/logs:Z + - ./logs/graph:/logs:Z - ./ssl:/share/resources:Z networks: - nebula-net: - ipv4_address: 172.28.3.3 + nebula-net-casigned: + ipv4_address: 172.29.3.1 restart: on-failure cap_add: - SYS_PTRACE networks: - nebula-net: + nebula-net-casigned: ipam: driver: default config: - - subnet: 172.28.0.0/16 + - subnet: 172.29.0.0/16 diff --git a/client/src/test/resources/docker-compose-selfsigned.yaml b/client/src/test/resources/docker-compose-selfsigned.yaml index 346336d00..aeac1a60a 100644 --- a/client/src/test/resources/docker-compose-selfsigned.yaml +++ b/client/src/test/resources/docker-compose-selfsigned.yaml @@ -1,15 +1,15 @@ version: '3.4' services: - metad0: + metad-selfsigned: image: vesoft/nebula-metad:nightly environment: USER: root TZ: "${TZ}" command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --local_ip=172.28.1.1 - - --ws_ip=172.28.1.1 - - --port=9559 + - --meta_server_addrs=172.29.1.1:8559 + - --local_ip=172.29.1.1 + - --ws_ip=172.29.1.1 + - --port=8559 - --data_path=/data/meta - --log_dir=/logs - --v=0 @@ -21,171 +21,37 @@ services: - --key_path=/share/resources/test.derive.key - --password_path=/share/resources/test.ca.password - --enable_ssl=true - - --ca_signed=false healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.1.1:11000/status"] + test: ["CMD", "curl", "-f", "http://172.29.1.1:11000/status"] interval: 30s timeout: 10s retries: 3 start_period: 20s ports: - - "9559:9559" + - "8559:8559" - 11000 - 11002 volumes: - - ./data/meta0:/data/meta:Z - - ./logs/meta0:/logs:Z + - ./data/meta:/data/meta:Z + - ./logs/meta:/logs:Z - ./ssl:/share/resources:Z networks: - nebula-net: - ipv4_address: 172.28.1.1 + nebula-net-selfsigned: + ipv4_address: 172.29.1.1 restart: on-failure cap_add: - SYS_PTRACE - metad1: - image: vesoft/nebula-metad:nightly - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --local_ip=172.28.1.2 - - --ws_ip=172.28.1.2 - - --port=9559 - - --data_path=/data/meta - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - - --heartbeat_interval_secs=2 - - --expired_time_factor=2 - - --ws_h2_port=11000 - - --cert_path=/share/resources/test.derive.crt - - --key_path=/share/resources/test.derive.key - - --password_path=/share/resources/test.ca.password - - --enable_ssl=true - - --ca_signed=false - healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.1.2:11000/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - "9560:9559" - - 11000 - - 11002 - volumes: - - ./data/meta1:/data/meta:Z - - ./logs/meta1:/logs:Z - - ./ssl:/share/resources:Z - networks: - nebula-net: - ipv4_address: 172.28.1.2 - restart: on-failure - cap_add: - - SYS_PTRACE - - metad2: - image: vesoft/nebula-metad:nightly - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --local_ip=172.28.1.3 - - --ws_ip=172.28.1.3 - - --port=9559 - - --data_path=/data/meta - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - - --heartbeat_interval_secs=2 - - --expired_time_factor=2 - - --ws_h2_port=11000 - - --cert_path=/share/resources/test.derive.crt - - --key_path=/share/resources/test.derive.key - - --password_path=/share/resources/test.ca.password - - --enable_ssl=true - - --ca_signed=false - healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.1.3:11000/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - "9561:9559" - - 11000 - - 11002 - volumes: - - ./data/meta2:/data/meta:Z - - ./logs/meta2:/logs:Z - - ./ssl:/share/resources:Z - networks: - nebula-net: - ipv4_address: 172.28.1.3 - restart: on-failure - cap_add: - - SYS_PTRACE - - storaged0: - image: vesoft/nebula-storaged:nightly - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --local_ip=172.28.2.1 - - --ws_ip=172.28.2.1 - - --port=9779 - - --data_path=/data/storage - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - - --heartbeat_interval_secs=2 - - --timezone_name=+08:00:00 - - --ws_h2_port=12000 - - --cert_path=/share/resources/test.derive.crt - - --key_path=/share/resources/test.derive.key - - --password_path=/share/resources/test.ca.password - - --enable_ssl=true - - --ca_signed=false - depends_on: - - metad0 - - metad1 - - metad2 - healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.2.1:12000/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - "9779:9779" - - 12000 - - 12002 - volumes: - - ./data/storage0:/data/storage:Z - - ./logs/storage0:/logs:Z - - ./ssl:/share/resources:Z - networks: - nebula-net: - ipv4_address: 172.28.2.1 - restart: on-failure - cap_add: - - SYS_PTRACE - - storaged1: + storaged-selfsigned: image: vesoft/nebula-storaged:nightly environment: USER: root TZ: "${TZ}" command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --local_ip=172.28.2.2 - - --ws_ip=172.28.2.2 - - --port=9779 + - --meta_server_addrs=172.29.1.1:8559 + - --local_ip=172.29.2.1 + - --ws_ip=172.29.2.1 + - --port=8779 - --data_path=/data/storage - --log_dir=/logs - --v=0 @@ -197,176 +63,38 @@ services: - --key_path=/share/resources/test.derive.key - --password_path=/share/resources/test.ca.password - --enable_ssl=true - - --ca_signed=false depends_on: - - metad0 - - metad1 - - metad2 + - metad-selfsigned healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.2.2:12000/status"] + test: ["CMD", "curl", "-f", "http://172.29.2.1:12000/status"] interval: 30s timeout: 10s retries: 3 start_period: 20s ports: - - "9780:9779" + - "8779:8779" - 12000 - 12002 volumes: - - ./data/storage1:/data/storage:Z - - ./logs/storage1:/logs:Z - - ./ssl:/share/resources:Z - networks: - nebula-net: - ipv4_address: 172.28.2.2 - restart: on-failure - cap_add: - - SYS_PTRACE - - storaged2: - image: vesoft/nebula-storaged:nightly - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --local_ip=172.28.2.3 - - --ws_ip=172.28.2.3 - - --port=9779 - - --data_path=/data/storage - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - - --heartbeat_interval_secs=2 - - --timezone_name=+08:00:00 - - --ws_h2_port=12000 - - --cert_path=/share/resources/test.derive.crt - - --key_path=/share/resources/test.derive.key - - --password_path=/share/resources/test.ca.password - - --enable_ssl=true - - --ca_signed=false - depends_on: - - metad0 - - metad1 - - metad2 - healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.2.3:12000/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - "9781:9779" - - 12000 - - 12002 - volumes: - - ./data/storage2:/data/storage:Z - - ./logs/storage2:/logs:Z - - ./ssl:/share/resources:Z - networks: - nebula-net: - ipv4_address: 172.28.2.3 - restart: on-failure - cap_add: - - SYS_PTRACE - - graphd0: - image: vesoft/nebula-graphd:nightly - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --port=9669 - - --ws_ip=172.28.3.1 - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - - --heartbeat_interval_secs=2 - - --timezone_name=+08:00:00 - - --ws_h2_port=13000 - - --cert_path=/share/resources/test.derive.crt - - --key_path=/share/resources/test.derive.key - - --password_path=/share/resources/test.ca.password - - --enable_ssl=true - - --ca_signed=false - depends_on: - - metad0 - - metad1 - - metad2 - healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.3.1:13000/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - "9669:9669" - - 13000 - - 13002 - volumes: - - ./logs/graph0:/logs:Z - - ./ssl:/share/resources:Z - networks: - nebula-net: - ipv4_address: 172.28.3.1 - restart: on-failure - cap_add: - - SYS_PTRACE - - graphd1: - image: vesoft/nebula-graphd:nightly - environment: - USER: root - TZ: "${TZ}" - command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --port=9669 - - --ws_ip=172.28.3.2 - - --log_dir=/logs - - --v=0 - - --minloglevel=0 - - --heartbeat_interval_secs=2 - - --timezone_name=+08:00:00 - - --ws_h2_port=13000 - - --cert_path=/share/resources/test.derive.crt - - --key_path=/share/resources/test.derive.key - - --password_path=/share/resources/test.ca.password - - --enable_ssl=true - - --ca_signed=false - depends_on: - - metad0 - - metad1 - - metad2 - healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.3.2:13000/status"] - interval: 30s - timeout: 10s - retries: 3 - start_period: 20s - ports: - - "9670:9669" - - 13000 - - 13002 - volumes: - - ./logs/graph1:/logs:Z + - ./data/storage:/data/storage:Z + - ./logs/storage:/logs:Z - ./ssl:/share/resources:Z networks: - nebula-net: - ipv4_address: 172.28.3.2 + nebula-net-selfsigned: + ipv4_address: 172.29.2.1 restart: on-failure cap_add: - SYS_PTRACE - graphd2: + graphd-selfsigned: image: vesoft/nebula-graphd:nightly environment: USER: root TZ: "${TZ}" command: - - --meta_server_addrs=172.28.1.1:9559,172.28.1.2:9559,172.28.1.3:9559 - - --port=9669 - - --ws_ip=172.28.3.3 + - --meta_server_addrs=172.29.1.1:8559 + - --port=8669 + - --ws_ip=172.29.3.1 - --log_dir=/logs - --v=0 - --minloglevel=0 @@ -377,34 +105,31 @@ services: - --key_path=/share/resources/test.derive.key - --password_path=/share/resources/test.ca.password - --enable_ssl=true - - --ca_signed=false depends_on: - - metad0 - - metad1 - - metad2 + - metad-selfsigned healthcheck: - test: ["CMD", "curl", "-f", "http://172.28.3.3:13000/status"] + test: ["CMD", "curl", "-f", "http://172.29.3.1:13000/status"] interval: 30s timeout: 10s retries: 3 start_period: 20s ports: - - "9671:9669" + - "8669:8669" - 13000 - 13002 volumes: - - ./logs/graph2:/logs:Z + - ./logs/graph:/logs:Z - ./ssl:/share/resources:Z networks: - nebula-net: - ipv4_address: 172.28.3.3 + nebula-net-selfsigned: + ipv4_address: 172.29.3.1 restart: on-failure cap_add: - SYS_PTRACE networks: - nebula-net: + nebula-net-selfsigned: ipam: driver: default config: - - subnet: 172.28.0.0/16 + - subnet: 172.29.0.0/16 diff --git a/client/src/test/resources/ssl/selfsigned.key b/client/src/test/resources/ssl/selfsigned.key index 533ac941e..6006d0f27 100644 --- a/client/src/test/resources/ssl/selfsigned.key +++ b/client/src/test/resources/ssl/selfsigned.key @@ -27,4 +27,4 @@ zI3YMMd2G8hApt/QFlm4Ry8CqaJUmDcjDNIJT3M+RldUgfz37NsX05cA5e9+I1AL 2406F/v5U9gWsYx7HuwJtQrDzYYDbl1GD4H+qHFJE5JYhPP4AyWYxJ1NR5dqyvrt +3r5+xlwZrS76c10RsBWL7th8ZEzRxOZxbtLwbf4bG/tIGfQP2sTnWwA+qym6b2S sRduqOTP+xwnhOq/ZKn8lfsDfhT8CPnKHBsd09kM9y/UWuxFe0upLydRLE/Wsb9s ------END RSA PRIVATE KEY----- \ No newline at end of file +-----END RSA PRIVATE KEY----- diff --git a/client/src/test/resources/ssl/selfsigned.password b/client/src/test/resources/ssl/selfsigned.password index 60b7570cd..143be9ab9 100644 --- a/client/src/test/resources/ssl/selfsigned.password +++ b/client/src/test/resources/ssl/selfsigned.password @@ -1 +1 @@ -vesoft \ No newline at end of file +vesoft diff --git a/client/src/test/resources/ssl/selfsigned.pem b/client/src/test/resources/ssl/selfsigned.pem index 0815f63d6..412ba3161 100644 --- a/client/src/test/resources/ssl/selfsigned.pem +++ b/client/src/test/resources/ssl/selfsigned.pem @@ -21,4 +21,4 @@ IxBY5yggx3/lGi8tAgvUdarhd7mQO67UJ0V4YU3hAkbnZ8grHHXj+4hfgUpY4ok6 yaed6HXwknBb9W8N1jZI8ginhkhjaeRCHdMiF+fBvNCtmeR1bCml1Uz7ailrpcaT Mf84+5VYuFEnaRZYWFNsWNCOBlJ/6/b3V10vMXzMmYHqz3xgAq0M3fVTFTzopnAX DLSzorL/dYVdqEDCQi5XI9YAlgWN4VeGzJI+glkLOCNzHxRNP6Qev+YI+7Uxz6I= ------END CERTIFICATE----- \ No newline at end of file +-----END CERTIFICATE----- diff --git a/client/src/test/resources/ssl/test.ca.password b/client/src/test/resources/ssl/test.ca.password index 60b7570cd..143be9ab9 100644 --- a/client/src/test/resources/ssl/test.ca.password +++ b/client/src/test/resources/ssl/test.ca.password @@ -1 +1 @@ -vesoft \ No newline at end of file +vesoft diff --git a/examples/src/main/java/com/vesoft/nebula/examples/GraphClientExample.java b/examples/src/main/java/com/vesoft/nebula/examples/GraphClientExample.java index 012cfefd3..f9e0c1ce7 100644 --- a/examples/src/main/java/com/vesoft/nebula/examples/GraphClientExample.java +++ b/examples/src/main/java/com/vesoft/nebula/examples/GraphClientExample.java @@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.vesoft.nebula.ErrorCode; import com.vesoft.nebula.client.graph.NebulaPoolConfig; import com.vesoft.nebula.client.graph.data.CASignedSSLParam; import com.vesoft.nebula.client.graph.data.HostAddress; @@ -158,19 +159,21 @@ public static void main(String[] args) { } { - NebulaPool sslPool = new NebulaPool(); NebulaPoolConfig nebulaSslPoolConfig = new NebulaPoolConfig(); nebulaSslPoolConfig.setMaxConnSize(100); + nebulaSslPoolConfig.setEnableSsl(true); nebulaSslPoolConfig.setSslParam(new CASignedSSLParam( "examples/src/main/resources/ssl/casigned.pem", "examples/src/main/resources/ssl/casigned.crt", "examples/src/main/resources/ssl/casigned.key")); - sslPool.init(addresses, nebulaSslPoolConfig); + NebulaPool sslPool = new NebulaPool(); + sslPool.init(Arrays.asList(new HostAddress("192.168.8.123", 9669)), + nebulaSslPoolConfig); String queryForJson = "YIELD 1"; Session sslSession = sslPool.getSession("root", "nebula", false); String resp = sslSession.executeJson(queryForJson); JSONObject errors = JSON.parseObject(resp).getJSONArray("errors").getJSONObject(0); - if (errors.getInteger("code") != 0) { + if (errors.getInteger("code") != ErrorCode.SUCCEEDED.getValue()) { log.error(String.format("Execute: `%s', failed: %s", queryForJson, errors.getString("message"))); System.exit(1); @@ -179,19 +182,21 @@ public static void main(String[] args) { } { - NebulaPool sslPool = new NebulaPool(); NebulaPoolConfig nebulaSslPoolConfig = new NebulaPoolConfig(); nebulaSslPoolConfig.setMaxConnSize(100); + nebulaSslPoolConfig.setEnableSsl(true); nebulaSslPoolConfig.setSslParam(new SelfSignedSSLParam( "examples/src/main/resources/ssl/selfsigned.pem", "examples/src/main/resources/ssl/selfsigned.key", "vesoft")); - sslPool.init(addresses, nebulaSslPoolConfig); + NebulaPool sslPool = new NebulaPool(); + sslPool.init(Arrays.asList(new HostAddress("192.168.8.123", 9669)), + nebulaSslPoolConfig); String queryForJson = "YIELD 1"; Session sslSession = sslPool.getSession("root", "nebula", false); String resp = sslSession.executeJson(queryForJson); JSONObject errors = JSON.parseObject(resp).getJSONArray("errors").getJSONObject(0); - if (errors.getInteger("code") != 0) { + if (errors.getInteger("code") != ErrorCode.SUCCEEDED.getValue()) { log.error(String.format("Execute: `%s', failed: %s", queryForJson, errors.getString("message"))); System.exit(1); From 53d320304b37b53003a53ed9d3c3ece7a7f6a43f Mon Sep 17 00:00:00 2001 From: Klay Date: Tue, 12 Oct 2021 11:58:26 -0700 Subject: [PATCH 4/6] move read.close to finally --- .../client/graph/net/SyncConnection.java | 1 + .../java/com/vesoft/nebula/util/SslUtil.java | 62 ++++++++++++++----- 2 files changed, 48 insertions(+), 15 deletions(-) diff --git a/client/src/main/java/com/vesoft/nebula/client/graph/net/SyncConnection.java b/client/src/main/java/com/vesoft/nebula/client/graph/net/SyncConnection.java index ed4c3b3ae..4e6a77161 100644 --- a/client/src/main/java/com/vesoft/nebula/client/graph/net/SyncConnection.java +++ b/client/src/main/java/com/vesoft/nebula/client/graph/net/SyncConnection.java @@ -188,6 +188,7 @@ public boolean ping() { execute(0, "YIELD 1;"); return true; } catch (IOErrorException e) { + e.printStackTrace(); return false; } } diff --git a/client/src/main/java/com/vesoft/nebula/util/SslUtil.java b/client/src/main/java/com/vesoft/nebula/util/SslUtil.java index 30e6d1cd4..e75087e10 100644 --- a/client/src/main/java/com/vesoft/nebula/util/SslUtil.java +++ b/client/src/main/java/com/vesoft/nebula/util/SslUtil.java @@ -43,9 +43,16 @@ public static SSLSocketFactory getSSLSocketFactoryWithCA(CASignedSSLParam param) Security.addProvider(new BouncyCastleProvider()); // Load client private key - PEMParser reader = new PEMParser(new FileReader(keyFile)); - Object keyObject = reader.readObject(); - reader.close(); + PEMParser reader = null; + Object keyObject; + try { + reader = new PEMParser(new FileReader(keyFile)); + keyObject = reader.readObject(); + } finally { + if (reader != null) { + reader.close(); + } + } PEMDecryptorProvider provider = new JcePEMDecryptorProviderBuilder().build(password.toCharArray()); @@ -61,9 +68,15 @@ public static SSLSocketFactory getSSLSocketFactoryWithCA(CASignedSSLParam param) } // Load Certificate Authority (CA) certificate - reader = new PEMParser(new FileReader(caCrtFile)); - X509CertificateHolder caCertHolder = (X509CertificateHolder) reader.readObject(); - reader.close(); + X509CertificateHolder caCertHolder; + try { + reader = new PEMParser(new FileReader(caCrtFile)); + caCertHolder = (X509CertificateHolder) reader.readObject(); + } finally { + if (reader != null) { + reader.close(); + } + } // CA certificate is used to authenticate server JcaX509CertificateConverter certificateConverter = @@ -78,9 +91,15 @@ public static SSLSocketFactory getSSLSocketFactoryWithCA(CASignedSSLParam param) trustManagerFactory.init(caKeyStore); // Load client certificate - reader = new PEMParser(new FileReader(crtFile)); - X509CertificateHolder certHolder = (X509CertificateHolder) reader.readObject(); - reader.close(); + X509CertificateHolder certHolder; + try { + reader = new PEMParser(new FileReader(crtFile)); + certHolder = (X509CertificateHolder) reader.readObject(); + } finally { + if (reader != null) { + reader.close(); + } + } // Client key and certificates are sent to server so it can authenticate the client KeyStore clientKeyStore = KeyStore.getInstance(KeyStore.getDefaultType()); @@ -118,9 +137,16 @@ public static SSLSocketFactory getSSLSocketFactoryWithoutCA(SelfSignedSSLParam p Security.addProvider(new BouncyCastleProvider()); // Load client private key - PEMParser reader = new PEMParser(new FileReader(keyFile)); - Object keyObject = reader.readObject(); - reader.close(); + PEMParser reader = null; + Object keyObject; + try { + reader = new PEMParser(new FileReader(keyFile)); + keyObject = reader.readObject(); + } finally { + if (reader != null) { + reader.close(); + } + } PEMDecryptorProvider provider = new JcePEMDecryptorProviderBuilder().build(password.toCharArray()); @@ -140,9 +166,15 @@ public static SSLSocketFactory getSSLSocketFactoryWithoutCA(SelfSignedSSLParam p new JcaX509CertificateConverter().setProvider("BC"); // Load client certificate - reader = new PEMParser(new FileReader(crtFile)); - X509CertificateHolder certHolder = (X509CertificateHolder) reader.readObject(); - reader.close(); + X509CertificateHolder certHolder; + try { + reader = new PEMParser(new FileReader(crtFile)); + certHolder = (X509CertificateHolder) reader.readObject(); + } finally { + if (reader != null) { + reader.close(); + } + } X509Certificate cert = certificateConverter.getCertificate(certHolder); // certificate is used to authenticate server From 83ae4d334e769f2e21cb019c9e74e5a6d5a15553 Mon Sep 17 00:00:00 2001 From: Klay Date: Tue, 12 Oct 2021 12:04:58 -0700 Subject: [PATCH 5/6] Revert thirft generated code, will open a seperate pr --- .../com/vesoft/nebula/Constants.java | 23 - .../com/vesoft/nebula/ErrorCode.java | 5 - .../com/vesoft/nebula/Geography.java | 265 ---- .../generated/com/vesoft/nebula/Value.java | 42 - .../com/vesoft/nebula/graph/GraphService.java | 570 +------- .../nebula/graph/VerifyClientVersionReq.java | 275 ---- .../nebula/graph/VerifyClientVersionResp.java | 389 ----- .../com/vesoft/nebula/meta/ColumnTypeDef.java | 114 +- .../com/vesoft/nebula/meta/GeoShape.java | 52 - .../com/vesoft/nebula/meta/MetaService.java | 1250 +++++------------ .../com/vesoft/nebula/meta/PropertyType.java | 5 +- .../nebula/meta/VerifyClientVersionReq.java | 275 ---- .../nebula/meta/VerifyClientVersionResp.java | 474 ------- .../nebula/storage/ChainAddEdgesRequest.java | 705 ---------- .../storage/ChainUpdateEdgeRequest.java | 595 -------- .../nebula/storage/GeneralStorageService.java | 24 +- .../nebula/storage/GetValueRequest.java | 439 ++++++ .../nebula/storage/GetValueResponse.java | 365 +++++ .../nebula/storage/GraphStorageService.java | 724 ++-------- .../storage/InternalStorageService.java | 363 +++-- .../nebula/storage/InternalTxnRequest.java | 545 ++++--- .../vesoft/nebula/storage/RequestCommon.java | 95 +- .../nebula/storage/StorageAdminService.java | 128 +- .../nebula/encoder/MetaCacheImplTest.java | 4 +- 24 files changed, 1862 insertions(+), 5864 deletions(-) delete mode 100644 client/src/main/generated/com/vesoft/nebula/Constants.java delete mode 100644 client/src/main/generated/com/vesoft/nebula/Geography.java delete mode 100644 client/src/main/generated/com/vesoft/nebula/graph/VerifyClientVersionReq.java delete mode 100644 client/src/main/generated/com/vesoft/nebula/graph/VerifyClientVersionResp.java delete mode 100644 client/src/main/generated/com/vesoft/nebula/meta/GeoShape.java delete mode 100644 client/src/main/generated/com/vesoft/nebula/meta/VerifyClientVersionReq.java delete mode 100644 client/src/main/generated/com/vesoft/nebula/meta/VerifyClientVersionResp.java delete mode 100644 client/src/main/generated/com/vesoft/nebula/storage/ChainAddEdgesRequest.java delete mode 100644 client/src/main/generated/com/vesoft/nebula/storage/ChainUpdateEdgeRequest.java create mode 100644 client/src/main/generated/com/vesoft/nebula/storage/GetValueRequest.java create mode 100644 client/src/main/generated/com/vesoft/nebula/storage/GetValueResponse.java diff --git a/client/src/main/generated/com/vesoft/nebula/Constants.java b/client/src/main/generated/com/vesoft/nebula/Constants.java deleted file mode 100644 index b83205264..000000000 --- a/client/src/main/generated/com/vesoft/nebula/Constants.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.vesoft.nebula; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import java.util.BitSet; -import java.util.Arrays; -@SuppressWarnings({ "unused" }) -public class Constants { - - public static final byte[] version = "2.6.0".getBytes(); - -} diff --git a/client/src/main/generated/com/vesoft/nebula/ErrorCode.java b/client/src/main/generated/com/vesoft/nebula/ErrorCode.java index c31b591bd..b8ccc0b8f 100644 --- a/client/src/main/generated/com/vesoft/nebula/ErrorCode.java +++ b/client/src/main/generated/com/vesoft/nebula/ErrorCode.java @@ -128,11 +128,6 @@ public enum ErrorCode implements com.facebook.thrift.TEnum { E_USER_CANCEL(-3052), E_TASK_EXECUTION_FAILED(-3053), E_PLAN_IS_KILLED(-3060), - E_NO_TERM(-3070), - E_OUTDATED_TERM(-3071), - E_OUTDATED_EDGE(-3072), - E_WRITE_WRITE_CONFLICT(-3073), - E_CLIENT_SERVER_INCOMPATIBLE(-3061), E_UNKNOWN(-8000); private static final Map INDEXED_VALUES = new HashMap(); diff --git a/client/src/main/generated/com/vesoft/nebula/Geography.java b/client/src/main/generated/com/vesoft/nebula/Geography.java deleted file mode 100644 index 1dbe57187..000000000 --- a/client/src/main/generated/com/vesoft/nebula/Geography.java +++ /dev/null @@ -1,265 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.vesoft.nebula; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import java.util.BitSet; -import java.util.Arrays; -import com.facebook.thrift.*; -import com.facebook.thrift.annotations.*; -import com.facebook.thrift.async.*; -import com.facebook.thrift.meta_data.*; -import com.facebook.thrift.server.*; -import com.facebook.thrift.transport.*; -import com.facebook.thrift.protocol.*; - -@SuppressWarnings({ "unused", "serial" }) -public class Geography implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("Geography"); - private static final TField WKB_FIELD_DESC = new TField("wkb", TType.STRING, (short)1); - - public String wkb; - public static final int WKB = 1; - - // isset id assignments - - public static final Map metaDataMap; - - static { - Map tmpMetaDataMap = new HashMap(); - tmpMetaDataMap.put(WKB, new FieldMetaData("wkb", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); - } - - static { - FieldMetaData.addStructMetaDataMap(Geography.class, metaDataMap); - } - - public Geography() { - } - - public Geography( - String wkb) { - this(); - this.wkb = wkb; - } - - public static class Builder { - private String wkb; - - public Builder() { - } - - public Builder setWkb(final String wkb) { - this.wkb = wkb; - return this; - } - - public Geography build() { - Geography result = new Geography(); - result.setWkb(this.wkb); - return result; - } - } - - public static Builder builder() { - return new Builder(); - } - - /** - * Performs a deep copy on other. - */ - public Geography(Geography other) { - if (other.isSetWkb()) { - this.wkb = TBaseHelper.deepCopy(other.wkb); - } - } - - public Geography deepCopy() { - return new Geography(this); - } - - public String getWkb() { - return this.wkb; - } - - public Geography setWkb(String wkb) { - this.wkb = wkb; - return this; - } - - public void unsetWkb() { - this.wkb = null; - } - - // Returns true if field wkb is set (has been assigned a value) and false otherwise - public boolean isSetWkb() { - return this.wkb != null; - } - - public void setWkbIsSet(boolean __value) { - if (!__value) { - this.wkb = null; - } - } - - public void setFieldValue(int fieldID, Object __value) { - switch (fieldID) { - case WKB: - if (__value == null) { - unsetWkb(); - } else { - setWkb((String)__value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case WKB: - return getWkb(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object _that) { - if (_that == null) - return false; - if (this == _that) - return true; - if (!(_that instanceof Geography)) - return false; - Geography that = (Geography)_that; - - if (!TBaseHelper.equalsNobinary(this.isSetWkb(), that.isSetWkb(), this.wkb, that.wkb)) { return false; } - - return true; - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(new Object[] {wkb}); - } - - @Override - public int compareTo(Geography other) { - if (other == null) { - // See java.lang.Comparable docs - throw new NullPointerException(); - } - - if (other == this) { - return 0; - } - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetWkb()).compareTo(other.isSetWkb()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(wkb, other.wkb); - if (lastComparison != 0) { - return lastComparison; - } - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField __field; - iprot.readStructBegin(metaDataMap); - while (true) - { - __field = iprot.readFieldBegin(); - if (__field.type == TType.STOP) { - break; - } - switch (__field.id) - { - case WKB: - if (__field.type == TType.STRING) { - this.wkb = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - default: - TProtocolUtil.skip(iprot, __field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.wkb != null) { - oprot.writeFieldBegin(WKB_FIELD_DESC); - oprot.writeString(this.wkb); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - return toString(1, true); - } - - @Override - public String toString(int indent, boolean prettyPrint) { - String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; - String newLine = prettyPrint ? "\n" : ""; - String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("Geography"); - sb.append(space); - sb.append("("); - sb.append(newLine); - boolean first = true; - - sb.append(indentStr); - sb.append("wkb"); - sb.append(space); - sb.append(":").append(space); - if (this.getWkb() == null) { - sb.append("null"); - } else { - sb.append(TBaseHelper.toString(this.getWkb(), indent + 1, prettyPrint)); - } - first = false; - sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - } - -} - diff --git a/client/src/main/generated/com/vesoft/nebula/Value.java b/client/src/main/generated/com/vesoft/nebula/Value.java index 628946385..36d4ea691 100644 --- a/client/src/main/generated/com/vesoft/nebula/Value.java +++ b/client/src/main/generated/com/vesoft/nebula/Value.java @@ -41,7 +41,6 @@ public class Value extends TUnion { private static final TField M_VAL_FIELD_DESC = new TField("mVal", TType.STRUCT, (short)13); private static final TField U_VAL_FIELD_DESC = new TField("uVal", TType.STRUCT, (short)14); private static final TField G_VAL_FIELD_DESC = new TField("gVal", TType.STRUCT, (short)15); - private static final TField GG_VAL_FIELD_DESC = new TField("ggVal", TType.STRUCT, (short)16); public static final int NVAL = 1; public static final int BVAL = 2; @@ -58,7 +57,6 @@ public class Value extends TUnion { public static final int MVAL = 13; public static final int UVAL = 14; public static final int GVAL = 15; - public static final int GGVAL = 16; public static final Map metaDataMap; @@ -94,8 +92,6 @@ public class Value extends TUnion { new StructMetaData(TType.STRUCT, NSet.class))); tmpMetaDataMap.put(GVAL, new FieldMetaData("gVal", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, DataSet.class))); - tmpMetaDataMap.put(GGVAL, new FieldMetaData("ggVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Geography.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -205,12 +201,6 @@ public static Value gVal(DataSet __value) { return x; } - public static Value ggVal(Geography __value) { - Value x = new Value(); - x.setGgVal(__value); - return x; - } - @Override protected void checkType(short setField, Object __value) throws ClassCastException { @@ -290,11 +280,6 @@ protected void checkType(short setField, Object __value) throws ClassCastExcepti break; } throw new ClassCastException("Was expecting value of type DataSet for field 'gVal', but got " + __value.getClass().getSimpleName()); - case GGVAL: - if (__value instanceof Geography) { - break; - } - throw new ClassCastException("Was expecting value of type Geography for field 'ggVal', but got " + __value.getClass().getSimpleName()); default: throw new IllegalArgumentException("Unknown field id " + setField); } @@ -387,11 +372,6 @@ public void read(TProtocol iprot) throws TException { setField_ = __field.id; } break; - case GGVAL: - if (__field.type == GG_VAL_FIELD_DESC.type) { - setField_ = __field.id; - } - break; } } iprot.readFieldEnd(); @@ -521,14 +501,6 @@ protected Object readValue(TProtocol iprot, TField __field) throws TException { return gVal; } break; - case GGVAL: - if (__field.type == GG_VAL_FIELD_DESC.type) { - Geography ggVal; - ggVal = new Geography(); - ggVal.read(iprot); - return ggVal; - } - break; } TProtocolUtil.skip(iprot, __field.type); return null; @@ -597,10 +569,6 @@ protected void writeValue(TProtocol oprot, short setField, Object __value) throw DataSet gVal = (DataSet)getFieldValue(); gVal.write(oprot); return; - case GGVAL: - Geography ggVal = (Geography)getFieldValue(); - ggVal.write(oprot); - return; default: throw new IllegalStateException("Cannot write union with unknown field " + setField); } @@ -639,8 +607,6 @@ protected TField getFieldDesc(int setField) { return U_VAL_FIELD_DESC; case GVAL: return G_VAL_FIELD_DESC; - case GGVAL: - return GG_VAL_FIELD_DESC; default: throw new IllegalArgumentException("Unknown field id " + setField); } @@ -799,14 +765,6 @@ public void setGVal(DataSet __value) { __setValue(GVAL, __value); } - public Geography getGgVal() { - return (Geography) __getValue(GGVAL); - } - - public void setGgVal(Geography __value) { - __setValue(GGVAL, __value); - } - public boolean equals(Object other) { if (other instanceof Value) { return equals((Value)other); diff --git a/client/src/main/generated/com/vesoft/nebula/graph/GraphService.java b/client/src/main/generated/com/vesoft/nebula/graph/GraphService.java index 4083c3390..9db127bf8 100644 --- a/client/src/main/generated/com/vesoft/nebula/graph/GraphService.java +++ b/client/src/main/generated/com/vesoft/nebula/graph/GraphService.java @@ -39,8 +39,6 @@ public interface Iface { public byte[] executeJson(long sessionId, byte[] stmt) throws TException; - public VerifyClientVersionResp verifyClientVersion(VerifyClientVersionReq req) throws TException; - } public interface AsyncIface { @@ -53,8 +51,6 @@ public interface AsyncIface { public void executeJson(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler) throws TException; - public void verifyClientVersion(VerifyClientVersionReq req, AsyncMethodCallback resultHandler) throws TException; - } public static class Client extends EventHandlerBase implements Iface, TClientIf { @@ -245,51 +241,6 @@ public byte[] recv_executeJson() throws TException throw new TApplicationException(TApplicationException.MISSING_RESULT, "executeJson failed: unknown result"); } - public VerifyClientVersionResp verifyClientVersion(VerifyClientVersionReq req) throws TException - { - ContextStack ctx = getContextStack("GraphService.verifyClientVersion", null); - this.setContextStack(ctx); - send_verifyClientVersion(req); - return recv_verifyClientVersion(); - } - - public void send_verifyClientVersion(VerifyClientVersionReq req) throws TException - { - ContextStack ctx = this.getContextStack(); - super.preWrite(ctx, "GraphService.verifyClientVersion", null); - oprot_.writeMessageBegin(new TMessage("verifyClientVersion", TMessageType.CALL, seqid_)); - verifyClientVersion_args args = new verifyClientVersion_args(); - args.req = req; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - super.postWrite(ctx, "GraphService.verifyClientVersion", args); - return; - } - - public VerifyClientVersionResp recv_verifyClientVersion() throws TException - { - ContextStack ctx = super.getContextStack(); - long bytes; - TMessageType mtype; - super.preRead(ctx, "GraphService.verifyClientVersion"); - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - verifyClientVersion_result result = new verifyClientVersion_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - super.postRead(ctx, "GraphService.verifyClientVersion", result); - - if (result.isSetSuccess()) { - return result.success; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "verifyClientVersion failed: unknown result"); - } - } public static class AsyncClient extends TAsyncClient implements AsyncIface { public static class Factory implements TAsyncClientFactory { @@ -308,9 +259,9 @@ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientM super(protocolFactory, clientManager, transport); } - public void authenticate(byte[] username, byte[] password, AsyncMethodCallback resultHandler34) throws TException { + public void authenticate(byte[] username, byte[] password, AsyncMethodCallback resultHandler33) throws TException { checkReady(); - authenticate_call method_call = new authenticate_call(username, password, resultHandler34, this, ___protocolFactory, ___transport); + authenticate_call method_call = new authenticate_call(username, password, resultHandler33, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } @@ -318,8 +269,8 @@ public void authenticate(byte[] username, byte[] password, AsyncMethodCallback r public static class authenticate_call extends TAsyncMethodCall { private byte[] username; private byte[] password; - public authenticate_call(byte[] username, byte[] password, AsyncMethodCallback resultHandler35, TAsyncClient client31, TProtocolFactory protocolFactory32, TNonblockingTransport transport33) throws TException { - super(client31, protocolFactory32, transport33, resultHandler35, false); + public authenticate_call(byte[] username, byte[] password, AsyncMethodCallback resultHandler34, TAsyncClient client30, TProtocolFactory protocolFactory31, TNonblockingTransport transport32) throws TException { + super(client30, protocolFactory31, transport32, resultHandler34, false); this.username = username; this.password = password; } @@ -343,17 +294,17 @@ public AuthResponse getResult() throws TException { } } - public void signout(long sessionId, AsyncMethodCallback resultHandler39) throws TException { + public void signout(long sessionId, AsyncMethodCallback resultHandler38) throws TException { checkReady(); - signout_call method_call = new signout_call(sessionId, resultHandler39, this, ___protocolFactory, ___transport); + signout_call method_call = new signout_call(sessionId, resultHandler38, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class signout_call extends TAsyncMethodCall { private long sessionId; - public signout_call(long sessionId, AsyncMethodCallback resultHandler40, TAsyncClient client36, TProtocolFactory protocolFactory37, TNonblockingTransport transport38) throws TException { - super(client36, protocolFactory37, transport38, resultHandler40, true); + public signout_call(long sessionId, AsyncMethodCallback resultHandler39, TAsyncClient client35, TProtocolFactory protocolFactory36, TNonblockingTransport transport37) throws TException { + super(client35, protocolFactory36, transport37, resultHandler39, true); this.sessionId = sessionId; } @@ -374,9 +325,9 @@ public void getResult() throws TException { } } - public void execute(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler44) throws TException { + public void execute(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler43) throws TException { checkReady(); - execute_call method_call = new execute_call(sessionId, stmt, resultHandler44, this, ___protocolFactory, ___transport); + execute_call method_call = new execute_call(sessionId, stmt, resultHandler43, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } @@ -384,8 +335,8 @@ public void execute(long sessionId, byte[] stmt, AsyncMethodCallback resultHandl public static class execute_call extends TAsyncMethodCall { private long sessionId; private byte[] stmt; - public execute_call(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler45, TAsyncClient client41, TProtocolFactory protocolFactory42, TNonblockingTransport transport43) throws TException { - super(client41, protocolFactory42, transport43, resultHandler45, false); + public execute_call(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler44, TAsyncClient client40, TProtocolFactory protocolFactory41, TNonblockingTransport transport42) throws TException { + super(client40, protocolFactory41, transport42, resultHandler44, false); this.sessionId = sessionId; this.stmt = stmt; } @@ -409,9 +360,9 @@ public ExecutionResponse getResult() throws TException { } } - public void executeJson(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler49) throws TException { + public void executeJson(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler48) throws TException { checkReady(); - executeJson_call method_call = new executeJson_call(sessionId, stmt, resultHandler49, this, ___protocolFactory, ___transport); + executeJson_call method_call = new executeJson_call(sessionId, stmt, resultHandler48, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } @@ -419,8 +370,8 @@ public void executeJson(long sessionId, byte[] stmt, AsyncMethodCallback resultH public static class executeJson_call extends TAsyncMethodCall { private long sessionId; private byte[] stmt; - public executeJson_call(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler50, TAsyncClient client46, TProtocolFactory protocolFactory47, TNonblockingTransport transport48) throws TException { - super(client46, protocolFactory47, transport48, resultHandler50, false); + public executeJson_call(long sessionId, byte[] stmt, AsyncMethodCallback resultHandler49, TAsyncClient client45, TProtocolFactory protocolFactory46, TNonblockingTransport transport47) throws TException { + super(client45, protocolFactory46, transport47, resultHandler49, false); this.sessionId = sessionId; this.stmt = stmt; } @@ -444,38 +395,6 @@ public byte[] getResult() throws TException { } } - public void verifyClientVersion(VerifyClientVersionReq req, AsyncMethodCallback resultHandler54) throws TException { - checkReady(); - verifyClientVersion_call method_call = new verifyClientVersion_call(req, resultHandler54, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class verifyClientVersion_call extends TAsyncMethodCall { - private VerifyClientVersionReq req; - public verifyClientVersion_call(VerifyClientVersionReq req, AsyncMethodCallback resultHandler55, TAsyncClient client51, TProtocolFactory protocolFactory52, TNonblockingTransport transport53) throws TException { - super(client51, protocolFactory52, transport53, resultHandler55, false); - this.req = req; - } - - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("verifyClientVersion", TMessageType.CALL, 0)); - verifyClientVersion_args args = new verifyClientVersion_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - public VerifyClientVersionResp getResult() throws TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_verifyClientVersion(); - } - } - } public static class Processor implements TProcessor { @@ -488,7 +407,6 @@ public Processor(Iface iface) processMap_.put("signout", new signout()); processMap_.put("execute", new execute()); processMap_.put("executeJson", new executeJson()); - processMap_.put("verifyClientVersion", new verifyClientVersion()); } protected static interface ProcessFunction { @@ -598,27 +516,6 @@ public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionCont } - private class verifyClientVersion implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException - { - Object handler_ctx = event_handler_.getContext("GraphService.verifyClientVersion", server_ctx); - verifyClientVersion_args args = new verifyClientVersion_args(); - event_handler_.preRead(handler_ctx, "GraphService.verifyClientVersion"); - args.read(iprot); - iprot.readMessageEnd(); - event_handler_.postRead(handler_ctx, "GraphService.verifyClientVersion", args); - verifyClientVersion_result result = new verifyClientVersion_result(); - result.success = iface_.verifyClientVersion(args.req); - event_handler_.preWrite(handler_ctx, "GraphService.verifyClientVersion", result); - oprot.writeMessageBegin(new TMessage("verifyClientVersion", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - event_handler_.postWrite(handler_ctx, "GraphService.verifyClientVersion", result); - } - - } - } public static class authenticate_args implements TBase, java.io.Serializable, Cloneable, Comparable { @@ -2366,439 +2263,4 @@ public void validate() throws TException { } - public static class verifyClientVersion_args implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("verifyClientVersion_args"); - private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1); - - public VerifyClientVersionReq req; - public static final int REQ = 1; - - // isset id assignments - - public static final Map metaDataMap; - - static { - Map tmpMetaDataMap = new HashMap(); - tmpMetaDataMap.put(REQ, new FieldMetaData("req", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, VerifyClientVersionReq.class))); - metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); - } - - static { - FieldMetaData.addStructMetaDataMap(verifyClientVersion_args.class, metaDataMap); - } - - public verifyClientVersion_args() { - } - - public verifyClientVersion_args( - VerifyClientVersionReq req) { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public verifyClientVersion_args(verifyClientVersion_args other) { - if (other.isSetReq()) { - this.req = TBaseHelper.deepCopy(other.req); - } - } - - public verifyClientVersion_args deepCopy() { - return new verifyClientVersion_args(this); - } - - public VerifyClientVersionReq getReq() { - return this.req; - } - - public verifyClientVersion_args setReq(VerifyClientVersionReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - // Returns true if field req is set (has been assigned a value) and false otherwise - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean __value) { - if (!__value) { - this.req = null; - } - } - - public void setFieldValue(int fieldID, Object __value) { - switch (fieldID) { - case REQ: - if (__value == null) { - unsetReq(); - } else { - setReq((VerifyClientVersionReq)__value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case REQ: - return getReq(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object _that) { - if (_that == null) - return false; - if (this == _that) - return true; - if (!(_that instanceof verifyClientVersion_args)) - return false; - verifyClientVersion_args that = (verifyClientVersion_args)_that; - - if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; } - - return true; - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(new Object[] {req}); - } - - @Override - public int compareTo(verifyClientVersion_args other) { - if (other == null) { - // See java.lang.Comparable docs - throw new NullPointerException(); - } - - if (other == this) { - return 0; - } - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField __field; - iprot.readStructBegin(metaDataMap); - while (true) - { - __field = iprot.readFieldBegin(); - if (__field.type == TType.STOP) { - break; - } - switch (__field.id) - { - case REQ: - if (__field.type == TType.STRUCT) { - this.req = new VerifyClientVersionReq(); - this.req.read(iprot); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - default: - TProtocolUtil.skip(iprot, __field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - this.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - return toString(1, true); - } - - @Override - public String toString(int indent, boolean prettyPrint) { - String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; - String newLine = prettyPrint ? "\n" : ""; - String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("verifyClientVersion_args"); - sb.append(space); - sb.append("("); - sb.append(newLine); - boolean first = true; - - sb.append(indentStr); - sb.append("req"); - sb.append(space); - sb.append(":").append(space); - if (this.getReq() == null) { - sb.append("null"); - } else { - sb.append(TBaseHelper.toString(this.getReq(), indent + 1, prettyPrint)); - } - first = false; - sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - } - - } - - public static class verifyClientVersion_result implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("verifyClientVersion_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - - public VerifyClientVersionResp success; - public static final int SUCCESS = 0; - - // isset id assignments - - public static final Map metaDataMap; - - static { - Map tmpMetaDataMap = new HashMap(); - tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, VerifyClientVersionResp.class))); - metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); - } - - static { - FieldMetaData.addStructMetaDataMap(verifyClientVersion_result.class, metaDataMap); - } - - public verifyClientVersion_result() { - } - - public verifyClientVersion_result( - VerifyClientVersionResp success) { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public verifyClientVersion_result(verifyClientVersion_result other) { - if (other.isSetSuccess()) { - this.success = TBaseHelper.deepCopy(other.success); - } - } - - public verifyClientVersion_result deepCopy() { - return new verifyClientVersion_result(this); - } - - public VerifyClientVersionResp getSuccess() { - return this.success; - } - - public verifyClientVersion_result setSuccess(VerifyClientVersionResp 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 void setFieldValue(int fieldID, Object __value) { - switch (fieldID) { - case SUCCESS: - if (__value == null) { - unsetSuccess(); - } else { - setSuccess((VerifyClientVersionResp)__value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object _that) { - if (_that == null) - return false; - if (this == _that) - return true; - if (!(_that instanceof verifyClientVersion_result)) - return false; - verifyClientVersion_result that = (verifyClientVersion_result)_that; - - if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; } - - return true; - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(new Object[] {success}); - } - - @Override - public int compareTo(verifyClientVersion_result other) { - if (other == null) { - // See java.lang.Comparable docs - throw new NullPointerException(); - } - - if (other == this) { - return 0; - } - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField __field; - iprot.readStructBegin(metaDataMap); - while (true) - { - __field = iprot.readFieldBegin(); - if (__field.type == TType.STOP) { - break; - } - switch (__field.id) - { - case SUCCESS: - if (__field.type == TType.STRUCT) { - this.success = new VerifyClientVersionResp(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - default: - TProtocolUtil.skip(iprot, __field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - return toString(1, true); - } - - @Override - public String toString(int indent, boolean prettyPrint) { - String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; - String newLine = prettyPrint ? "\n" : ""; - String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("verifyClientVersion_result"); - sb.append(space); - sb.append("("); - sb.append(newLine); - boolean first = true; - - sb.append(indentStr); - sb.append("success"); - sb.append(space); - sb.append(":").append(space); - if (this.getSuccess() == null) { - sb.append("null"); - } else { - sb.append(TBaseHelper.toString(this.getSuccess(), indent + 1, prettyPrint)); - } - first = false; - sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - } - - } - } diff --git a/client/src/main/generated/com/vesoft/nebula/graph/VerifyClientVersionReq.java b/client/src/main/generated/com/vesoft/nebula/graph/VerifyClientVersionReq.java deleted file mode 100644 index 077897126..000000000 --- a/client/src/main/generated/com/vesoft/nebula/graph/VerifyClientVersionReq.java +++ /dev/null @@ -1,275 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.vesoft.nebula.graph; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import java.util.BitSet; -import java.util.Arrays; -import com.facebook.thrift.*; -import com.facebook.thrift.annotations.*; -import com.facebook.thrift.async.*; -import com.facebook.thrift.meta_data.*; -import com.facebook.thrift.server.*; -import com.facebook.thrift.transport.*; -import com.facebook.thrift.protocol.*; - -@SuppressWarnings({ "unused", "serial" }) -public class VerifyClientVersionReq implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("VerifyClientVersionReq"); - private static final TField VERSION_FIELD_DESC = new TField("version", TType.STRING, (short)1); - - public byte[] version; - public static final int VERSION = 1; - - // isset id assignments - - public static final Map metaDataMap; - - static { - Map tmpMetaDataMap = new HashMap(); - tmpMetaDataMap.put(VERSION, new FieldMetaData("version", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); - } - - static { - FieldMetaData.addStructMetaDataMap(VerifyClientVersionReq.class, metaDataMap); - } - - public VerifyClientVersionReq() { - this.version = "2.6.0".getBytes(); - - } - - public VerifyClientVersionReq( - byte[] version) { - this(); - this.version = version; - } - - public static class Builder { - private byte[] version; - - public Builder() { - } - - public Builder setVersion(final byte[] version) { - this.version = version; - return this; - } - - public VerifyClientVersionReq build() { - VerifyClientVersionReq result = new VerifyClientVersionReq(); - result.setVersion(this.version); - return result; - } - } - - public static Builder builder() { - return new Builder(); - } - - /** - * Performs a deep copy on other. - */ - public VerifyClientVersionReq(VerifyClientVersionReq other) { - if (other.isSetVersion()) { - this.version = TBaseHelper.deepCopy(other.version); - } - } - - public VerifyClientVersionReq deepCopy() { - return new VerifyClientVersionReq(this); - } - - public byte[] getVersion() { - return this.version; - } - - public VerifyClientVersionReq setVersion(byte[] 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(int fieldID, Object __value) { - switch (fieldID) { - case VERSION: - if (__value == null) { - unsetVersion(); - } else { - setVersion((byte[])__value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case VERSION: - return getVersion(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object _that) { - if (_that == null) - return false; - if (this == _that) - return true; - if (!(_that instanceof VerifyClientVersionReq)) - return false; - VerifyClientVersionReq that = (VerifyClientVersionReq)_that; - - if (!TBaseHelper.equalsSlow(this.isSetVersion(), that.isSetVersion(), this.version, that.version)) { return false; } - - return true; - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(new Object[] {version}); - } - - @Override - public int compareTo(VerifyClientVersionReq other) { - if (other == null) { - // See java.lang.Comparable docs - throw new NullPointerException(); - } - - if (other == this) { - return 0; - } - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(version, other.version); - if (lastComparison != 0) { - return lastComparison; - } - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField __field; - iprot.readStructBegin(metaDataMap); - while (true) - { - __field = iprot.readFieldBegin(); - if (__field.type == TType.STOP) { - break; - } - switch (__field.id) - { - case VERSION: - if (__field.type == TType.STRING) { - this.version = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - default: - TProtocolUtil.skip(iprot, __field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.version != null) { - oprot.writeFieldBegin(VERSION_FIELD_DESC); - oprot.writeBinary(this.version); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - return toString(1, true); - } - - @Override - public String toString(int indent, boolean prettyPrint) { - String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; - String newLine = prettyPrint ? "\n" : ""; - String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("VerifyClientVersionReq"); - sb.append(space); - sb.append("("); - sb.append(newLine); - boolean first = true; - - sb.append(indentStr); - sb.append("version"); - sb.append(space); - sb.append(":").append(space); - if (this.getVersion() == null) { - sb.append("null"); - } else { - int __version_size = Math.min(this.getVersion().length, 128); - for (int i = 0; i < __version_size; i++) { - if (i != 0) sb.append(" "); - sb.append(Integer.toHexString(this.getVersion()[i]).length() > 1 ? Integer.toHexString(this.getVersion()[i]).substring(Integer.toHexString(this.getVersion()[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.getVersion()[i]).toUpperCase()); - } - if (this.getVersion().length > 128) sb.append(" ..."); - } - first = false; - sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - if (version == null) { - throw new TProtocolException(TProtocolException.MISSING_REQUIRED_FIELD, "Required field 'version' was not present! Struct: " + toString()); - } - } - -} - diff --git a/client/src/main/generated/com/vesoft/nebula/graph/VerifyClientVersionResp.java b/client/src/main/generated/com/vesoft/nebula/graph/VerifyClientVersionResp.java deleted file mode 100644 index ae4c21a62..000000000 --- a/client/src/main/generated/com/vesoft/nebula/graph/VerifyClientVersionResp.java +++ /dev/null @@ -1,389 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.vesoft.nebula.graph; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import java.util.BitSet; -import java.util.Arrays; -import com.facebook.thrift.*; -import com.facebook.thrift.annotations.*; -import com.facebook.thrift.async.*; -import com.facebook.thrift.meta_data.*; -import com.facebook.thrift.server.*; -import com.facebook.thrift.transport.*; -import com.facebook.thrift.protocol.*; - -@SuppressWarnings({ "unused", "serial" }) -public class VerifyClientVersionResp implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("VerifyClientVersionResp"); - private static final TField ERROR_CODE_FIELD_DESC = new TField("error_code", TType.I32, (short)1); - private static final TField ERROR_MSG_FIELD_DESC = new TField("error_msg", TType.STRING, (short)2); - - /** - * - * @see com.vesoft.nebula.ErrorCode - */ - public com.vesoft.nebula.ErrorCode error_code; - public byte[] error_msg; - public static final int ERROR_CODE = 1; - public static final int ERROR_MSG = 2; - - // isset id assignments - - public static final Map metaDataMap; - - static { - Map tmpMetaDataMap = new HashMap(); - tmpMetaDataMap.put(ERROR_CODE, new FieldMetaData("error_code", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.I32))); - tmpMetaDataMap.put(ERROR_MSG, new FieldMetaData("error_msg", TFieldRequirementType.OPTIONAL, - new FieldValueMetaData(TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); - } - - static { - FieldMetaData.addStructMetaDataMap(VerifyClientVersionResp.class, metaDataMap); - } - - public VerifyClientVersionResp() { - } - - public VerifyClientVersionResp( - com.vesoft.nebula.ErrorCode error_code) { - this(); - this.error_code = error_code; - } - - public VerifyClientVersionResp( - com.vesoft.nebula.ErrorCode error_code, - byte[] error_msg) { - this(); - this.error_code = error_code; - this.error_msg = error_msg; - } - - public static class Builder { - private com.vesoft.nebula.ErrorCode error_code; - private byte[] error_msg; - - public Builder() { - } - - public Builder setError_code(final com.vesoft.nebula.ErrorCode error_code) { - this.error_code = error_code; - return this; - } - - public Builder setError_msg(final byte[] error_msg) { - this.error_msg = error_msg; - return this; - } - - public VerifyClientVersionResp build() { - VerifyClientVersionResp result = new VerifyClientVersionResp(); - result.setError_code(this.error_code); - result.setError_msg(this.error_msg); - return result; - } - } - - public static Builder builder() { - return new Builder(); - } - - /** - * Performs a deep copy on other. - */ - public VerifyClientVersionResp(VerifyClientVersionResp other) { - if (other.isSetError_code()) { - this.error_code = TBaseHelper.deepCopy(other.error_code); - } - if (other.isSetError_msg()) { - this.error_msg = TBaseHelper.deepCopy(other.error_msg); - } - } - - public VerifyClientVersionResp deepCopy() { - return new VerifyClientVersionResp(this); - } - - /** - * - * @see com.vesoft.nebula.ErrorCode - */ - public com.vesoft.nebula.ErrorCode getError_code() { - return this.error_code; - } - - /** - * - * @see com.vesoft.nebula.ErrorCode - */ - public VerifyClientVersionResp setError_code(com.vesoft.nebula.ErrorCode error_code) { - this.error_code = error_code; - return this; - } - - public void unsetError_code() { - this.error_code = null; - } - - // Returns true if field error_code is set (has been assigned a value) and false otherwise - public boolean isSetError_code() { - return this.error_code != null; - } - - public void setError_codeIsSet(boolean __value) { - if (!__value) { - this.error_code = null; - } - } - - public byte[] getError_msg() { - return this.error_msg; - } - - public VerifyClientVersionResp setError_msg(byte[] error_msg) { - this.error_msg = error_msg; - return this; - } - - public void unsetError_msg() { - this.error_msg = null; - } - - // Returns true if field error_msg is set (has been assigned a value) and false otherwise - public boolean isSetError_msg() { - return this.error_msg != null; - } - - public void setError_msgIsSet(boolean __value) { - if (!__value) { - this.error_msg = null; - } - } - - public void setFieldValue(int fieldID, Object __value) { - switch (fieldID) { - case ERROR_CODE: - if (__value == null) { - unsetError_code(); - } else { - setError_code((com.vesoft.nebula.ErrorCode)__value); - } - break; - - case ERROR_MSG: - if (__value == null) { - unsetError_msg(); - } else { - setError_msg((byte[])__value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case ERROR_CODE: - return getError_code(); - - case ERROR_MSG: - return getError_msg(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object _that) { - if (_that == null) - return false; - if (this == _that) - return true; - if (!(_that instanceof VerifyClientVersionResp)) - return false; - VerifyClientVersionResp that = (VerifyClientVersionResp)_that; - - if (!TBaseHelper.equalsNobinary(this.isSetError_code(), that.isSetError_code(), this.error_code, that.error_code)) { return false; } - - if (!TBaseHelper.equalsSlow(this.isSetError_msg(), that.isSetError_msg(), this.error_msg, that.error_msg)) { return false; } - - return true; - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(new Object[] {error_code, error_msg}); - } - - @Override - public int compareTo(VerifyClientVersionResp other) { - if (other == null) { - // See java.lang.Comparable docs - throw new NullPointerException(); - } - - if (other == this) { - return 0; - } - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetError_code()).compareTo(other.isSetError_code()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(error_code, other.error_code); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = Boolean.valueOf(isSetError_msg()).compareTo(other.isSetError_msg()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(error_msg, other.error_msg); - if (lastComparison != 0) { - return lastComparison; - } - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField __field; - iprot.readStructBegin(metaDataMap); - while (true) - { - __field = iprot.readFieldBegin(); - if (__field.type == TType.STOP) { - break; - } - switch (__field.id) - { - case ERROR_CODE: - if (__field.type == TType.I32) { - this.error_code = com.vesoft.nebula.ErrorCode.findByValue(iprot.readI32()); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - case ERROR_MSG: - if (__field.type == TType.STRING) { - this.error_msg = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - default: - TProtocolUtil.skip(iprot, __field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.error_code != null) { - oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC); - oprot.writeI32(this.error_code == null ? 0 : this.error_code.getValue()); - oprot.writeFieldEnd(); - } - if (this.error_msg != null) { - if (isSetError_msg()) { - oprot.writeFieldBegin(ERROR_MSG_FIELD_DESC); - oprot.writeBinary(this.error_msg); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - return toString(1, true); - } - - @Override - public String toString(int indent, boolean prettyPrint) { - String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; - String newLine = prettyPrint ? "\n" : ""; - String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("VerifyClientVersionResp"); - sb.append(space); - sb.append("("); - sb.append(newLine); - boolean first = true; - - sb.append(indentStr); - sb.append("error_code"); - sb.append(space); - sb.append(":").append(space); - if (this.getError_code() == null) { - sb.append("null"); - } else { - String error_code_name = this.getError_code() == null ? "null" : this.getError_code().name(); - if (error_code_name != null) { - sb.append(error_code_name); - sb.append(" ("); - } - sb.append(this.getError_code()); - if (error_code_name != null) { - sb.append(")"); - } - } - first = false; - if (isSetError_msg()) - { - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("error_msg"); - sb.append(space); - sb.append(":").append(space); - if (this.getError_msg() == null) { - sb.append("null"); - } else { - int __error_msg_size = Math.min(this.getError_msg().length, 128); - for (int i = 0; i < __error_msg_size; i++) { - if (i != 0) sb.append(" "); - sb.append(Integer.toHexString(this.getError_msg()[i]).length() > 1 ? Integer.toHexString(this.getError_msg()[i]).substring(Integer.toHexString(this.getError_msg()[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.getError_msg()[i]).toUpperCase()); - } - if (this.getError_msg().length > 128) sb.append(" ..."); - } - first = false; - } - sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - if (error_code == null) { - throw new TProtocolException(TProtocolException.MISSING_REQUIRED_FIELD, "Required field 'error_code' was not present! Struct: " + toString()); - } - } - -} - diff --git a/client/src/main/generated/com/vesoft/nebula/meta/ColumnTypeDef.java b/client/src/main/generated/com/vesoft/nebula/meta/ColumnTypeDef.java index 48b144908..e8a990f60 100644 --- a/client/src/main/generated/com/vesoft/nebula/meta/ColumnTypeDef.java +++ b/client/src/main/generated/com/vesoft/nebula/meta/ColumnTypeDef.java @@ -28,7 +28,6 @@ public class ColumnTypeDef implements TBase, java.io.Serializable, Cloneable, Co private static final TStruct STRUCT_DESC = new TStruct("ColumnTypeDef"); private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)1); private static final TField TYPE_LENGTH_FIELD_DESC = new TField("type_length", TType.I16, (short)2); - private static final TField GEO_SHAPE_FIELD_DESC = new TField("geo_shape", TType.I32, (short)3); /** * @@ -36,14 +35,8 @@ public class ColumnTypeDef implements TBase, java.io.Serializable, Cloneable, Co */ public PropertyType type; public short type_length; - /** - * - * @see GeoShape - */ - public GeoShape geo_shape; public static final int TYPE = 1; public static final int TYPE_LENGTH = 2; - public static final int GEO_SHAPE = 3; // isset id assignments private static final int __TYPE_LENGTH_ISSET_ID = 0; @@ -57,8 +50,6 @@ public class ColumnTypeDef implements TBase, java.io.Serializable, Cloneable, Co new FieldValueMetaData(TType.I32))); tmpMetaDataMap.put(TYPE_LENGTH, new FieldMetaData("type_length", TFieldRequirementType.OPTIONAL, new FieldValueMetaData(TType.I16))); - tmpMetaDataMap.put(GEO_SHAPE, new FieldMetaData("geo_shape", TFieldRequirementType.OPTIONAL, - new FieldValueMetaData(TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -79,19 +70,16 @@ public ColumnTypeDef( public ColumnTypeDef( PropertyType type, - short type_length, - GeoShape geo_shape) { + short type_length) { this(); this.type = type; this.type_length = type_length; setType_lengthIsSet(true); - this.geo_shape = geo_shape; } public static class Builder { private PropertyType type; private short type_length; - private GeoShape geo_shape; BitSet __optional_isset = new BitSet(1); @@ -109,18 +97,12 @@ public Builder setType_length(final short type_length) { return this; } - public Builder setGeo_shape(final GeoShape geo_shape) { - this.geo_shape = geo_shape; - return this; - } - public ColumnTypeDef build() { ColumnTypeDef result = new ColumnTypeDef(); result.setType(this.type); if (__optional_isset.get(__TYPE_LENGTH_ISSET_ID)) { result.setType_length(this.type_length); } - result.setGeo_shape(this.geo_shape); return result; } } @@ -139,9 +121,6 @@ public ColumnTypeDef(ColumnTypeDef other) { this.type = TBaseHelper.deepCopy(other.type); } this.type_length = TBaseHelper.deepCopy(other.type_length); - if (other.isSetGeo_shape()) { - this.geo_shape = TBaseHelper.deepCopy(other.geo_shape); - } } public ColumnTypeDef deepCopy() { @@ -203,38 +182,6 @@ public void setType_lengthIsSet(boolean __value) { __isset_bit_vector.set(__TYPE_LENGTH_ISSET_ID, __value); } - /** - * - * @see GeoShape - */ - public GeoShape getGeo_shape() { - return this.geo_shape; - } - - /** - * - * @see GeoShape - */ - public ColumnTypeDef setGeo_shape(GeoShape geo_shape) { - this.geo_shape = geo_shape; - return this; - } - - public void unsetGeo_shape() { - this.geo_shape = null; - } - - // Returns true if field geo_shape is set (has been assigned a value) and false otherwise - public boolean isSetGeo_shape() { - return this.geo_shape != null; - } - - public void setGeo_shapeIsSet(boolean __value) { - if (!__value) { - this.geo_shape = null; - } - } - public void setFieldValue(int fieldID, Object __value) { switch (fieldID) { case TYPE: @@ -253,14 +200,6 @@ public void setFieldValue(int fieldID, Object __value) { } break; - case GEO_SHAPE: - if (__value == null) { - unsetGeo_shape(); - } else { - setGeo_shape((GeoShape)__value); - } - break; - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -274,9 +213,6 @@ public Object getFieldValue(int fieldID) { case TYPE_LENGTH: return new Short(getType_length()); - case GEO_SHAPE: - return getGeo_shape(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -296,14 +232,12 @@ public boolean equals(Object _that) { if (!TBaseHelper.equalsNobinary(this.isSetType_length(), that.isSetType_length(), this.type_length, that.type_length)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetGeo_shape(), that.isSetGeo_shape(), this.geo_shape, that.geo_shape)) { return false; } - return true; } @Override public int hashCode() { - return Arrays.deepHashCode(new Object[] {type, type_length, geo_shape}); + return Arrays.deepHashCode(new Object[] {type, type_length}); } @Override @@ -334,14 +268,6 @@ public int compareTo(ColumnTypeDef other) { if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetGeo_shape()).compareTo(other.isSetGeo_shape()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(geo_shape, other.geo_shape); - if (lastComparison != 0) { - return lastComparison; - } return 0; } @@ -371,13 +297,6 @@ public void read(TProtocol iprot) throws TException { TProtocolUtil.skip(iprot, __field.type); } break; - case GEO_SHAPE: - if (__field.type == TType.I32) { - this.geo_shape = GeoShape.findByValue(iprot.readI32()); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; default: TProtocolUtil.skip(iprot, __field.type); break; @@ -405,13 +324,6 @@ public void write(TProtocol oprot) throws TException { oprot.writeI16(this.type_length); oprot.writeFieldEnd(); } - if (this.geo_shape != null) { - if (isSetGeo_shape()) { - oprot.writeFieldBegin(GEO_SHAPE_FIELD_DESC); - oprot.writeI32(this.geo_shape == null ? 0 : this.geo_shape.getValue()); - oprot.writeFieldEnd(); - } - } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -460,28 +372,6 @@ public String toString(int indent, boolean prettyPrint) { sb.append(TBaseHelper.toString(this.getType_length(), indent + 1, prettyPrint)); first = false; } - if (isSetGeo_shape()) - { - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("geo_shape"); - sb.append(space); - sb.append(":").append(space); - if (this.getGeo_shape() == null) { - sb.append("null"); - } else { - String geo_shape_name = this.getGeo_shape() == null ? "null" : this.getGeo_shape().name(); - if (geo_shape_name != null) { - sb.append(geo_shape_name); - sb.append(" ("); - } - sb.append(this.getGeo_shape()); - if (geo_shape_name != null) { - sb.append(")"); - } - } - first = false; - } sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); sb.append(")"); return sb.toString(); diff --git a/client/src/main/generated/com/vesoft/nebula/meta/GeoShape.java b/client/src/main/generated/com/vesoft/nebula/meta/GeoShape.java deleted file mode 100644 index 6110f3ec0..000000000 --- a/client/src/main/generated/com/vesoft/nebula/meta/GeoShape.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.vesoft.nebula.meta; - - -import com.facebook.thrift.IntRangeSet; -import java.util.Map; -import java.util.HashMap; - -@SuppressWarnings({ "unused" }) -public enum GeoShape implements com.facebook.thrift.TEnum { - ANY(0), - POINT(1), - LINESTRING(2), - POLYGON(3); - - private final int value; - - private GeoShape(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 GeoShape findByValue(int value) { - switch (value) { - case 0: - return ANY; - case 1: - return POINT; - case 2: - return LINESTRING; - case 3: - return POLYGON; - default: - return null; - } - } -} diff --git a/client/src/main/generated/com/vesoft/nebula/meta/MetaService.java b/client/src/main/generated/com/vesoft/nebula/meta/MetaService.java index 818acaa9e..5f5fa84ac 100644 --- a/client/src/main/generated/com/vesoft/nebula/meta/MetaService.java +++ b/client/src/main/generated/com/vesoft/nebula/meta/MetaService.java @@ -209,8 +209,6 @@ public interface Iface { public GetMetaDirInfoResp getMetaDirInfo(GetMetaDirInfoReq req) throws TException; - public VerifyClientVersionResp verifyClientVersion(VerifyClientVersionReq req) throws TException; - } public interface AsyncIface { @@ -393,8 +391,6 @@ public interface AsyncIface { public void getMetaDirInfo(GetMetaDirInfoReq req, AsyncMethodCallback resultHandler) throws TException; - public void verifyClientVersion(VerifyClientVersionReq req, AsyncMethodCallback resultHandler) throws TException; - } public static class Client extends EventHandlerBase implements Iface, TClientIf { @@ -4431,51 +4427,6 @@ public GetMetaDirInfoResp recv_getMetaDirInfo() throws TException throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMetaDirInfo failed: unknown result"); } - public VerifyClientVersionResp verifyClientVersion(VerifyClientVersionReq req) throws TException - { - ContextStack ctx = getContextStack("MetaService.verifyClientVersion", null); - this.setContextStack(ctx); - send_verifyClientVersion(req); - return recv_verifyClientVersion(); - } - - public void send_verifyClientVersion(VerifyClientVersionReq req) throws TException - { - ContextStack ctx = this.getContextStack(); - super.preWrite(ctx, "MetaService.verifyClientVersion", null); - oprot_.writeMessageBegin(new TMessage("verifyClientVersion", TMessageType.CALL, seqid_)); - verifyClientVersion_args args = new verifyClientVersion_args(); - args.req = req; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - super.postWrite(ctx, "MetaService.verifyClientVersion", args); - return; - } - - public VerifyClientVersionResp recv_verifyClientVersion() throws TException - { - ContextStack ctx = super.getContextStack(); - long bytes; - TMessageType mtype; - super.preRead(ctx, "MetaService.verifyClientVersion"); - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - verifyClientVersion_result result = new verifyClientVersion_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - super.postRead(ctx, "MetaService.verifyClientVersion", result); - - if (result.isSetSuccess()) { - return result.success; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "verifyClientVersion failed: unknown result"); - } - } public static class AsyncClient extends TAsyncClient implements AsyncIface { public static class Factory implements TAsyncClientFactory { @@ -4494,17 +4445,17 @@ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientM super(protocolFactory, clientManager, transport); } - public void createSpace(CreateSpaceReq req, AsyncMethodCallback resultHandler426) throws TException { + public void createSpace(CreateSpaceReq req, AsyncMethodCallback resultHandler425) throws TException { checkReady(); - createSpace_call method_call = new createSpace_call(req, resultHandler426, this, ___protocolFactory, ___transport); + createSpace_call method_call = new createSpace_call(req, resultHandler425, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createSpace_call extends TAsyncMethodCall { private CreateSpaceReq req; - public createSpace_call(CreateSpaceReq req, AsyncMethodCallback resultHandler427, TAsyncClient client423, TProtocolFactory protocolFactory424, TNonblockingTransport transport425) throws TException { - super(client423, protocolFactory424, transport425, resultHandler427, false); + public createSpace_call(CreateSpaceReq req, AsyncMethodCallback resultHandler426, TAsyncClient client422, TProtocolFactory protocolFactory423, TNonblockingTransport transport424) throws TException { + super(client422, protocolFactory423, transport424, resultHandler426, false); this.req = req; } @@ -4526,17 +4477,17 @@ public ExecResp getResult() throws TException { } } - public void dropSpace(DropSpaceReq req, AsyncMethodCallback resultHandler431) throws TException { + public void dropSpace(DropSpaceReq req, AsyncMethodCallback resultHandler430) throws TException { checkReady(); - dropSpace_call method_call = new dropSpace_call(req, resultHandler431, this, ___protocolFactory, ___transport); + dropSpace_call method_call = new dropSpace_call(req, resultHandler430, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropSpace_call extends TAsyncMethodCall { private DropSpaceReq req; - public dropSpace_call(DropSpaceReq req, AsyncMethodCallback resultHandler432, TAsyncClient client428, TProtocolFactory protocolFactory429, TNonblockingTransport transport430) throws TException { - super(client428, protocolFactory429, transport430, resultHandler432, false); + public dropSpace_call(DropSpaceReq req, AsyncMethodCallback resultHandler431, TAsyncClient client427, TProtocolFactory protocolFactory428, TNonblockingTransport transport429) throws TException { + super(client427, protocolFactory428, transport429, resultHandler431, false); this.req = req; } @@ -4558,17 +4509,17 @@ public ExecResp getResult() throws TException { } } - public void getSpace(GetSpaceReq req, AsyncMethodCallback resultHandler436) throws TException { + public void getSpace(GetSpaceReq req, AsyncMethodCallback resultHandler435) throws TException { checkReady(); - getSpace_call method_call = new getSpace_call(req, resultHandler436, this, ___protocolFactory, ___transport); + getSpace_call method_call = new getSpace_call(req, resultHandler435, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getSpace_call extends TAsyncMethodCall { private GetSpaceReq req; - public getSpace_call(GetSpaceReq req, AsyncMethodCallback resultHandler437, TAsyncClient client433, TProtocolFactory protocolFactory434, TNonblockingTransport transport435) throws TException { - super(client433, protocolFactory434, transport435, resultHandler437, false); + public getSpace_call(GetSpaceReq req, AsyncMethodCallback resultHandler436, TAsyncClient client432, TProtocolFactory protocolFactory433, TNonblockingTransport transport434) throws TException { + super(client432, protocolFactory433, transport434, resultHandler436, false); this.req = req; } @@ -4590,17 +4541,17 @@ public GetSpaceResp getResult() throws TException { } } - public void listSpaces(ListSpacesReq req, AsyncMethodCallback resultHandler441) throws TException { + public void listSpaces(ListSpacesReq req, AsyncMethodCallback resultHandler440) throws TException { checkReady(); - listSpaces_call method_call = new listSpaces_call(req, resultHandler441, this, ___protocolFactory, ___transport); + listSpaces_call method_call = new listSpaces_call(req, resultHandler440, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listSpaces_call extends TAsyncMethodCall { private ListSpacesReq req; - public listSpaces_call(ListSpacesReq req, AsyncMethodCallback resultHandler442, TAsyncClient client438, TProtocolFactory protocolFactory439, TNonblockingTransport transport440) throws TException { - super(client438, protocolFactory439, transport440, resultHandler442, false); + public listSpaces_call(ListSpacesReq req, AsyncMethodCallback resultHandler441, TAsyncClient client437, TProtocolFactory protocolFactory438, TNonblockingTransport transport439) throws TException { + super(client437, protocolFactory438, transport439, resultHandler441, false); this.req = req; } @@ -4622,17 +4573,17 @@ public ListSpacesResp getResult() throws TException { } } - public void createSpaceAs(CreateSpaceAsReq req, AsyncMethodCallback resultHandler446) throws TException { + public void createSpaceAs(CreateSpaceAsReq req, AsyncMethodCallback resultHandler445) throws TException { checkReady(); - createSpaceAs_call method_call = new createSpaceAs_call(req, resultHandler446, this, ___protocolFactory, ___transport); + createSpaceAs_call method_call = new createSpaceAs_call(req, resultHandler445, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createSpaceAs_call extends TAsyncMethodCall { private CreateSpaceAsReq req; - public createSpaceAs_call(CreateSpaceAsReq req, AsyncMethodCallback resultHandler447, TAsyncClient client443, TProtocolFactory protocolFactory444, TNonblockingTransport transport445) throws TException { - super(client443, protocolFactory444, transport445, resultHandler447, false); + public createSpaceAs_call(CreateSpaceAsReq req, AsyncMethodCallback resultHandler446, TAsyncClient client442, TProtocolFactory protocolFactory443, TNonblockingTransport transport444) throws TException { + super(client442, protocolFactory443, transport444, resultHandler446, false); this.req = req; } @@ -4654,17 +4605,17 @@ public ExecResp getResult() throws TException { } } - public void createTag(CreateTagReq req, AsyncMethodCallback resultHandler451) throws TException { + public void createTag(CreateTagReq req, AsyncMethodCallback resultHandler450) throws TException { checkReady(); - createTag_call method_call = new createTag_call(req, resultHandler451, this, ___protocolFactory, ___transport); + createTag_call method_call = new createTag_call(req, resultHandler450, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createTag_call extends TAsyncMethodCall { private CreateTagReq req; - public createTag_call(CreateTagReq req, AsyncMethodCallback resultHandler452, TAsyncClient client448, TProtocolFactory protocolFactory449, TNonblockingTransport transport450) throws TException { - super(client448, protocolFactory449, transport450, resultHandler452, false); + public createTag_call(CreateTagReq req, AsyncMethodCallback resultHandler451, TAsyncClient client447, TProtocolFactory protocolFactory448, TNonblockingTransport transport449) throws TException { + super(client447, protocolFactory448, transport449, resultHandler451, false); this.req = req; } @@ -4686,17 +4637,17 @@ public ExecResp getResult() throws TException { } } - public void alterTag(AlterTagReq req, AsyncMethodCallback resultHandler456) throws TException { + public void alterTag(AlterTagReq req, AsyncMethodCallback resultHandler455) throws TException { checkReady(); - alterTag_call method_call = new alterTag_call(req, resultHandler456, this, ___protocolFactory, ___transport); + alterTag_call method_call = new alterTag_call(req, resultHandler455, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class alterTag_call extends TAsyncMethodCall { private AlterTagReq req; - public alterTag_call(AlterTagReq req, AsyncMethodCallback resultHandler457, TAsyncClient client453, TProtocolFactory protocolFactory454, TNonblockingTransport transport455) throws TException { - super(client453, protocolFactory454, transport455, resultHandler457, false); + public alterTag_call(AlterTagReq req, AsyncMethodCallback resultHandler456, TAsyncClient client452, TProtocolFactory protocolFactory453, TNonblockingTransport transport454) throws TException { + super(client452, protocolFactory453, transport454, resultHandler456, false); this.req = req; } @@ -4718,17 +4669,17 @@ public ExecResp getResult() throws TException { } } - public void dropTag(DropTagReq req, AsyncMethodCallback resultHandler461) throws TException { + public void dropTag(DropTagReq req, AsyncMethodCallback resultHandler460) throws TException { checkReady(); - dropTag_call method_call = new dropTag_call(req, resultHandler461, this, ___protocolFactory, ___transport); + dropTag_call method_call = new dropTag_call(req, resultHandler460, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropTag_call extends TAsyncMethodCall { private DropTagReq req; - public dropTag_call(DropTagReq req, AsyncMethodCallback resultHandler462, TAsyncClient client458, TProtocolFactory protocolFactory459, TNonblockingTransport transport460) throws TException { - super(client458, protocolFactory459, transport460, resultHandler462, false); + public dropTag_call(DropTagReq req, AsyncMethodCallback resultHandler461, TAsyncClient client457, TProtocolFactory protocolFactory458, TNonblockingTransport transport459) throws TException { + super(client457, protocolFactory458, transport459, resultHandler461, false); this.req = req; } @@ -4750,17 +4701,17 @@ public ExecResp getResult() throws TException { } } - public void getTag(GetTagReq req, AsyncMethodCallback resultHandler466) throws TException { + public void getTag(GetTagReq req, AsyncMethodCallback resultHandler465) throws TException { checkReady(); - getTag_call method_call = new getTag_call(req, resultHandler466, this, ___protocolFactory, ___transport); + getTag_call method_call = new getTag_call(req, resultHandler465, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getTag_call extends TAsyncMethodCall { private GetTagReq req; - public getTag_call(GetTagReq req, AsyncMethodCallback resultHandler467, TAsyncClient client463, TProtocolFactory protocolFactory464, TNonblockingTransport transport465) throws TException { - super(client463, protocolFactory464, transport465, resultHandler467, false); + public getTag_call(GetTagReq req, AsyncMethodCallback resultHandler466, TAsyncClient client462, TProtocolFactory protocolFactory463, TNonblockingTransport transport464) throws TException { + super(client462, protocolFactory463, transport464, resultHandler466, false); this.req = req; } @@ -4782,17 +4733,17 @@ public GetTagResp getResult() throws TException { } } - public void listTags(ListTagsReq req, AsyncMethodCallback resultHandler471) throws TException { + public void listTags(ListTagsReq req, AsyncMethodCallback resultHandler470) throws TException { checkReady(); - listTags_call method_call = new listTags_call(req, resultHandler471, this, ___protocolFactory, ___transport); + listTags_call method_call = new listTags_call(req, resultHandler470, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listTags_call extends TAsyncMethodCall { private ListTagsReq req; - public listTags_call(ListTagsReq req, AsyncMethodCallback resultHandler472, TAsyncClient client468, TProtocolFactory protocolFactory469, TNonblockingTransport transport470) throws TException { - super(client468, protocolFactory469, transport470, resultHandler472, false); + public listTags_call(ListTagsReq req, AsyncMethodCallback resultHandler471, TAsyncClient client467, TProtocolFactory protocolFactory468, TNonblockingTransport transport469) throws TException { + super(client467, protocolFactory468, transport469, resultHandler471, false); this.req = req; } @@ -4814,17 +4765,17 @@ public ListTagsResp getResult() throws TException { } } - public void createEdge(CreateEdgeReq req, AsyncMethodCallback resultHandler476) throws TException { + public void createEdge(CreateEdgeReq req, AsyncMethodCallback resultHandler475) throws TException { checkReady(); - createEdge_call method_call = new createEdge_call(req, resultHandler476, this, ___protocolFactory, ___transport); + createEdge_call method_call = new createEdge_call(req, resultHandler475, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createEdge_call extends TAsyncMethodCall { private CreateEdgeReq req; - public createEdge_call(CreateEdgeReq req, AsyncMethodCallback resultHandler477, TAsyncClient client473, TProtocolFactory protocolFactory474, TNonblockingTransport transport475) throws TException { - super(client473, protocolFactory474, transport475, resultHandler477, false); + public createEdge_call(CreateEdgeReq req, AsyncMethodCallback resultHandler476, TAsyncClient client472, TProtocolFactory protocolFactory473, TNonblockingTransport transport474) throws TException { + super(client472, protocolFactory473, transport474, resultHandler476, false); this.req = req; } @@ -4846,17 +4797,17 @@ public ExecResp getResult() throws TException { } } - public void alterEdge(AlterEdgeReq req, AsyncMethodCallback resultHandler481) throws TException { + public void alterEdge(AlterEdgeReq req, AsyncMethodCallback resultHandler480) throws TException { checkReady(); - alterEdge_call method_call = new alterEdge_call(req, resultHandler481, this, ___protocolFactory, ___transport); + alterEdge_call method_call = new alterEdge_call(req, resultHandler480, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class alterEdge_call extends TAsyncMethodCall { private AlterEdgeReq req; - public alterEdge_call(AlterEdgeReq req, AsyncMethodCallback resultHandler482, TAsyncClient client478, TProtocolFactory protocolFactory479, TNonblockingTransport transport480) throws TException { - super(client478, protocolFactory479, transport480, resultHandler482, false); + public alterEdge_call(AlterEdgeReq req, AsyncMethodCallback resultHandler481, TAsyncClient client477, TProtocolFactory protocolFactory478, TNonblockingTransport transport479) throws TException { + super(client477, protocolFactory478, transport479, resultHandler481, false); this.req = req; } @@ -4878,17 +4829,17 @@ public ExecResp getResult() throws TException { } } - public void dropEdge(DropEdgeReq req, AsyncMethodCallback resultHandler486) throws TException { + public void dropEdge(DropEdgeReq req, AsyncMethodCallback resultHandler485) throws TException { checkReady(); - dropEdge_call method_call = new dropEdge_call(req, resultHandler486, this, ___protocolFactory, ___transport); + dropEdge_call method_call = new dropEdge_call(req, resultHandler485, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropEdge_call extends TAsyncMethodCall { private DropEdgeReq req; - public dropEdge_call(DropEdgeReq req, AsyncMethodCallback resultHandler487, TAsyncClient client483, TProtocolFactory protocolFactory484, TNonblockingTransport transport485) throws TException { - super(client483, protocolFactory484, transport485, resultHandler487, false); + public dropEdge_call(DropEdgeReq req, AsyncMethodCallback resultHandler486, TAsyncClient client482, TProtocolFactory protocolFactory483, TNonblockingTransport transport484) throws TException { + super(client482, protocolFactory483, transport484, resultHandler486, false); this.req = req; } @@ -4910,17 +4861,17 @@ public ExecResp getResult() throws TException { } } - public void getEdge(GetEdgeReq req, AsyncMethodCallback resultHandler491) throws TException { + public void getEdge(GetEdgeReq req, AsyncMethodCallback resultHandler490) throws TException { checkReady(); - getEdge_call method_call = new getEdge_call(req, resultHandler491, this, ___protocolFactory, ___transport); + getEdge_call method_call = new getEdge_call(req, resultHandler490, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getEdge_call extends TAsyncMethodCall { private GetEdgeReq req; - public getEdge_call(GetEdgeReq req, AsyncMethodCallback resultHandler492, TAsyncClient client488, TProtocolFactory protocolFactory489, TNonblockingTransport transport490) throws TException { - super(client488, protocolFactory489, transport490, resultHandler492, false); + public getEdge_call(GetEdgeReq req, AsyncMethodCallback resultHandler491, TAsyncClient client487, TProtocolFactory protocolFactory488, TNonblockingTransport transport489) throws TException { + super(client487, protocolFactory488, transport489, resultHandler491, false); this.req = req; } @@ -4942,17 +4893,17 @@ public GetEdgeResp getResult() throws TException { } } - public void listEdges(ListEdgesReq req, AsyncMethodCallback resultHandler496) throws TException { + public void listEdges(ListEdgesReq req, AsyncMethodCallback resultHandler495) throws TException { checkReady(); - listEdges_call method_call = new listEdges_call(req, resultHandler496, this, ___protocolFactory, ___transport); + listEdges_call method_call = new listEdges_call(req, resultHandler495, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listEdges_call extends TAsyncMethodCall { private ListEdgesReq req; - public listEdges_call(ListEdgesReq req, AsyncMethodCallback resultHandler497, TAsyncClient client493, TProtocolFactory protocolFactory494, TNonblockingTransport transport495) throws TException { - super(client493, protocolFactory494, transport495, resultHandler497, false); + public listEdges_call(ListEdgesReq req, AsyncMethodCallback resultHandler496, TAsyncClient client492, TProtocolFactory protocolFactory493, TNonblockingTransport transport494) throws TException { + super(client492, protocolFactory493, transport494, resultHandler496, false); this.req = req; } @@ -4974,17 +4925,17 @@ public ListEdgesResp getResult() throws TException { } } - public void listHosts(ListHostsReq req, AsyncMethodCallback resultHandler501) throws TException { + public void listHosts(ListHostsReq req, AsyncMethodCallback resultHandler500) throws TException { checkReady(); - listHosts_call method_call = new listHosts_call(req, resultHandler501, this, ___protocolFactory, ___transport); + listHosts_call method_call = new listHosts_call(req, resultHandler500, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listHosts_call extends TAsyncMethodCall { private ListHostsReq req; - public listHosts_call(ListHostsReq req, AsyncMethodCallback resultHandler502, TAsyncClient client498, TProtocolFactory protocolFactory499, TNonblockingTransport transport500) throws TException { - super(client498, protocolFactory499, transport500, resultHandler502, false); + public listHosts_call(ListHostsReq req, AsyncMethodCallback resultHandler501, TAsyncClient client497, TProtocolFactory protocolFactory498, TNonblockingTransport transport499) throws TException { + super(client497, protocolFactory498, transport499, resultHandler501, false); this.req = req; } @@ -5006,17 +4957,17 @@ public ListHostsResp getResult() throws TException { } } - public void getPartsAlloc(GetPartsAllocReq req, AsyncMethodCallback resultHandler506) throws TException { + public void getPartsAlloc(GetPartsAllocReq req, AsyncMethodCallback resultHandler505) throws TException { checkReady(); - getPartsAlloc_call method_call = new getPartsAlloc_call(req, resultHandler506, this, ___protocolFactory, ___transport); + getPartsAlloc_call method_call = new getPartsAlloc_call(req, resultHandler505, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getPartsAlloc_call extends TAsyncMethodCall { private GetPartsAllocReq req; - public getPartsAlloc_call(GetPartsAllocReq req, AsyncMethodCallback resultHandler507, TAsyncClient client503, TProtocolFactory protocolFactory504, TNonblockingTransport transport505) throws TException { - super(client503, protocolFactory504, transport505, resultHandler507, false); + public getPartsAlloc_call(GetPartsAllocReq req, AsyncMethodCallback resultHandler506, TAsyncClient client502, TProtocolFactory protocolFactory503, TNonblockingTransport transport504) throws TException { + super(client502, protocolFactory503, transport504, resultHandler506, false); this.req = req; } @@ -5038,17 +4989,17 @@ public GetPartsAllocResp getResult() throws TException { } } - public void listParts(ListPartsReq req, AsyncMethodCallback resultHandler511) throws TException { + public void listParts(ListPartsReq req, AsyncMethodCallback resultHandler510) throws TException { checkReady(); - listParts_call method_call = new listParts_call(req, resultHandler511, this, ___protocolFactory, ___transport); + listParts_call method_call = new listParts_call(req, resultHandler510, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listParts_call extends TAsyncMethodCall { private ListPartsReq req; - public listParts_call(ListPartsReq req, AsyncMethodCallback resultHandler512, TAsyncClient client508, TProtocolFactory protocolFactory509, TNonblockingTransport transport510) throws TException { - super(client508, protocolFactory509, transport510, resultHandler512, false); + public listParts_call(ListPartsReq req, AsyncMethodCallback resultHandler511, TAsyncClient client507, TProtocolFactory protocolFactory508, TNonblockingTransport transport509) throws TException { + super(client507, protocolFactory508, transport509, resultHandler511, false); this.req = req; } @@ -5070,17 +5021,17 @@ public ListPartsResp getResult() throws TException { } } - public void multiPut(MultiPutReq req, AsyncMethodCallback resultHandler516) throws TException { + public void multiPut(MultiPutReq req, AsyncMethodCallback resultHandler515) throws TException { checkReady(); - multiPut_call method_call = new multiPut_call(req, resultHandler516, this, ___protocolFactory, ___transport); + multiPut_call method_call = new multiPut_call(req, resultHandler515, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class multiPut_call extends TAsyncMethodCall { private MultiPutReq req; - public multiPut_call(MultiPutReq req, AsyncMethodCallback resultHandler517, TAsyncClient client513, TProtocolFactory protocolFactory514, TNonblockingTransport transport515) throws TException { - super(client513, protocolFactory514, transport515, resultHandler517, false); + public multiPut_call(MultiPutReq req, AsyncMethodCallback resultHandler516, TAsyncClient client512, TProtocolFactory protocolFactory513, TNonblockingTransport transport514) throws TException { + super(client512, protocolFactory513, transport514, resultHandler516, false); this.req = req; } @@ -5102,17 +5053,17 @@ public ExecResp getResult() throws TException { } } - public void get(GetReq req, AsyncMethodCallback resultHandler521) throws TException { + public void get(GetReq req, AsyncMethodCallback resultHandler520) throws TException { checkReady(); - get_call method_call = new get_call(req, resultHandler521, this, ___protocolFactory, ___transport); + get_call method_call = new get_call(req, resultHandler520, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_call extends TAsyncMethodCall { private GetReq req; - public get_call(GetReq req, AsyncMethodCallback resultHandler522, TAsyncClient client518, TProtocolFactory protocolFactory519, TNonblockingTransport transport520) throws TException { - super(client518, protocolFactory519, transport520, resultHandler522, false); + public get_call(GetReq req, AsyncMethodCallback resultHandler521, TAsyncClient client517, TProtocolFactory protocolFactory518, TNonblockingTransport transport519) throws TException { + super(client517, protocolFactory518, transport519, resultHandler521, false); this.req = req; } @@ -5134,17 +5085,17 @@ public GetResp getResult() throws TException { } } - public void multiGet(MultiGetReq req, AsyncMethodCallback resultHandler526) throws TException { + public void multiGet(MultiGetReq req, AsyncMethodCallback resultHandler525) throws TException { checkReady(); - multiGet_call method_call = new multiGet_call(req, resultHandler526, this, ___protocolFactory, ___transport); + multiGet_call method_call = new multiGet_call(req, resultHandler525, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class multiGet_call extends TAsyncMethodCall { private MultiGetReq req; - public multiGet_call(MultiGetReq req, AsyncMethodCallback resultHandler527, TAsyncClient client523, TProtocolFactory protocolFactory524, TNonblockingTransport transport525) throws TException { - super(client523, protocolFactory524, transport525, resultHandler527, false); + public multiGet_call(MultiGetReq req, AsyncMethodCallback resultHandler526, TAsyncClient client522, TProtocolFactory protocolFactory523, TNonblockingTransport transport524) throws TException { + super(client522, protocolFactory523, transport524, resultHandler526, false); this.req = req; } @@ -5166,17 +5117,17 @@ public MultiGetResp getResult() throws TException { } } - public void remove(RemoveReq req, AsyncMethodCallback resultHandler531) throws TException { + public void remove(RemoveReq req, AsyncMethodCallback resultHandler530) throws TException { checkReady(); - remove_call method_call = new remove_call(req, resultHandler531, this, ___protocolFactory, ___transport); + remove_call method_call = new remove_call(req, resultHandler530, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class remove_call extends TAsyncMethodCall { private RemoveReq req; - public remove_call(RemoveReq req, AsyncMethodCallback resultHandler532, TAsyncClient client528, TProtocolFactory protocolFactory529, TNonblockingTransport transport530) throws TException { - super(client528, protocolFactory529, transport530, resultHandler532, false); + public remove_call(RemoveReq req, AsyncMethodCallback resultHandler531, TAsyncClient client527, TProtocolFactory protocolFactory528, TNonblockingTransport transport529) throws TException { + super(client527, protocolFactory528, transport529, resultHandler531, false); this.req = req; } @@ -5198,17 +5149,17 @@ public ExecResp getResult() throws TException { } } - public void removeRange(RemoveRangeReq req, AsyncMethodCallback resultHandler536) throws TException { + public void removeRange(RemoveRangeReq req, AsyncMethodCallback resultHandler535) throws TException { checkReady(); - removeRange_call method_call = new removeRange_call(req, resultHandler536, this, ___protocolFactory, ___transport); + removeRange_call method_call = new removeRange_call(req, resultHandler535, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class removeRange_call extends TAsyncMethodCall { private RemoveRangeReq req; - public removeRange_call(RemoveRangeReq req, AsyncMethodCallback resultHandler537, TAsyncClient client533, TProtocolFactory protocolFactory534, TNonblockingTransport transport535) throws TException { - super(client533, protocolFactory534, transport535, resultHandler537, false); + public removeRange_call(RemoveRangeReq req, AsyncMethodCallback resultHandler536, TAsyncClient client532, TProtocolFactory protocolFactory533, TNonblockingTransport transport534) throws TException { + super(client532, protocolFactory533, transport534, resultHandler536, false); this.req = req; } @@ -5230,17 +5181,17 @@ public ExecResp getResult() throws TException { } } - public void scan(ScanReq req, AsyncMethodCallback resultHandler541) throws TException { + public void scan(ScanReq req, AsyncMethodCallback resultHandler540) throws TException { checkReady(); - scan_call method_call = new scan_call(req, resultHandler541, this, ___protocolFactory, ___transport); + scan_call method_call = new scan_call(req, resultHandler540, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class scan_call extends TAsyncMethodCall { private ScanReq req; - public scan_call(ScanReq req, AsyncMethodCallback resultHandler542, TAsyncClient client538, TProtocolFactory protocolFactory539, TNonblockingTransport transport540) throws TException { - super(client538, protocolFactory539, transport540, resultHandler542, false); + public scan_call(ScanReq req, AsyncMethodCallback resultHandler541, TAsyncClient client537, TProtocolFactory protocolFactory538, TNonblockingTransport transport539) throws TException { + super(client537, protocolFactory538, transport539, resultHandler541, false); this.req = req; } @@ -5262,17 +5213,17 @@ public ScanResp getResult() throws TException { } } - public void createTagIndex(CreateTagIndexReq req, AsyncMethodCallback resultHandler546) throws TException { + public void createTagIndex(CreateTagIndexReq req, AsyncMethodCallback resultHandler545) throws TException { checkReady(); - createTagIndex_call method_call = new createTagIndex_call(req, resultHandler546, this, ___protocolFactory, ___transport); + createTagIndex_call method_call = new createTagIndex_call(req, resultHandler545, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createTagIndex_call extends TAsyncMethodCall { private CreateTagIndexReq req; - public createTagIndex_call(CreateTagIndexReq req, AsyncMethodCallback resultHandler547, TAsyncClient client543, TProtocolFactory protocolFactory544, TNonblockingTransport transport545) throws TException { - super(client543, protocolFactory544, transport545, resultHandler547, false); + public createTagIndex_call(CreateTagIndexReq req, AsyncMethodCallback resultHandler546, TAsyncClient client542, TProtocolFactory protocolFactory543, TNonblockingTransport transport544) throws TException { + super(client542, protocolFactory543, transport544, resultHandler546, false); this.req = req; } @@ -5294,17 +5245,17 @@ public ExecResp getResult() throws TException { } } - public void dropTagIndex(DropTagIndexReq req, AsyncMethodCallback resultHandler551) throws TException { + public void dropTagIndex(DropTagIndexReq req, AsyncMethodCallback resultHandler550) throws TException { checkReady(); - dropTagIndex_call method_call = new dropTagIndex_call(req, resultHandler551, this, ___protocolFactory, ___transport); + dropTagIndex_call method_call = new dropTagIndex_call(req, resultHandler550, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropTagIndex_call extends TAsyncMethodCall { private DropTagIndexReq req; - public dropTagIndex_call(DropTagIndexReq req, AsyncMethodCallback resultHandler552, TAsyncClient client548, TProtocolFactory protocolFactory549, TNonblockingTransport transport550) throws TException { - super(client548, protocolFactory549, transport550, resultHandler552, false); + public dropTagIndex_call(DropTagIndexReq req, AsyncMethodCallback resultHandler551, TAsyncClient client547, TProtocolFactory protocolFactory548, TNonblockingTransport transport549) throws TException { + super(client547, protocolFactory548, transport549, resultHandler551, false); this.req = req; } @@ -5326,17 +5277,17 @@ public ExecResp getResult() throws TException { } } - public void getTagIndex(GetTagIndexReq req, AsyncMethodCallback resultHandler556) throws TException { + public void getTagIndex(GetTagIndexReq req, AsyncMethodCallback resultHandler555) throws TException { checkReady(); - getTagIndex_call method_call = new getTagIndex_call(req, resultHandler556, this, ___protocolFactory, ___transport); + getTagIndex_call method_call = new getTagIndex_call(req, resultHandler555, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getTagIndex_call extends TAsyncMethodCall { private GetTagIndexReq req; - public getTagIndex_call(GetTagIndexReq req, AsyncMethodCallback resultHandler557, TAsyncClient client553, TProtocolFactory protocolFactory554, TNonblockingTransport transport555) throws TException { - super(client553, protocolFactory554, transport555, resultHandler557, false); + public getTagIndex_call(GetTagIndexReq req, AsyncMethodCallback resultHandler556, TAsyncClient client552, TProtocolFactory protocolFactory553, TNonblockingTransport transport554) throws TException { + super(client552, protocolFactory553, transport554, resultHandler556, false); this.req = req; } @@ -5358,17 +5309,17 @@ public GetTagIndexResp getResult() throws TException { } } - public void listTagIndexes(ListTagIndexesReq req, AsyncMethodCallback resultHandler561) throws TException { + public void listTagIndexes(ListTagIndexesReq req, AsyncMethodCallback resultHandler560) throws TException { checkReady(); - listTagIndexes_call method_call = new listTagIndexes_call(req, resultHandler561, this, ___protocolFactory, ___transport); + listTagIndexes_call method_call = new listTagIndexes_call(req, resultHandler560, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listTagIndexes_call extends TAsyncMethodCall { private ListTagIndexesReq req; - public listTagIndexes_call(ListTagIndexesReq req, AsyncMethodCallback resultHandler562, TAsyncClient client558, TProtocolFactory protocolFactory559, TNonblockingTransport transport560) throws TException { - super(client558, protocolFactory559, transport560, resultHandler562, false); + public listTagIndexes_call(ListTagIndexesReq req, AsyncMethodCallback resultHandler561, TAsyncClient client557, TProtocolFactory protocolFactory558, TNonblockingTransport transport559) throws TException { + super(client557, protocolFactory558, transport559, resultHandler561, false); this.req = req; } @@ -5390,17 +5341,17 @@ public ListTagIndexesResp getResult() throws TException { } } - public void rebuildTagIndex(RebuildIndexReq req, AsyncMethodCallback resultHandler566) throws TException { + public void rebuildTagIndex(RebuildIndexReq req, AsyncMethodCallback resultHandler565) throws TException { checkReady(); - rebuildTagIndex_call method_call = new rebuildTagIndex_call(req, resultHandler566, this, ___protocolFactory, ___transport); + rebuildTagIndex_call method_call = new rebuildTagIndex_call(req, resultHandler565, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class rebuildTagIndex_call extends TAsyncMethodCall { private RebuildIndexReq req; - public rebuildTagIndex_call(RebuildIndexReq req, AsyncMethodCallback resultHandler567, TAsyncClient client563, TProtocolFactory protocolFactory564, TNonblockingTransport transport565) throws TException { - super(client563, protocolFactory564, transport565, resultHandler567, false); + public rebuildTagIndex_call(RebuildIndexReq req, AsyncMethodCallback resultHandler566, TAsyncClient client562, TProtocolFactory protocolFactory563, TNonblockingTransport transport564) throws TException { + super(client562, protocolFactory563, transport564, resultHandler566, false); this.req = req; } @@ -5422,17 +5373,17 @@ public ExecResp getResult() throws TException { } } - public void listTagIndexStatus(ListIndexStatusReq req, AsyncMethodCallback resultHandler571) throws TException { + public void listTagIndexStatus(ListIndexStatusReq req, AsyncMethodCallback resultHandler570) throws TException { checkReady(); - listTagIndexStatus_call method_call = new listTagIndexStatus_call(req, resultHandler571, this, ___protocolFactory, ___transport); + listTagIndexStatus_call method_call = new listTagIndexStatus_call(req, resultHandler570, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listTagIndexStatus_call extends TAsyncMethodCall { private ListIndexStatusReq req; - public listTagIndexStatus_call(ListIndexStatusReq req, AsyncMethodCallback resultHandler572, TAsyncClient client568, TProtocolFactory protocolFactory569, TNonblockingTransport transport570) throws TException { - super(client568, protocolFactory569, transport570, resultHandler572, false); + public listTagIndexStatus_call(ListIndexStatusReq req, AsyncMethodCallback resultHandler571, TAsyncClient client567, TProtocolFactory protocolFactory568, TNonblockingTransport transport569) throws TException { + super(client567, protocolFactory568, transport569, resultHandler571, false); this.req = req; } @@ -5454,17 +5405,17 @@ public ListIndexStatusResp getResult() throws TException { } } - public void createEdgeIndex(CreateEdgeIndexReq req, AsyncMethodCallback resultHandler576) throws TException { + public void createEdgeIndex(CreateEdgeIndexReq req, AsyncMethodCallback resultHandler575) throws TException { checkReady(); - createEdgeIndex_call method_call = new createEdgeIndex_call(req, resultHandler576, this, ___protocolFactory, ___transport); + createEdgeIndex_call method_call = new createEdgeIndex_call(req, resultHandler575, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createEdgeIndex_call extends TAsyncMethodCall { private CreateEdgeIndexReq req; - public createEdgeIndex_call(CreateEdgeIndexReq req, AsyncMethodCallback resultHandler577, TAsyncClient client573, TProtocolFactory protocolFactory574, TNonblockingTransport transport575) throws TException { - super(client573, protocolFactory574, transport575, resultHandler577, false); + public createEdgeIndex_call(CreateEdgeIndexReq req, AsyncMethodCallback resultHandler576, TAsyncClient client572, TProtocolFactory protocolFactory573, TNonblockingTransport transport574) throws TException { + super(client572, protocolFactory573, transport574, resultHandler576, false); this.req = req; } @@ -5486,17 +5437,17 @@ public ExecResp getResult() throws TException { } } - public void dropEdgeIndex(DropEdgeIndexReq req, AsyncMethodCallback resultHandler581) throws TException { + public void dropEdgeIndex(DropEdgeIndexReq req, AsyncMethodCallback resultHandler580) throws TException { checkReady(); - dropEdgeIndex_call method_call = new dropEdgeIndex_call(req, resultHandler581, this, ___protocolFactory, ___transport); + dropEdgeIndex_call method_call = new dropEdgeIndex_call(req, resultHandler580, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropEdgeIndex_call extends TAsyncMethodCall { private DropEdgeIndexReq req; - public dropEdgeIndex_call(DropEdgeIndexReq req, AsyncMethodCallback resultHandler582, TAsyncClient client578, TProtocolFactory protocolFactory579, TNonblockingTransport transport580) throws TException { - super(client578, protocolFactory579, transport580, resultHandler582, false); + public dropEdgeIndex_call(DropEdgeIndexReq req, AsyncMethodCallback resultHandler581, TAsyncClient client577, TProtocolFactory protocolFactory578, TNonblockingTransport transport579) throws TException { + super(client577, protocolFactory578, transport579, resultHandler581, false); this.req = req; } @@ -5518,17 +5469,17 @@ public ExecResp getResult() throws TException { } } - public void getEdgeIndex(GetEdgeIndexReq req, AsyncMethodCallback resultHandler586) throws TException { + public void getEdgeIndex(GetEdgeIndexReq req, AsyncMethodCallback resultHandler585) throws TException { checkReady(); - getEdgeIndex_call method_call = new getEdgeIndex_call(req, resultHandler586, this, ___protocolFactory, ___transport); + getEdgeIndex_call method_call = new getEdgeIndex_call(req, resultHandler585, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getEdgeIndex_call extends TAsyncMethodCall { private GetEdgeIndexReq req; - public getEdgeIndex_call(GetEdgeIndexReq req, AsyncMethodCallback resultHandler587, TAsyncClient client583, TProtocolFactory protocolFactory584, TNonblockingTransport transport585) throws TException { - super(client583, protocolFactory584, transport585, resultHandler587, false); + public getEdgeIndex_call(GetEdgeIndexReq req, AsyncMethodCallback resultHandler586, TAsyncClient client582, TProtocolFactory protocolFactory583, TNonblockingTransport transport584) throws TException { + super(client582, protocolFactory583, transport584, resultHandler586, false); this.req = req; } @@ -5550,17 +5501,17 @@ public GetEdgeIndexResp getResult() throws TException { } } - public void listEdgeIndexes(ListEdgeIndexesReq req, AsyncMethodCallback resultHandler591) throws TException { + public void listEdgeIndexes(ListEdgeIndexesReq req, AsyncMethodCallback resultHandler590) throws TException { checkReady(); - listEdgeIndexes_call method_call = new listEdgeIndexes_call(req, resultHandler591, this, ___protocolFactory, ___transport); + listEdgeIndexes_call method_call = new listEdgeIndexes_call(req, resultHandler590, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listEdgeIndexes_call extends TAsyncMethodCall { private ListEdgeIndexesReq req; - public listEdgeIndexes_call(ListEdgeIndexesReq req, AsyncMethodCallback resultHandler592, TAsyncClient client588, TProtocolFactory protocolFactory589, TNonblockingTransport transport590) throws TException { - super(client588, protocolFactory589, transport590, resultHandler592, false); + public listEdgeIndexes_call(ListEdgeIndexesReq req, AsyncMethodCallback resultHandler591, TAsyncClient client587, TProtocolFactory protocolFactory588, TNonblockingTransport transport589) throws TException { + super(client587, protocolFactory588, transport589, resultHandler591, false); this.req = req; } @@ -5582,17 +5533,17 @@ public ListEdgeIndexesResp getResult() throws TException { } } - public void rebuildEdgeIndex(RebuildIndexReq req, AsyncMethodCallback resultHandler596) throws TException { + public void rebuildEdgeIndex(RebuildIndexReq req, AsyncMethodCallback resultHandler595) throws TException { checkReady(); - rebuildEdgeIndex_call method_call = new rebuildEdgeIndex_call(req, resultHandler596, this, ___protocolFactory, ___transport); + rebuildEdgeIndex_call method_call = new rebuildEdgeIndex_call(req, resultHandler595, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class rebuildEdgeIndex_call extends TAsyncMethodCall { private RebuildIndexReq req; - public rebuildEdgeIndex_call(RebuildIndexReq req, AsyncMethodCallback resultHandler597, TAsyncClient client593, TProtocolFactory protocolFactory594, TNonblockingTransport transport595) throws TException { - super(client593, protocolFactory594, transport595, resultHandler597, false); + public rebuildEdgeIndex_call(RebuildIndexReq req, AsyncMethodCallback resultHandler596, TAsyncClient client592, TProtocolFactory protocolFactory593, TNonblockingTransport transport594) throws TException { + super(client592, protocolFactory593, transport594, resultHandler596, false); this.req = req; } @@ -5614,17 +5565,17 @@ public ExecResp getResult() throws TException { } } - public void listEdgeIndexStatus(ListIndexStatusReq req, AsyncMethodCallback resultHandler601) throws TException { + public void listEdgeIndexStatus(ListIndexStatusReq req, AsyncMethodCallback resultHandler600) throws TException { checkReady(); - listEdgeIndexStatus_call method_call = new listEdgeIndexStatus_call(req, resultHandler601, this, ___protocolFactory, ___transport); + listEdgeIndexStatus_call method_call = new listEdgeIndexStatus_call(req, resultHandler600, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listEdgeIndexStatus_call extends TAsyncMethodCall { private ListIndexStatusReq req; - public listEdgeIndexStatus_call(ListIndexStatusReq req, AsyncMethodCallback resultHandler602, TAsyncClient client598, TProtocolFactory protocolFactory599, TNonblockingTransport transport600) throws TException { - super(client598, protocolFactory599, transport600, resultHandler602, false); + public listEdgeIndexStatus_call(ListIndexStatusReq req, AsyncMethodCallback resultHandler601, TAsyncClient client597, TProtocolFactory protocolFactory598, TNonblockingTransport transport599) throws TException { + super(client597, protocolFactory598, transport599, resultHandler601, false); this.req = req; } @@ -5646,17 +5597,17 @@ public ListIndexStatusResp getResult() throws TException { } } - public void createUser(CreateUserReq req, AsyncMethodCallback resultHandler606) throws TException { + public void createUser(CreateUserReq req, AsyncMethodCallback resultHandler605) throws TException { checkReady(); - createUser_call method_call = new createUser_call(req, resultHandler606, this, ___protocolFactory, ___transport); + createUser_call method_call = new createUser_call(req, resultHandler605, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createUser_call extends TAsyncMethodCall { private CreateUserReq req; - public createUser_call(CreateUserReq req, AsyncMethodCallback resultHandler607, TAsyncClient client603, TProtocolFactory protocolFactory604, TNonblockingTransport transport605) throws TException { - super(client603, protocolFactory604, transport605, resultHandler607, false); + public createUser_call(CreateUserReq req, AsyncMethodCallback resultHandler606, TAsyncClient client602, TProtocolFactory protocolFactory603, TNonblockingTransport transport604) throws TException { + super(client602, protocolFactory603, transport604, resultHandler606, false); this.req = req; } @@ -5678,17 +5629,17 @@ public ExecResp getResult() throws TException { } } - public void dropUser(DropUserReq req, AsyncMethodCallback resultHandler611) throws TException { + public void dropUser(DropUserReq req, AsyncMethodCallback resultHandler610) throws TException { checkReady(); - dropUser_call method_call = new dropUser_call(req, resultHandler611, this, ___protocolFactory, ___transport); + dropUser_call method_call = new dropUser_call(req, resultHandler610, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropUser_call extends TAsyncMethodCall { private DropUserReq req; - public dropUser_call(DropUserReq req, AsyncMethodCallback resultHandler612, TAsyncClient client608, TProtocolFactory protocolFactory609, TNonblockingTransport transport610) throws TException { - super(client608, protocolFactory609, transport610, resultHandler612, false); + public dropUser_call(DropUserReq req, AsyncMethodCallback resultHandler611, TAsyncClient client607, TProtocolFactory protocolFactory608, TNonblockingTransport transport609) throws TException { + super(client607, protocolFactory608, transport609, resultHandler611, false); this.req = req; } @@ -5710,17 +5661,17 @@ public ExecResp getResult() throws TException { } } - public void alterUser(AlterUserReq req, AsyncMethodCallback resultHandler616) throws TException { + public void alterUser(AlterUserReq req, AsyncMethodCallback resultHandler615) throws TException { checkReady(); - alterUser_call method_call = new alterUser_call(req, resultHandler616, this, ___protocolFactory, ___transport); + alterUser_call method_call = new alterUser_call(req, resultHandler615, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class alterUser_call extends TAsyncMethodCall { private AlterUserReq req; - public alterUser_call(AlterUserReq req, AsyncMethodCallback resultHandler617, TAsyncClient client613, TProtocolFactory protocolFactory614, TNonblockingTransport transport615) throws TException { - super(client613, protocolFactory614, transport615, resultHandler617, false); + public alterUser_call(AlterUserReq req, AsyncMethodCallback resultHandler616, TAsyncClient client612, TProtocolFactory protocolFactory613, TNonblockingTransport transport614) throws TException { + super(client612, protocolFactory613, transport614, resultHandler616, false); this.req = req; } @@ -5742,17 +5693,17 @@ public ExecResp getResult() throws TException { } } - public void grantRole(GrantRoleReq req, AsyncMethodCallback resultHandler621) throws TException { + public void grantRole(GrantRoleReq req, AsyncMethodCallback resultHandler620) throws TException { checkReady(); - grantRole_call method_call = new grantRole_call(req, resultHandler621, this, ___protocolFactory, ___transport); + grantRole_call method_call = new grantRole_call(req, resultHandler620, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class grantRole_call extends TAsyncMethodCall { private GrantRoleReq req; - public grantRole_call(GrantRoleReq req, AsyncMethodCallback resultHandler622, TAsyncClient client618, TProtocolFactory protocolFactory619, TNonblockingTransport transport620) throws TException { - super(client618, protocolFactory619, transport620, resultHandler622, false); + public grantRole_call(GrantRoleReq req, AsyncMethodCallback resultHandler621, TAsyncClient client617, TProtocolFactory protocolFactory618, TNonblockingTransport transport619) throws TException { + super(client617, protocolFactory618, transport619, resultHandler621, false); this.req = req; } @@ -5774,17 +5725,17 @@ public ExecResp getResult() throws TException { } } - public void revokeRole(RevokeRoleReq req, AsyncMethodCallback resultHandler626) throws TException { + public void revokeRole(RevokeRoleReq req, AsyncMethodCallback resultHandler625) throws TException { checkReady(); - revokeRole_call method_call = new revokeRole_call(req, resultHandler626, this, ___protocolFactory, ___transport); + revokeRole_call method_call = new revokeRole_call(req, resultHandler625, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class revokeRole_call extends TAsyncMethodCall { private RevokeRoleReq req; - public revokeRole_call(RevokeRoleReq req, AsyncMethodCallback resultHandler627, TAsyncClient client623, TProtocolFactory protocolFactory624, TNonblockingTransport transport625) throws TException { - super(client623, protocolFactory624, transport625, resultHandler627, false); + public revokeRole_call(RevokeRoleReq req, AsyncMethodCallback resultHandler626, TAsyncClient client622, TProtocolFactory protocolFactory623, TNonblockingTransport transport624) throws TException { + super(client622, protocolFactory623, transport624, resultHandler626, false); this.req = req; } @@ -5806,17 +5757,17 @@ public ExecResp getResult() throws TException { } } - public void listUsers(ListUsersReq req, AsyncMethodCallback resultHandler631) throws TException { + public void listUsers(ListUsersReq req, AsyncMethodCallback resultHandler630) throws TException { checkReady(); - listUsers_call method_call = new listUsers_call(req, resultHandler631, this, ___protocolFactory, ___transport); + listUsers_call method_call = new listUsers_call(req, resultHandler630, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listUsers_call extends TAsyncMethodCall { private ListUsersReq req; - public listUsers_call(ListUsersReq req, AsyncMethodCallback resultHandler632, TAsyncClient client628, TProtocolFactory protocolFactory629, TNonblockingTransport transport630) throws TException { - super(client628, protocolFactory629, transport630, resultHandler632, false); + public listUsers_call(ListUsersReq req, AsyncMethodCallback resultHandler631, TAsyncClient client627, TProtocolFactory protocolFactory628, TNonblockingTransport transport629) throws TException { + super(client627, protocolFactory628, transport629, resultHandler631, false); this.req = req; } @@ -5838,17 +5789,17 @@ public ListUsersResp getResult() throws TException { } } - public void listRoles(ListRolesReq req, AsyncMethodCallback resultHandler636) throws TException { + public void listRoles(ListRolesReq req, AsyncMethodCallback resultHandler635) throws TException { checkReady(); - listRoles_call method_call = new listRoles_call(req, resultHandler636, this, ___protocolFactory, ___transport); + listRoles_call method_call = new listRoles_call(req, resultHandler635, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listRoles_call extends TAsyncMethodCall { private ListRolesReq req; - public listRoles_call(ListRolesReq req, AsyncMethodCallback resultHandler637, TAsyncClient client633, TProtocolFactory protocolFactory634, TNonblockingTransport transport635) throws TException { - super(client633, protocolFactory634, transport635, resultHandler637, false); + public listRoles_call(ListRolesReq req, AsyncMethodCallback resultHandler636, TAsyncClient client632, TProtocolFactory protocolFactory633, TNonblockingTransport transport634) throws TException { + super(client632, protocolFactory633, transport634, resultHandler636, false); this.req = req; } @@ -5870,17 +5821,17 @@ public ListRolesResp getResult() throws TException { } } - public void getUserRoles(GetUserRolesReq req, AsyncMethodCallback resultHandler641) throws TException { + public void getUserRoles(GetUserRolesReq req, AsyncMethodCallback resultHandler640) throws TException { checkReady(); - getUserRoles_call method_call = new getUserRoles_call(req, resultHandler641, this, ___protocolFactory, ___transport); + getUserRoles_call method_call = new getUserRoles_call(req, resultHandler640, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getUserRoles_call extends TAsyncMethodCall { private GetUserRolesReq req; - public getUserRoles_call(GetUserRolesReq req, AsyncMethodCallback resultHandler642, TAsyncClient client638, TProtocolFactory protocolFactory639, TNonblockingTransport transport640) throws TException { - super(client638, protocolFactory639, transport640, resultHandler642, false); + public getUserRoles_call(GetUserRolesReq req, AsyncMethodCallback resultHandler641, TAsyncClient client637, TProtocolFactory protocolFactory638, TNonblockingTransport transport639) throws TException { + super(client637, protocolFactory638, transport639, resultHandler641, false); this.req = req; } @@ -5902,17 +5853,17 @@ public ListRolesResp getResult() throws TException { } } - public void changePassword(ChangePasswordReq req, AsyncMethodCallback resultHandler646) throws TException { + public void changePassword(ChangePasswordReq req, AsyncMethodCallback resultHandler645) throws TException { checkReady(); - changePassword_call method_call = new changePassword_call(req, resultHandler646, this, ___protocolFactory, ___transport); + changePassword_call method_call = new changePassword_call(req, resultHandler645, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class changePassword_call extends TAsyncMethodCall { private ChangePasswordReq req; - public changePassword_call(ChangePasswordReq req, AsyncMethodCallback resultHandler647, TAsyncClient client643, TProtocolFactory protocolFactory644, TNonblockingTransport transport645) throws TException { - super(client643, protocolFactory644, transport645, resultHandler647, false); + public changePassword_call(ChangePasswordReq req, AsyncMethodCallback resultHandler646, TAsyncClient client642, TProtocolFactory protocolFactory643, TNonblockingTransport transport644) throws TException { + super(client642, protocolFactory643, transport644, resultHandler646, false); this.req = req; } @@ -5934,17 +5885,17 @@ public ExecResp getResult() throws TException { } } - public void heartBeat(HBReq req, AsyncMethodCallback resultHandler651) throws TException { + public void heartBeat(HBReq req, AsyncMethodCallback resultHandler650) throws TException { checkReady(); - heartBeat_call method_call = new heartBeat_call(req, resultHandler651, this, ___protocolFactory, ___transport); + heartBeat_call method_call = new heartBeat_call(req, resultHandler650, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class heartBeat_call extends TAsyncMethodCall { private HBReq req; - public heartBeat_call(HBReq req, AsyncMethodCallback resultHandler652, TAsyncClient client648, TProtocolFactory protocolFactory649, TNonblockingTransport transport650) throws TException { - super(client648, protocolFactory649, transport650, resultHandler652, false); + public heartBeat_call(HBReq req, AsyncMethodCallback resultHandler651, TAsyncClient client647, TProtocolFactory protocolFactory648, TNonblockingTransport transport649) throws TException { + super(client647, protocolFactory648, transport649, resultHandler651, false); this.req = req; } @@ -5966,17 +5917,17 @@ public HBResp getResult() throws TException { } } - public void balance(BalanceReq req, AsyncMethodCallback resultHandler656) throws TException { + public void balance(BalanceReq req, AsyncMethodCallback resultHandler655) throws TException { checkReady(); - balance_call method_call = new balance_call(req, resultHandler656, this, ___protocolFactory, ___transport); + balance_call method_call = new balance_call(req, resultHandler655, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class balance_call extends TAsyncMethodCall { private BalanceReq req; - public balance_call(BalanceReq req, AsyncMethodCallback resultHandler657, TAsyncClient client653, TProtocolFactory protocolFactory654, TNonblockingTransport transport655) throws TException { - super(client653, protocolFactory654, transport655, resultHandler657, false); + public balance_call(BalanceReq req, AsyncMethodCallback resultHandler656, TAsyncClient client652, TProtocolFactory protocolFactory653, TNonblockingTransport transport654) throws TException { + super(client652, protocolFactory653, transport654, resultHandler656, false); this.req = req; } @@ -5998,17 +5949,17 @@ public BalanceResp getResult() throws TException { } } - public void leaderBalance(LeaderBalanceReq req, AsyncMethodCallback resultHandler661) throws TException { + public void leaderBalance(LeaderBalanceReq req, AsyncMethodCallback resultHandler660) throws TException { checkReady(); - leaderBalance_call method_call = new leaderBalance_call(req, resultHandler661, this, ___protocolFactory, ___transport); + leaderBalance_call method_call = new leaderBalance_call(req, resultHandler660, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class leaderBalance_call extends TAsyncMethodCall { private LeaderBalanceReq req; - public leaderBalance_call(LeaderBalanceReq req, AsyncMethodCallback resultHandler662, TAsyncClient client658, TProtocolFactory protocolFactory659, TNonblockingTransport transport660) throws TException { - super(client658, protocolFactory659, transport660, resultHandler662, false); + public leaderBalance_call(LeaderBalanceReq req, AsyncMethodCallback resultHandler661, TAsyncClient client657, TProtocolFactory protocolFactory658, TNonblockingTransport transport659) throws TException { + super(client657, protocolFactory658, transport659, resultHandler661, false); this.req = req; } @@ -6030,17 +5981,17 @@ public ExecResp getResult() throws TException { } } - public void regConfig(RegConfigReq req, AsyncMethodCallback resultHandler666) throws TException { + public void regConfig(RegConfigReq req, AsyncMethodCallback resultHandler665) throws TException { checkReady(); - regConfig_call method_call = new regConfig_call(req, resultHandler666, this, ___protocolFactory, ___transport); + regConfig_call method_call = new regConfig_call(req, resultHandler665, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class regConfig_call extends TAsyncMethodCall { private RegConfigReq req; - public regConfig_call(RegConfigReq req, AsyncMethodCallback resultHandler667, TAsyncClient client663, TProtocolFactory protocolFactory664, TNonblockingTransport transport665) throws TException { - super(client663, protocolFactory664, transport665, resultHandler667, false); + public regConfig_call(RegConfigReq req, AsyncMethodCallback resultHandler666, TAsyncClient client662, TProtocolFactory protocolFactory663, TNonblockingTransport transport664) throws TException { + super(client662, protocolFactory663, transport664, resultHandler666, false); this.req = req; } @@ -6062,17 +6013,17 @@ public ExecResp getResult() throws TException { } } - public void getConfig(GetConfigReq req, AsyncMethodCallback resultHandler671) throws TException { + public void getConfig(GetConfigReq req, AsyncMethodCallback resultHandler670) throws TException { checkReady(); - getConfig_call method_call = new getConfig_call(req, resultHandler671, this, ___protocolFactory, ___transport); + getConfig_call method_call = new getConfig_call(req, resultHandler670, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getConfig_call extends TAsyncMethodCall { private GetConfigReq req; - public getConfig_call(GetConfigReq req, AsyncMethodCallback resultHandler672, TAsyncClient client668, TProtocolFactory protocolFactory669, TNonblockingTransport transport670) throws TException { - super(client668, protocolFactory669, transport670, resultHandler672, false); + public getConfig_call(GetConfigReq req, AsyncMethodCallback resultHandler671, TAsyncClient client667, TProtocolFactory protocolFactory668, TNonblockingTransport transport669) throws TException { + super(client667, protocolFactory668, transport669, resultHandler671, false); this.req = req; } @@ -6094,17 +6045,17 @@ public GetConfigResp getResult() throws TException { } } - public void setConfig(SetConfigReq req, AsyncMethodCallback resultHandler676) throws TException { + public void setConfig(SetConfigReq req, AsyncMethodCallback resultHandler675) throws TException { checkReady(); - setConfig_call method_call = new setConfig_call(req, resultHandler676, this, ___protocolFactory, ___transport); + setConfig_call method_call = new setConfig_call(req, resultHandler675, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class setConfig_call extends TAsyncMethodCall { private SetConfigReq req; - public setConfig_call(SetConfigReq req, AsyncMethodCallback resultHandler677, TAsyncClient client673, TProtocolFactory protocolFactory674, TNonblockingTransport transport675) throws TException { - super(client673, protocolFactory674, transport675, resultHandler677, false); + public setConfig_call(SetConfigReq req, AsyncMethodCallback resultHandler676, TAsyncClient client672, TProtocolFactory protocolFactory673, TNonblockingTransport transport674) throws TException { + super(client672, protocolFactory673, transport674, resultHandler676, false); this.req = req; } @@ -6126,17 +6077,17 @@ public ExecResp getResult() throws TException { } } - public void listConfigs(ListConfigsReq req, AsyncMethodCallback resultHandler681) throws TException { + public void listConfigs(ListConfigsReq req, AsyncMethodCallback resultHandler680) throws TException { checkReady(); - listConfigs_call method_call = new listConfigs_call(req, resultHandler681, this, ___protocolFactory, ___transport); + listConfigs_call method_call = new listConfigs_call(req, resultHandler680, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listConfigs_call extends TAsyncMethodCall { private ListConfigsReq req; - public listConfigs_call(ListConfigsReq req, AsyncMethodCallback resultHandler682, TAsyncClient client678, TProtocolFactory protocolFactory679, TNonblockingTransport transport680) throws TException { - super(client678, protocolFactory679, transport680, resultHandler682, false); + public listConfigs_call(ListConfigsReq req, AsyncMethodCallback resultHandler681, TAsyncClient client677, TProtocolFactory protocolFactory678, TNonblockingTransport transport679) throws TException { + super(client677, protocolFactory678, transport679, resultHandler681, false); this.req = req; } @@ -6158,17 +6109,17 @@ public ListConfigsResp getResult() throws TException { } } - public void createSnapshot(CreateSnapshotReq req, AsyncMethodCallback resultHandler686) throws TException { + public void createSnapshot(CreateSnapshotReq req, AsyncMethodCallback resultHandler685) throws TException { checkReady(); - createSnapshot_call method_call = new createSnapshot_call(req, resultHandler686, this, ___protocolFactory, ___transport); + createSnapshot_call method_call = new createSnapshot_call(req, resultHandler685, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createSnapshot_call extends TAsyncMethodCall { private CreateSnapshotReq req; - public createSnapshot_call(CreateSnapshotReq req, AsyncMethodCallback resultHandler687, TAsyncClient client683, TProtocolFactory protocolFactory684, TNonblockingTransport transport685) throws TException { - super(client683, protocolFactory684, transport685, resultHandler687, false); + public createSnapshot_call(CreateSnapshotReq req, AsyncMethodCallback resultHandler686, TAsyncClient client682, TProtocolFactory protocolFactory683, TNonblockingTransport transport684) throws TException { + super(client682, protocolFactory683, transport684, resultHandler686, false); this.req = req; } @@ -6190,17 +6141,17 @@ public ExecResp getResult() throws TException { } } - public void dropSnapshot(DropSnapshotReq req, AsyncMethodCallback resultHandler691) throws TException { + public void dropSnapshot(DropSnapshotReq req, AsyncMethodCallback resultHandler690) throws TException { checkReady(); - dropSnapshot_call method_call = new dropSnapshot_call(req, resultHandler691, this, ___protocolFactory, ___transport); + dropSnapshot_call method_call = new dropSnapshot_call(req, resultHandler690, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropSnapshot_call extends TAsyncMethodCall { private DropSnapshotReq req; - public dropSnapshot_call(DropSnapshotReq req, AsyncMethodCallback resultHandler692, TAsyncClient client688, TProtocolFactory protocolFactory689, TNonblockingTransport transport690) throws TException { - super(client688, protocolFactory689, transport690, resultHandler692, false); + public dropSnapshot_call(DropSnapshotReq req, AsyncMethodCallback resultHandler691, TAsyncClient client687, TProtocolFactory protocolFactory688, TNonblockingTransport transport689) throws TException { + super(client687, protocolFactory688, transport689, resultHandler691, false); this.req = req; } @@ -6222,17 +6173,17 @@ public ExecResp getResult() throws TException { } } - public void listSnapshots(ListSnapshotsReq req, AsyncMethodCallback resultHandler696) throws TException { + public void listSnapshots(ListSnapshotsReq req, AsyncMethodCallback resultHandler695) throws TException { checkReady(); - listSnapshots_call method_call = new listSnapshots_call(req, resultHandler696, this, ___protocolFactory, ___transport); + listSnapshots_call method_call = new listSnapshots_call(req, resultHandler695, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listSnapshots_call extends TAsyncMethodCall { private ListSnapshotsReq req; - public listSnapshots_call(ListSnapshotsReq req, AsyncMethodCallback resultHandler697, TAsyncClient client693, TProtocolFactory protocolFactory694, TNonblockingTransport transport695) throws TException { - super(client693, protocolFactory694, transport695, resultHandler697, false); + public listSnapshots_call(ListSnapshotsReq req, AsyncMethodCallback resultHandler696, TAsyncClient client692, TProtocolFactory protocolFactory693, TNonblockingTransport transport694) throws TException { + super(client692, protocolFactory693, transport694, resultHandler696, false); this.req = req; } @@ -6254,17 +6205,17 @@ public ListSnapshotsResp getResult() throws TException { } } - public void runAdminJob(AdminJobReq req, AsyncMethodCallback resultHandler701) throws TException { + public void runAdminJob(AdminJobReq req, AsyncMethodCallback resultHandler700) throws TException { checkReady(); - runAdminJob_call method_call = new runAdminJob_call(req, resultHandler701, this, ___protocolFactory, ___transport); + runAdminJob_call method_call = new runAdminJob_call(req, resultHandler700, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class runAdminJob_call extends TAsyncMethodCall { private AdminJobReq req; - public runAdminJob_call(AdminJobReq req, AsyncMethodCallback resultHandler702, TAsyncClient client698, TProtocolFactory protocolFactory699, TNonblockingTransport transport700) throws TException { - super(client698, protocolFactory699, transport700, resultHandler702, false); + public runAdminJob_call(AdminJobReq req, AsyncMethodCallback resultHandler701, TAsyncClient client697, TProtocolFactory protocolFactory698, TNonblockingTransport transport699) throws TException { + super(client697, protocolFactory698, transport699, resultHandler701, false); this.req = req; } @@ -6286,17 +6237,17 @@ public AdminJobResp getResult() throws TException { } } - public void addZone(AddZoneReq req, AsyncMethodCallback resultHandler706) throws TException { + public void addZone(AddZoneReq req, AsyncMethodCallback resultHandler705) throws TException { checkReady(); - addZone_call method_call = new addZone_call(req, resultHandler706, this, ___protocolFactory, ___transport); + addZone_call method_call = new addZone_call(req, resultHandler705, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addZone_call extends TAsyncMethodCall { private AddZoneReq req; - public addZone_call(AddZoneReq req, AsyncMethodCallback resultHandler707, TAsyncClient client703, TProtocolFactory protocolFactory704, TNonblockingTransport transport705) throws TException { - super(client703, protocolFactory704, transport705, resultHandler707, false); + public addZone_call(AddZoneReq req, AsyncMethodCallback resultHandler706, TAsyncClient client702, TProtocolFactory protocolFactory703, TNonblockingTransport transport704) throws TException { + super(client702, protocolFactory703, transport704, resultHandler706, false); this.req = req; } @@ -6318,17 +6269,17 @@ public ExecResp getResult() throws TException { } } - public void dropZone(DropZoneReq req, AsyncMethodCallback resultHandler711) throws TException { + public void dropZone(DropZoneReq req, AsyncMethodCallback resultHandler710) throws TException { checkReady(); - dropZone_call method_call = new dropZone_call(req, resultHandler711, this, ___protocolFactory, ___transport); + dropZone_call method_call = new dropZone_call(req, resultHandler710, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropZone_call extends TAsyncMethodCall { private DropZoneReq req; - public dropZone_call(DropZoneReq req, AsyncMethodCallback resultHandler712, TAsyncClient client708, TProtocolFactory protocolFactory709, TNonblockingTransport transport710) throws TException { - super(client708, protocolFactory709, transport710, resultHandler712, false); + public dropZone_call(DropZoneReq req, AsyncMethodCallback resultHandler711, TAsyncClient client707, TProtocolFactory protocolFactory708, TNonblockingTransport transport709) throws TException { + super(client707, protocolFactory708, transport709, resultHandler711, false); this.req = req; } @@ -6350,17 +6301,17 @@ public ExecResp getResult() throws TException { } } - public void addHostIntoZone(AddHostIntoZoneReq req, AsyncMethodCallback resultHandler716) throws TException { + public void addHostIntoZone(AddHostIntoZoneReq req, AsyncMethodCallback resultHandler715) throws TException { checkReady(); - addHostIntoZone_call method_call = new addHostIntoZone_call(req, resultHandler716, this, ___protocolFactory, ___transport); + addHostIntoZone_call method_call = new addHostIntoZone_call(req, resultHandler715, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addHostIntoZone_call extends TAsyncMethodCall { private AddHostIntoZoneReq req; - public addHostIntoZone_call(AddHostIntoZoneReq req, AsyncMethodCallback resultHandler717, TAsyncClient client713, TProtocolFactory protocolFactory714, TNonblockingTransport transport715) throws TException { - super(client713, protocolFactory714, transport715, resultHandler717, false); + public addHostIntoZone_call(AddHostIntoZoneReq req, AsyncMethodCallback resultHandler716, TAsyncClient client712, TProtocolFactory protocolFactory713, TNonblockingTransport transport714) throws TException { + super(client712, protocolFactory713, transport714, resultHandler716, false); this.req = req; } @@ -6382,17 +6333,17 @@ public ExecResp getResult() throws TException { } } - public void dropHostFromZone(DropHostFromZoneReq req, AsyncMethodCallback resultHandler721) throws TException { + public void dropHostFromZone(DropHostFromZoneReq req, AsyncMethodCallback resultHandler720) throws TException { checkReady(); - dropHostFromZone_call method_call = new dropHostFromZone_call(req, resultHandler721, this, ___protocolFactory, ___transport); + dropHostFromZone_call method_call = new dropHostFromZone_call(req, resultHandler720, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropHostFromZone_call extends TAsyncMethodCall { private DropHostFromZoneReq req; - public dropHostFromZone_call(DropHostFromZoneReq req, AsyncMethodCallback resultHandler722, TAsyncClient client718, TProtocolFactory protocolFactory719, TNonblockingTransport transport720) throws TException { - super(client718, protocolFactory719, transport720, resultHandler722, false); + public dropHostFromZone_call(DropHostFromZoneReq req, AsyncMethodCallback resultHandler721, TAsyncClient client717, TProtocolFactory protocolFactory718, TNonblockingTransport transport719) throws TException { + super(client717, protocolFactory718, transport719, resultHandler721, false); this.req = req; } @@ -6414,17 +6365,17 @@ public ExecResp getResult() throws TException { } } - public void getZone(GetZoneReq req, AsyncMethodCallback resultHandler726) throws TException { + public void getZone(GetZoneReq req, AsyncMethodCallback resultHandler725) throws TException { checkReady(); - getZone_call method_call = new getZone_call(req, resultHandler726, this, ___protocolFactory, ___transport); + getZone_call method_call = new getZone_call(req, resultHandler725, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getZone_call extends TAsyncMethodCall { private GetZoneReq req; - public getZone_call(GetZoneReq req, AsyncMethodCallback resultHandler727, TAsyncClient client723, TProtocolFactory protocolFactory724, TNonblockingTransport transport725) throws TException { - super(client723, protocolFactory724, transport725, resultHandler727, false); + public getZone_call(GetZoneReq req, AsyncMethodCallback resultHandler726, TAsyncClient client722, TProtocolFactory protocolFactory723, TNonblockingTransport transport724) throws TException { + super(client722, protocolFactory723, transport724, resultHandler726, false); this.req = req; } @@ -6446,17 +6397,17 @@ public GetZoneResp getResult() throws TException { } } - public void listZones(ListZonesReq req, AsyncMethodCallback resultHandler731) throws TException { + public void listZones(ListZonesReq req, AsyncMethodCallback resultHandler730) throws TException { checkReady(); - listZones_call method_call = new listZones_call(req, resultHandler731, this, ___protocolFactory, ___transport); + listZones_call method_call = new listZones_call(req, resultHandler730, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listZones_call extends TAsyncMethodCall { private ListZonesReq req; - public listZones_call(ListZonesReq req, AsyncMethodCallback resultHandler732, TAsyncClient client728, TProtocolFactory protocolFactory729, TNonblockingTransport transport730) throws TException { - super(client728, protocolFactory729, transport730, resultHandler732, false); + public listZones_call(ListZonesReq req, AsyncMethodCallback resultHandler731, TAsyncClient client727, TProtocolFactory protocolFactory728, TNonblockingTransport transport729) throws TException { + super(client727, protocolFactory728, transport729, resultHandler731, false); this.req = req; } @@ -6478,17 +6429,17 @@ public ListZonesResp getResult() throws TException { } } - public void addGroup(AddGroupReq req, AsyncMethodCallback resultHandler736) throws TException { + public void addGroup(AddGroupReq req, AsyncMethodCallback resultHandler735) throws TException { checkReady(); - addGroup_call method_call = new addGroup_call(req, resultHandler736, this, ___protocolFactory, ___transport); + addGroup_call method_call = new addGroup_call(req, resultHandler735, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addGroup_call extends TAsyncMethodCall { private AddGroupReq req; - public addGroup_call(AddGroupReq req, AsyncMethodCallback resultHandler737, TAsyncClient client733, TProtocolFactory protocolFactory734, TNonblockingTransport transport735) throws TException { - super(client733, protocolFactory734, transport735, resultHandler737, false); + public addGroup_call(AddGroupReq req, AsyncMethodCallback resultHandler736, TAsyncClient client732, TProtocolFactory protocolFactory733, TNonblockingTransport transport734) throws TException { + super(client732, protocolFactory733, transport734, resultHandler736, false); this.req = req; } @@ -6510,17 +6461,17 @@ public ExecResp getResult() throws TException { } } - public void dropGroup(DropGroupReq req, AsyncMethodCallback resultHandler741) throws TException { + public void dropGroup(DropGroupReq req, AsyncMethodCallback resultHandler740) throws TException { checkReady(); - dropGroup_call method_call = new dropGroup_call(req, resultHandler741, this, ___protocolFactory, ___transport); + dropGroup_call method_call = new dropGroup_call(req, resultHandler740, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropGroup_call extends TAsyncMethodCall { private DropGroupReq req; - public dropGroup_call(DropGroupReq req, AsyncMethodCallback resultHandler742, TAsyncClient client738, TProtocolFactory protocolFactory739, TNonblockingTransport transport740) throws TException { - super(client738, protocolFactory739, transport740, resultHandler742, false); + public dropGroup_call(DropGroupReq req, AsyncMethodCallback resultHandler741, TAsyncClient client737, TProtocolFactory protocolFactory738, TNonblockingTransport transport739) throws TException { + super(client737, protocolFactory738, transport739, resultHandler741, false); this.req = req; } @@ -6542,17 +6493,17 @@ public ExecResp getResult() throws TException { } } - public void addZoneIntoGroup(AddZoneIntoGroupReq req, AsyncMethodCallback resultHandler746) throws TException { + public void addZoneIntoGroup(AddZoneIntoGroupReq req, AsyncMethodCallback resultHandler745) throws TException { checkReady(); - addZoneIntoGroup_call method_call = new addZoneIntoGroup_call(req, resultHandler746, this, ___protocolFactory, ___transport); + addZoneIntoGroup_call method_call = new addZoneIntoGroup_call(req, resultHandler745, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addZoneIntoGroup_call extends TAsyncMethodCall { private AddZoneIntoGroupReq req; - public addZoneIntoGroup_call(AddZoneIntoGroupReq req, AsyncMethodCallback resultHandler747, TAsyncClient client743, TProtocolFactory protocolFactory744, TNonblockingTransport transport745) throws TException { - super(client743, protocolFactory744, transport745, resultHandler747, false); + public addZoneIntoGroup_call(AddZoneIntoGroupReq req, AsyncMethodCallback resultHandler746, TAsyncClient client742, TProtocolFactory protocolFactory743, TNonblockingTransport transport744) throws TException { + super(client742, protocolFactory743, transport744, resultHandler746, false); this.req = req; } @@ -6574,17 +6525,17 @@ public ExecResp getResult() throws TException { } } - public void dropZoneFromGroup(DropZoneFromGroupReq req, AsyncMethodCallback resultHandler751) throws TException { + public void dropZoneFromGroup(DropZoneFromGroupReq req, AsyncMethodCallback resultHandler750) throws TException { checkReady(); - dropZoneFromGroup_call method_call = new dropZoneFromGroup_call(req, resultHandler751, this, ___protocolFactory, ___transport); + dropZoneFromGroup_call method_call = new dropZoneFromGroup_call(req, resultHandler750, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropZoneFromGroup_call extends TAsyncMethodCall { private DropZoneFromGroupReq req; - public dropZoneFromGroup_call(DropZoneFromGroupReq req, AsyncMethodCallback resultHandler752, TAsyncClient client748, TProtocolFactory protocolFactory749, TNonblockingTransport transport750) throws TException { - super(client748, protocolFactory749, transport750, resultHandler752, false); + public dropZoneFromGroup_call(DropZoneFromGroupReq req, AsyncMethodCallback resultHandler751, TAsyncClient client747, TProtocolFactory protocolFactory748, TNonblockingTransport transport749) throws TException { + super(client747, protocolFactory748, transport749, resultHandler751, false); this.req = req; } @@ -6606,17 +6557,17 @@ public ExecResp getResult() throws TException { } } - public void getGroup(GetGroupReq req, AsyncMethodCallback resultHandler756) throws TException { + public void getGroup(GetGroupReq req, AsyncMethodCallback resultHandler755) throws TException { checkReady(); - getGroup_call method_call = new getGroup_call(req, resultHandler756, this, ___protocolFactory, ___transport); + getGroup_call method_call = new getGroup_call(req, resultHandler755, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getGroup_call extends TAsyncMethodCall { private GetGroupReq req; - public getGroup_call(GetGroupReq req, AsyncMethodCallback resultHandler757, TAsyncClient client753, TProtocolFactory protocolFactory754, TNonblockingTransport transport755) throws TException { - super(client753, protocolFactory754, transport755, resultHandler757, false); + public getGroup_call(GetGroupReq req, AsyncMethodCallback resultHandler756, TAsyncClient client752, TProtocolFactory protocolFactory753, TNonblockingTransport transport754) throws TException { + super(client752, protocolFactory753, transport754, resultHandler756, false); this.req = req; } @@ -6638,17 +6589,17 @@ public GetGroupResp getResult() throws TException { } } - public void listGroups(ListGroupsReq req, AsyncMethodCallback resultHandler761) throws TException { + public void listGroups(ListGroupsReq req, AsyncMethodCallback resultHandler760) throws TException { checkReady(); - listGroups_call method_call = new listGroups_call(req, resultHandler761, this, ___protocolFactory, ___transport); + listGroups_call method_call = new listGroups_call(req, resultHandler760, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listGroups_call extends TAsyncMethodCall { private ListGroupsReq req; - public listGroups_call(ListGroupsReq req, AsyncMethodCallback resultHandler762, TAsyncClient client758, TProtocolFactory protocolFactory759, TNonblockingTransport transport760) throws TException { - super(client758, protocolFactory759, transport760, resultHandler762, false); + public listGroups_call(ListGroupsReq req, AsyncMethodCallback resultHandler761, TAsyncClient client757, TProtocolFactory protocolFactory758, TNonblockingTransport transport759) throws TException { + super(client757, protocolFactory758, transport759, resultHandler761, false); this.req = req; } @@ -6670,17 +6621,17 @@ public ListGroupsResp getResult() throws TException { } } - public void createBackup(CreateBackupReq req, AsyncMethodCallback resultHandler766) throws TException { + public void createBackup(CreateBackupReq req, AsyncMethodCallback resultHandler765) throws TException { checkReady(); - createBackup_call method_call = new createBackup_call(req, resultHandler766, this, ___protocolFactory, ___transport); + createBackup_call method_call = new createBackup_call(req, resultHandler765, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createBackup_call extends TAsyncMethodCall { private CreateBackupReq req; - public createBackup_call(CreateBackupReq req, AsyncMethodCallback resultHandler767, TAsyncClient client763, TProtocolFactory protocolFactory764, TNonblockingTransport transport765) throws TException { - super(client763, protocolFactory764, transport765, resultHandler767, false); + public createBackup_call(CreateBackupReq req, AsyncMethodCallback resultHandler766, TAsyncClient client762, TProtocolFactory protocolFactory763, TNonblockingTransport transport764) throws TException { + super(client762, protocolFactory763, transport764, resultHandler766, false); this.req = req; } @@ -6702,17 +6653,17 @@ public CreateBackupResp getResult() throws TException { } } - public void restoreMeta(RestoreMetaReq req, AsyncMethodCallback resultHandler771) throws TException { + public void restoreMeta(RestoreMetaReq req, AsyncMethodCallback resultHandler770) throws TException { checkReady(); - restoreMeta_call method_call = new restoreMeta_call(req, resultHandler771, this, ___protocolFactory, ___transport); + restoreMeta_call method_call = new restoreMeta_call(req, resultHandler770, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class restoreMeta_call extends TAsyncMethodCall { private RestoreMetaReq req; - public restoreMeta_call(RestoreMetaReq req, AsyncMethodCallback resultHandler772, TAsyncClient client768, TProtocolFactory protocolFactory769, TNonblockingTransport transport770) throws TException { - super(client768, protocolFactory769, transport770, resultHandler772, false); + public restoreMeta_call(RestoreMetaReq req, AsyncMethodCallback resultHandler771, TAsyncClient client767, TProtocolFactory protocolFactory768, TNonblockingTransport transport769) throws TException { + super(client767, protocolFactory768, transport769, resultHandler771, false); this.req = req; } @@ -6734,17 +6685,17 @@ public ExecResp getResult() throws TException { } } - public void addListener(AddListenerReq req, AsyncMethodCallback resultHandler776) throws TException { + public void addListener(AddListenerReq req, AsyncMethodCallback resultHandler775) throws TException { checkReady(); - addListener_call method_call = new addListener_call(req, resultHandler776, this, ___protocolFactory, ___transport); + addListener_call method_call = new addListener_call(req, resultHandler775, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addListener_call extends TAsyncMethodCall { private AddListenerReq req; - public addListener_call(AddListenerReq req, AsyncMethodCallback resultHandler777, TAsyncClient client773, TProtocolFactory protocolFactory774, TNonblockingTransport transport775) throws TException { - super(client773, protocolFactory774, transport775, resultHandler777, false); + public addListener_call(AddListenerReq req, AsyncMethodCallback resultHandler776, TAsyncClient client772, TProtocolFactory protocolFactory773, TNonblockingTransport transport774) throws TException { + super(client772, protocolFactory773, transport774, resultHandler776, false); this.req = req; } @@ -6766,17 +6717,17 @@ public ExecResp getResult() throws TException { } } - public void removeListener(RemoveListenerReq req, AsyncMethodCallback resultHandler781) throws TException { + public void removeListener(RemoveListenerReq req, AsyncMethodCallback resultHandler780) throws TException { checkReady(); - removeListener_call method_call = new removeListener_call(req, resultHandler781, this, ___protocolFactory, ___transport); + removeListener_call method_call = new removeListener_call(req, resultHandler780, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class removeListener_call extends TAsyncMethodCall { private RemoveListenerReq req; - public removeListener_call(RemoveListenerReq req, AsyncMethodCallback resultHandler782, TAsyncClient client778, TProtocolFactory protocolFactory779, TNonblockingTransport transport780) throws TException { - super(client778, protocolFactory779, transport780, resultHandler782, false); + public removeListener_call(RemoveListenerReq req, AsyncMethodCallback resultHandler781, TAsyncClient client777, TProtocolFactory protocolFactory778, TNonblockingTransport transport779) throws TException { + super(client777, protocolFactory778, transport779, resultHandler781, false); this.req = req; } @@ -6798,17 +6749,17 @@ public ExecResp getResult() throws TException { } } - public void listListener(ListListenerReq req, AsyncMethodCallback resultHandler786) throws TException { + public void listListener(ListListenerReq req, AsyncMethodCallback resultHandler785) throws TException { checkReady(); - listListener_call method_call = new listListener_call(req, resultHandler786, this, ___protocolFactory, ___transport); + listListener_call method_call = new listListener_call(req, resultHandler785, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listListener_call extends TAsyncMethodCall { private ListListenerReq req; - public listListener_call(ListListenerReq req, AsyncMethodCallback resultHandler787, TAsyncClient client783, TProtocolFactory protocolFactory784, TNonblockingTransport transport785) throws TException { - super(client783, protocolFactory784, transport785, resultHandler787, false); + public listListener_call(ListListenerReq req, AsyncMethodCallback resultHandler786, TAsyncClient client782, TProtocolFactory protocolFactory783, TNonblockingTransport transport784) throws TException { + super(client782, protocolFactory783, transport784, resultHandler786, false); this.req = req; } @@ -6830,17 +6781,17 @@ public ListListenerResp getResult() throws TException { } } - public void getStats(GetStatsReq req, AsyncMethodCallback resultHandler791) throws TException { + public void getStats(GetStatsReq req, AsyncMethodCallback resultHandler790) throws TException { checkReady(); - getStats_call method_call = new getStats_call(req, resultHandler791, this, ___protocolFactory, ___transport); + getStats_call method_call = new getStats_call(req, resultHandler790, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getStats_call extends TAsyncMethodCall { private GetStatsReq req; - public getStats_call(GetStatsReq req, AsyncMethodCallback resultHandler792, TAsyncClient client788, TProtocolFactory protocolFactory789, TNonblockingTransport transport790) throws TException { - super(client788, protocolFactory789, transport790, resultHandler792, false); + public getStats_call(GetStatsReq req, AsyncMethodCallback resultHandler791, TAsyncClient client787, TProtocolFactory protocolFactory788, TNonblockingTransport transport789) throws TException { + super(client787, protocolFactory788, transport789, resultHandler791, false); this.req = req; } @@ -6862,17 +6813,17 @@ public GetStatsResp getResult() throws TException { } } - public void signInFTService(SignInFTServiceReq req, AsyncMethodCallback resultHandler796) throws TException { + public void signInFTService(SignInFTServiceReq req, AsyncMethodCallback resultHandler795) throws TException { checkReady(); - signInFTService_call method_call = new signInFTService_call(req, resultHandler796, this, ___protocolFactory, ___transport); + signInFTService_call method_call = new signInFTService_call(req, resultHandler795, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class signInFTService_call extends TAsyncMethodCall { private SignInFTServiceReq req; - public signInFTService_call(SignInFTServiceReq req, AsyncMethodCallback resultHandler797, TAsyncClient client793, TProtocolFactory protocolFactory794, TNonblockingTransport transport795) throws TException { - super(client793, protocolFactory794, transport795, resultHandler797, false); + public signInFTService_call(SignInFTServiceReq req, AsyncMethodCallback resultHandler796, TAsyncClient client792, TProtocolFactory protocolFactory793, TNonblockingTransport transport794) throws TException { + super(client792, protocolFactory793, transport794, resultHandler796, false); this.req = req; } @@ -6894,17 +6845,17 @@ public ExecResp getResult() throws TException { } } - public void signOutFTService(SignOutFTServiceReq req, AsyncMethodCallback resultHandler801) throws TException { + public void signOutFTService(SignOutFTServiceReq req, AsyncMethodCallback resultHandler800) throws TException { checkReady(); - signOutFTService_call method_call = new signOutFTService_call(req, resultHandler801, this, ___protocolFactory, ___transport); + signOutFTService_call method_call = new signOutFTService_call(req, resultHandler800, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class signOutFTService_call extends TAsyncMethodCall { private SignOutFTServiceReq req; - public signOutFTService_call(SignOutFTServiceReq req, AsyncMethodCallback resultHandler802, TAsyncClient client798, TProtocolFactory protocolFactory799, TNonblockingTransport transport800) throws TException { - super(client798, protocolFactory799, transport800, resultHandler802, false); + public signOutFTService_call(SignOutFTServiceReq req, AsyncMethodCallback resultHandler801, TAsyncClient client797, TProtocolFactory protocolFactory798, TNonblockingTransport transport799) throws TException { + super(client797, protocolFactory798, transport799, resultHandler801, false); this.req = req; } @@ -6926,17 +6877,17 @@ public ExecResp getResult() throws TException { } } - public void listFTClients(ListFTClientsReq req, AsyncMethodCallback resultHandler806) throws TException { + public void listFTClients(ListFTClientsReq req, AsyncMethodCallback resultHandler805) throws TException { checkReady(); - listFTClients_call method_call = new listFTClients_call(req, resultHandler806, this, ___protocolFactory, ___transport); + listFTClients_call method_call = new listFTClients_call(req, resultHandler805, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listFTClients_call extends TAsyncMethodCall { private ListFTClientsReq req; - public listFTClients_call(ListFTClientsReq req, AsyncMethodCallback resultHandler807, TAsyncClient client803, TProtocolFactory protocolFactory804, TNonblockingTransport transport805) throws TException { - super(client803, protocolFactory804, transport805, resultHandler807, false); + public listFTClients_call(ListFTClientsReq req, AsyncMethodCallback resultHandler806, TAsyncClient client802, TProtocolFactory protocolFactory803, TNonblockingTransport transport804) throws TException { + super(client802, protocolFactory803, transport804, resultHandler806, false); this.req = req; } @@ -6958,17 +6909,17 @@ public ListFTClientsResp getResult() throws TException { } } - public void createFTIndex(CreateFTIndexReq req, AsyncMethodCallback resultHandler811) throws TException { + public void createFTIndex(CreateFTIndexReq req, AsyncMethodCallback resultHandler810) throws TException { checkReady(); - createFTIndex_call method_call = new createFTIndex_call(req, resultHandler811, this, ___protocolFactory, ___transport); + createFTIndex_call method_call = new createFTIndex_call(req, resultHandler810, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createFTIndex_call extends TAsyncMethodCall { private CreateFTIndexReq req; - public createFTIndex_call(CreateFTIndexReq req, AsyncMethodCallback resultHandler812, TAsyncClient client808, TProtocolFactory protocolFactory809, TNonblockingTransport transport810) throws TException { - super(client808, protocolFactory809, transport810, resultHandler812, false); + public createFTIndex_call(CreateFTIndexReq req, AsyncMethodCallback resultHandler811, TAsyncClient client807, TProtocolFactory protocolFactory808, TNonblockingTransport transport809) throws TException { + super(client807, protocolFactory808, transport809, resultHandler811, false); this.req = req; } @@ -6990,17 +6941,17 @@ public ExecResp getResult() throws TException { } } - public void dropFTIndex(DropFTIndexReq req, AsyncMethodCallback resultHandler816) throws TException { + public void dropFTIndex(DropFTIndexReq req, AsyncMethodCallback resultHandler815) throws TException { checkReady(); - dropFTIndex_call method_call = new dropFTIndex_call(req, resultHandler816, this, ___protocolFactory, ___transport); + dropFTIndex_call method_call = new dropFTIndex_call(req, resultHandler815, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropFTIndex_call extends TAsyncMethodCall { private DropFTIndexReq req; - public dropFTIndex_call(DropFTIndexReq req, AsyncMethodCallback resultHandler817, TAsyncClient client813, TProtocolFactory protocolFactory814, TNonblockingTransport transport815) throws TException { - super(client813, protocolFactory814, transport815, resultHandler817, false); + public dropFTIndex_call(DropFTIndexReq req, AsyncMethodCallback resultHandler816, TAsyncClient client812, TProtocolFactory protocolFactory813, TNonblockingTransport transport814) throws TException { + super(client812, protocolFactory813, transport814, resultHandler816, false); this.req = req; } @@ -7022,17 +6973,17 @@ public ExecResp getResult() throws TException { } } - public void listFTIndexes(ListFTIndexesReq req, AsyncMethodCallback resultHandler821) throws TException { + public void listFTIndexes(ListFTIndexesReq req, AsyncMethodCallback resultHandler820) throws TException { checkReady(); - listFTIndexes_call method_call = new listFTIndexes_call(req, resultHandler821, this, ___protocolFactory, ___transport); + listFTIndexes_call method_call = new listFTIndexes_call(req, resultHandler820, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listFTIndexes_call extends TAsyncMethodCall { private ListFTIndexesReq req; - public listFTIndexes_call(ListFTIndexesReq req, AsyncMethodCallback resultHandler822, TAsyncClient client818, TProtocolFactory protocolFactory819, TNonblockingTransport transport820) throws TException { - super(client818, protocolFactory819, transport820, resultHandler822, false); + public listFTIndexes_call(ListFTIndexesReq req, AsyncMethodCallback resultHandler821, TAsyncClient client817, TProtocolFactory protocolFactory818, TNonblockingTransport transport819) throws TException { + super(client817, protocolFactory818, transport819, resultHandler821, false); this.req = req; } @@ -7054,17 +7005,17 @@ public ListFTIndexesResp getResult() throws TException { } } - public void createSession(CreateSessionReq req, AsyncMethodCallback resultHandler826) throws TException { + public void createSession(CreateSessionReq req, AsyncMethodCallback resultHandler825) throws TException { checkReady(); - createSession_call method_call = new createSession_call(req, resultHandler826, this, ___protocolFactory, ___transport); + createSession_call method_call = new createSession_call(req, resultHandler825, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createSession_call extends TAsyncMethodCall { private CreateSessionReq req; - public createSession_call(CreateSessionReq req, AsyncMethodCallback resultHandler827, TAsyncClient client823, TProtocolFactory protocolFactory824, TNonblockingTransport transport825) throws TException { - super(client823, protocolFactory824, transport825, resultHandler827, false); + public createSession_call(CreateSessionReq req, AsyncMethodCallback resultHandler826, TAsyncClient client822, TProtocolFactory protocolFactory823, TNonblockingTransport transport824) throws TException { + super(client822, protocolFactory823, transport824, resultHandler826, false); this.req = req; } @@ -7086,17 +7037,17 @@ public CreateSessionResp getResult() throws TException { } } - public void updateSessions(UpdateSessionsReq req, AsyncMethodCallback resultHandler831) throws TException { + public void updateSessions(UpdateSessionsReq req, AsyncMethodCallback resultHandler830) throws TException { checkReady(); - updateSessions_call method_call = new updateSessions_call(req, resultHandler831, this, ___protocolFactory, ___transport); + updateSessions_call method_call = new updateSessions_call(req, resultHandler830, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class updateSessions_call extends TAsyncMethodCall { private UpdateSessionsReq req; - public updateSessions_call(UpdateSessionsReq req, AsyncMethodCallback resultHandler832, TAsyncClient client828, TProtocolFactory protocolFactory829, TNonblockingTransport transport830) throws TException { - super(client828, protocolFactory829, transport830, resultHandler832, false); + public updateSessions_call(UpdateSessionsReq req, AsyncMethodCallback resultHandler831, TAsyncClient client827, TProtocolFactory protocolFactory828, TNonblockingTransport transport829) throws TException { + super(client827, protocolFactory828, transport829, resultHandler831, false); this.req = req; } @@ -7118,17 +7069,17 @@ public UpdateSessionsResp getResult() throws TException { } } - public void listSessions(ListSessionsReq req, AsyncMethodCallback resultHandler836) throws TException { + public void listSessions(ListSessionsReq req, AsyncMethodCallback resultHandler835) throws TException { checkReady(); - listSessions_call method_call = new listSessions_call(req, resultHandler836, this, ___protocolFactory, ___transport); + listSessions_call method_call = new listSessions_call(req, resultHandler835, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listSessions_call extends TAsyncMethodCall { private ListSessionsReq req; - public listSessions_call(ListSessionsReq req, AsyncMethodCallback resultHandler837, TAsyncClient client833, TProtocolFactory protocolFactory834, TNonblockingTransport transport835) throws TException { - super(client833, protocolFactory834, transport835, resultHandler837, false); + public listSessions_call(ListSessionsReq req, AsyncMethodCallback resultHandler836, TAsyncClient client832, TProtocolFactory protocolFactory833, TNonblockingTransport transport834) throws TException { + super(client832, protocolFactory833, transport834, resultHandler836, false); this.req = req; } @@ -7150,17 +7101,17 @@ public ListSessionsResp getResult() throws TException { } } - public void getSession(GetSessionReq req, AsyncMethodCallback resultHandler841) throws TException { + public void getSession(GetSessionReq req, AsyncMethodCallback resultHandler840) throws TException { checkReady(); - getSession_call method_call = new getSession_call(req, resultHandler841, this, ___protocolFactory, ___transport); + getSession_call method_call = new getSession_call(req, resultHandler840, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getSession_call extends TAsyncMethodCall { private GetSessionReq req; - public getSession_call(GetSessionReq req, AsyncMethodCallback resultHandler842, TAsyncClient client838, TProtocolFactory protocolFactory839, TNonblockingTransport transport840) throws TException { - super(client838, protocolFactory839, transport840, resultHandler842, false); + public getSession_call(GetSessionReq req, AsyncMethodCallback resultHandler841, TAsyncClient client837, TProtocolFactory protocolFactory838, TNonblockingTransport transport839) throws TException { + super(client837, protocolFactory838, transport839, resultHandler841, false); this.req = req; } @@ -7182,17 +7133,17 @@ public GetSessionResp getResult() throws TException { } } - public void removeSession(RemoveSessionReq req, AsyncMethodCallback resultHandler846) throws TException { + public void removeSession(RemoveSessionReq req, AsyncMethodCallback resultHandler845) throws TException { checkReady(); - removeSession_call method_call = new removeSession_call(req, resultHandler846, this, ___protocolFactory, ___transport); + removeSession_call method_call = new removeSession_call(req, resultHandler845, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class removeSession_call extends TAsyncMethodCall { private RemoveSessionReq req; - public removeSession_call(RemoveSessionReq req, AsyncMethodCallback resultHandler847, TAsyncClient client843, TProtocolFactory protocolFactory844, TNonblockingTransport transport845) throws TException { - super(client843, protocolFactory844, transport845, resultHandler847, false); + public removeSession_call(RemoveSessionReq req, AsyncMethodCallback resultHandler846, TAsyncClient client842, TProtocolFactory protocolFactory843, TNonblockingTransport transport844) throws TException { + super(client842, protocolFactory843, transport844, resultHandler846, false); this.req = req; } @@ -7214,17 +7165,17 @@ public ExecResp getResult() throws TException { } } - public void killQuery(KillQueryReq req, AsyncMethodCallback resultHandler851) throws TException { + public void killQuery(KillQueryReq req, AsyncMethodCallback resultHandler850) throws TException { checkReady(); - killQuery_call method_call = new killQuery_call(req, resultHandler851, this, ___protocolFactory, ___transport); + killQuery_call method_call = new killQuery_call(req, resultHandler850, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class killQuery_call extends TAsyncMethodCall { private KillQueryReq req; - public killQuery_call(KillQueryReq req, AsyncMethodCallback resultHandler852, TAsyncClient client848, TProtocolFactory protocolFactory849, TNonblockingTransport transport850) throws TException { - super(client848, protocolFactory849, transport850, resultHandler852, false); + public killQuery_call(KillQueryReq req, AsyncMethodCallback resultHandler851, TAsyncClient client847, TProtocolFactory protocolFactory848, TNonblockingTransport transport849) throws TException { + super(client847, protocolFactory848, transport849, resultHandler851, false); this.req = req; } @@ -7246,17 +7197,17 @@ public ExecResp getResult() throws TException { } } - public void reportTaskFinish(ReportTaskReq req, AsyncMethodCallback resultHandler856) throws TException { + public void reportTaskFinish(ReportTaskReq req, AsyncMethodCallback resultHandler855) throws TException { checkReady(); - reportTaskFinish_call method_call = new reportTaskFinish_call(req, resultHandler856, this, ___protocolFactory, ___transport); + reportTaskFinish_call method_call = new reportTaskFinish_call(req, resultHandler855, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class reportTaskFinish_call extends TAsyncMethodCall { private ReportTaskReq req; - public reportTaskFinish_call(ReportTaskReq req, AsyncMethodCallback resultHandler857, TAsyncClient client853, TProtocolFactory protocolFactory854, TNonblockingTransport transport855) throws TException { - super(client853, protocolFactory854, transport855, resultHandler857, false); + public reportTaskFinish_call(ReportTaskReq req, AsyncMethodCallback resultHandler856, TAsyncClient client852, TProtocolFactory protocolFactory853, TNonblockingTransport transport854) throws TException { + super(client852, protocolFactory853, transport854, resultHandler856, false); this.req = req; } @@ -7278,17 +7229,17 @@ public ExecResp getResult() throws TException { } } - public void listCluster(ListClusterInfoReq req, AsyncMethodCallback resultHandler861) throws TException { + public void listCluster(ListClusterInfoReq req, AsyncMethodCallback resultHandler860) throws TException { checkReady(); - listCluster_call method_call = new listCluster_call(req, resultHandler861, this, ___protocolFactory, ___transport); + listCluster_call method_call = new listCluster_call(req, resultHandler860, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listCluster_call extends TAsyncMethodCall { private ListClusterInfoReq req; - public listCluster_call(ListClusterInfoReq req, AsyncMethodCallback resultHandler862, TAsyncClient client858, TProtocolFactory protocolFactory859, TNonblockingTransport transport860) throws TException { - super(client858, protocolFactory859, transport860, resultHandler862, false); + public listCluster_call(ListClusterInfoReq req, AsyncMethodCallback resultHandler861, TAsyncClient client857, TProtocolFactory protocolFactory858, TNonblockingTransport transport859) throws TException { + super(client857, protocolFactory858, transport859, resultHandler861, false); this.req = req; } @@ -7310,17 +7261,17 @@ public ListClusterInfoResp getResult() throws TException { } } - public void getMetaDirInfo(GetMetaDirInfoReq req, AsyncMethodCallback resultHandler866) throws TException { + public void getMetaDirInfo(GetMetaDirInfoReq req, AsyncMethodCallback resultHandler865) throws TException { checkReady(); - getMetaDirInfo_call method_call = new getMetaDirInfo_call(req, resultHandler866, this, ___protocolFactory, ___transport); + getMetaDirInfo_call method_call = new getMetaDirInfo_call(req, resultHandler865, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getMetaDirInfo_call extends TAsyncMethodCall { private GetMetaDirInfoReq req; - public getMetaDirInfo_call(GetMetaDirInfoReq req, AsyncMethodCallback resultHandler867, TAsyncClient client863, TProtocolFactory protocolFactory864, TNonblockingTransport transport865) throws TException { - super(client863, protocolFactory864, transport865, resultHandler867, false); + public getMetaDirInfo_call(GetMetaDirInfoReq req, AsyncMethodCallback resultHandler866, TAsyncClient client862, TProtocolFactory protocolFactory863, TNonblockingTransport transport864) throws TException { + super(client862, protocolFactory863, transport864, resultHandler866, false); this.req = req; } @@ -7342,38 +7293,6 @@ public GetMetaDirInfoResp getResult() throws TException { } } - public void verifyClientVersion(VerifyClientVersionReq req, AsyncMethodCallback resultHandler871) throws TException { - checkReady(); - verifyClientVersion_call method_call = new verifyClientVersion_call(req, resultHandler871, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class verifyClientVersion_call extends TAsyncMethodCall { - private VerifyClientVersionReq req; - public verifyClientVersion_call(VerifyClientVersionReq req, AsyncMethodCallback resultHandler872, TAsyncClient client868, TProtocolFactory protocolFactory869, TNonblockingTransport transport870) throws TException { - super(client868, protocolFactory869, transport870, resultHandler872, false); - this.req = req; - } - - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("verifyClientVersion", TMessageType.CALL, 0)); - verifyClientVersion_args args = new verifyClientVersion_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - public VerifyClientVersionResp getResult() throws TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_verifyClientVersion(); - } - } - } public static class Processor implements TProcessor { @@ -7471,7 +7390,6 @@ public Processor(Iface iface) processMap_.put("reportTaskFinish", new reportTaskFinish()); processMap_.put("listCluster", new listCluster()); processMap_.put("getMetaDirInfo", new getMetaDirInfo()); - processMap_.put("verifyClientVersion", new verifyClientVersion()); } protected static interface ProcessFunction { @@ -9373,27 +9291,6 @@ public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionCont } - private class verifyClientVersion implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException - { - Object handler_ctx = event_handler_.getContext("MetaService.verifyClientVersion", server_ctx); - verifyClientVersion_args args = new verifyClientVersion_args(); - event_handler_.preRead(handler_ctx, "MetaService.verifyClientVersion"); - args.read(iprot); - iprot.readMessageEnd(); - event_handler_.postRead(handler_ctx, "MetaService.verifyClientVersion", args); - verifyClientVersion_result result = new verifyClientVersion_result(); - result.success = iface_.verifyClientVersion(args.req); - event_handler_.preWrite(handler_ctx, "MetaService.verifyClientVersion", result); - oprot.writeMessageBegin(new TMessage("verifyClientVersion", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - event_handler_.postWrite(handler_ctx, "MetaService.verifyClientVersion", result); - } - - } - } public static class createSpace_args implements TBase, java.io.Serializable, Cloneable, Comparable { @@ -47904,439 +47801,4 @@ public void validate() throws TException { } - public static class verifyClientVersion_args implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("verifyClientVersion_args"); - private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1); - - public VerifyClientVersionReq req; - public static final int REQ = 1; - - // isset id assignments - - public static final Map metaDataMap; - - static { - Map tmpMetaDataMap = new HashMap(); - tmpMetaDataMap.put(REQ, new FieldMetaData("req", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, VerifyClientVersionReq.class))); - metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); - } - - static { - FieldMetaData.addStructMetaDataMap(verifyClientVersion_args.class, metaDataMap); - } - - public verifyClientVersion_args() { - } - - public verifyClientVersion_args( - VerifyClientVersionReq req) { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public verifyClientVersion_args(verifyClientVersion_args other) { - if (other.isSetReq()) { - this.req = TBaseHelper.deepCopy(other.req); - } - } - - public verifyClientVersion_args deepCopy() { - return new verifyClientVersion_args(this); - } - - public VerifyClientVersionReq getReq() { - return this.req; - } - - public verifyClientVersion_args setReq(VerifyClientVersionReq req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - // Returns true if field req is set (has been assigned a value) and false otherwise - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean __value) { - if (!__value) { - this.req = null; - } - } - - public void setFieldValue(int fieldID, Object __value) { - switch (fieldID) { - case REQ: - if (__value == null) { - unsetReq(); - } else { - setReq((VerifyClientVersionReq)__value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case REQ: - return getReq(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object _that) { - if (_that == null) - return false; - if (this == _that) - return true; - if (!(_that instanceof verifyClientVersion_args)) - return false; - verifyClientVersion_args that = (verifyClientVersion_args)_that; - - if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; } - - return true; - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(new Object[] {req}); - } - - @Override - public int compareTo(verifyClientVersion_args other) { - if (other == null) { - // See java.lang.Comparable docs - throw new NullPointerException(); - } - - if (other == this) { - return 0; - } - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(req, other.req); - if (lastComparison != 0) { - return lastComparison; - } - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField __field; - iprot.readStructBegin(metaDataMap); - while (true) - { - __field = iprot.readFieldBegin(); - if (__field.type == TType.STOP) { - break; - } - switch (__field.id) - { - case REQ: - if (__field.type == TType.STRUCT) { - this.req = new VerifyClientVersionReq(); - this.req.read(iprot); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - default: - TProtocolUtil.skip(iprot, __field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - this.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - return toString(1, true); - } - - @Override - public String toString(int indent, boolean prettyPrint) { - String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; - String newLine = prettyPrint ? "\n" : ""; - String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("verifyClientVersion_args"); - sb.append(space); - sb.append("("); - sb.append(newLine); - boolean first = true; - - sb.append(indentStr); - sb.append("req"); - sb.append(space); - sb.append(":").append(space); - if (this.getReq() == null) { - sb.append("null"); - } else { - sb.append(TBaseHelper.toString(this.getReq(), indent + 1, prettyPrint)); - } - first = false; - sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - } - - } - - public static class verifyClientVersion_result implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("verifyClientVersion_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - - public VerifyClientVersionResp success; - public static final int SUCCESS = 0; - - // isset id assignments - - public static final Map metaDataMap; - - static { - Map tmpMetaDataMap = new HashMap(); - tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, VerifyClientVersionResp.class))); - metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); - } - - static { - FieldMetaData.addStructMetaDataMap(verifyClientVersion_result.class, metaDataMap); - } - - public verifyClientVersion_result() { - } - - public verifyClientVersion_result( - VerifyClientVersionResp success) { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public verifyClientVersion_result(verifyClientVersion_result other) { - if (other.isSetSuccess()) { - this.success = TBaseHelper.deepCopy(other.success); - } - } - - public verifyClientVersion_result deepCopy() { - return new verifyClientVersion_result(this); - } - - public VerifyClientVersionResp getSuccess() { - return this.success; - } - - public verifyClientVersion_result setSuccess(VerifyClientVersionResp 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 void setFieldValue(int fieldID, Object __value) { - switch (fieldID) { - case SUCCESS: - if (__value == null) { - unsetSuccess(); - } else { - setSuccess((VerifyClientVersionResp)__value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object _that) { - if (_that == null) - return false; - if (this == _that) - return true; - if (!(_that instanceof verifyClientVersion_result)) - return false; - verifyClientVersion_result that = (verifyClientVersion_result)_that; - - if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; } - - return true; - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(new Object[] {success}); - } - - @Override - public int compareTo(verifyClientVersion_result other) { - if (other == null) { - // See java.lang.Comparable docs - throw new NullPointerException(); - } - - if (other == this) { - return 0; - } - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(success, other.success); - if (lastComparison != 0) { - return lastComparison; - } - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField __field; - iprot.readStructBegin(metaDataMap); - while (true) - { - __field = iprot.readFieldBegin(); - if (__field.type == TType.STOP) { - break; - } - switch (__field.id) - { - case SUCCESS: - if (__field.type == TType.STRUCT) { - this.success = new VerifyClientVersionResp(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - default: - TProtocolUtil.skip(iprot, __field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - return toString(1, true); - } - - @Override - public String toString(int indent, boolean prettyPrint) { - String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; - String newLine = prettyPrint ? "\n" : ""; - String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("verifyClientVersion_result"); - sb.append(space); - sb.append("("); - sb.append(newLine); - boolean first = true; - - sb.append(indentStr); - sb.append("success"); - sb.append(space); - sb.append(":").append(space); - if (this.getSuccess() == null) { - sb.append("null"); - } else { - sb.append(TBaseHelper.toString(this.getSuccess(), indent + 1, prettyPrint)); - } - first = false; - sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - } - - } - } diff --git a/client/src/main/generated/com/vesoft/nebula/meta/PropertyType.java b/client/src/main/generated/com/vesoft/nebula/meta/PropertyType.java index fc77cc24b..52262fbe4 100644 --- a/client/src/main/generated/com/vesoft/nebula/meta/PropertyType.java +++ b/client/src/main/generated/com/vesoft/nebula/meta/PropertyType.java @@ -27,8 +27,7 @@ public enum PropertyType implements com.facebook.thrift.TEnum { TIMESTAMP(21), DATE(24), DATETIME(25), - TIME(26), - GEOGRAPHY(31); + TIME(26); private final int value; @@ -79,8 +78,6 @@ public static PropertyType findByValue(int value) { return DATETIME; case 26: return TIME; - case 31: - return GEOGRAPHY; default: return null; } diff --git a/client/src/main/generated/com/vesoft/nebula/meta/VerifyClientVersionReq.java b/client/src/main/generated/com/vesoft/nebula/meta/VerifyClientVersionReq.java deleted file mode 100644 index 384c0e95c..000000000 --- a/client/src/main/generated/com/vesoft/nebula/meta/VerifyClientVersionReq.java +++ /dev/null @@ -1,275 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.vesoft.nebula.meta; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import java.util.BitSet; -import java.util.Arrays; -import com.facebook.thrift.*; -import com.facebook.thrift.annotations.*; -import com.facebook.thrift.async.*; -import com.facebook.thrift.meta_data.*; -import com.facebook.thrift.server.*; -import com.facebook.thrift.transport.*; -import com.facebook.thrift.protocol.*; - -@SuppressWarnings({ "unused", "serial" }) -public class VerifyClientVersionReq implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("VerifyClientVersionReq"); - private static final TField VERSION_FIELD_DESC = new TField("version", TType.STRING, (short)1); - - public byte[] version; - public static final int VERSION = 1; - - // isset id assignments - - public static final Map metaDataMap; - - static { - Map tmpMetaDataMap = new HashMap(); - tmpMetaDataMap.put(VERSION, new FieldMetaData("version", TFieldRequirementType.REQUIRED, - new FieldValueMetaData(TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); - } - - static { - FieldMetaData.addStructMetaDataMap(VerifyClientVersionReq.class, metaDataMap); - } - - public VerifyClientVersionReq() { - this.version = "2.6.0".getBytes(); - - } - - public VerifyClientVersionReq( - byte[] version) { - this(); - this.version = version; - } - - public static class Builder { - private byte[] version; - - public Builder() { - } - - public Builder setVersion(final byte[] version) { - this.version = version; - return this; - } - - public VerifyClientVersionReq build() { - VerifyClientVersionReq result = new VerifyClientVersionReq(); - result.setVersion(this.version); - return result; - } - } - - public static Builder builder() { - return new Builder(); - } - - /** - * Performs a deep copy on other. - */ - public VerifyClientVersionReq(VerifyClientVersionReq other) { - if (other.isSetVersion()) { - this.version = TBaseHelper.deepCopy(other.version); - } - } - - public VerifyClientVersionReq deepCopy() { - return new VerifyClientVersionReq(this); - } - - public byte[] getVersion() { - return this.version; - } - - public VerifyClientVersionReq setVersion(byte[] 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(int fieldID, Object __value) { - switch (fieldID) { - case VERSION: - if (__value == null) { - unsetVersion(); - } else { - setVersion((byte[])__value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case VERSION: - return getVersion(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object _that) { - if (_that == null) - return false; - if (this == _that) - return true; - if (!(_that instanceof VerifyClientVersionReq)) - return false; - VerifyClientVersionReq that = (VerifyClientVersionReq)_that; - - if (!TBaseHelper.equalsSlow(this.isSetVersion(), that.isSetVersion(), this.version, that.version)) { return false; } - - return true; - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(new Object[] {version}); - } - - @Override - public int compareTo(VerifyClientVersionReq other) { - if (other == null) { - // See java.lang.Comparable docs - throw new NullPointerException(); - } - - if (other == this) { - return 0; - } - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(version, other.version); - if (lastComparison != 0) { - return lastComparison; - } - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField __field; - iprot.readStructBegin(metaDataMap); - while (true) - { - __field = iprot.readFieldBegin(); - if (__field.type == TType.STOP) { - break; - } - switch (__field.id) - { - case VERSION: - if (__field.type == TType.STRING) { - this.version = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - default: - TProtocolUtil.skip(iprot, __field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.version != null) { - oprot.writeFieldBegin(VERSION_FIELD_DESC); - oprot.writeBinary(this.version); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - return toString(1, true); - } - - @Override - public String toString(int indent, boolean prettyPrint) { - String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; - String newLine = prettyPrint ? "\n" : ""; - String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("VerifyClientVersionReq"); - sb.append(space); - sb.append("("); - sb.append(newLine); - boolean first = true; - - sb.append(indentStr); - sb.append("version"); - sb.append(space); - sb.append(":").append(space); - if (this.getVersion() == null) { - sb.append("null"); - } else { - int __version_size = Math.min(this.getVersion().length, 128); - for (int i = 0; i < __version_size; i++) { - if (i != 0) sb.append(" "); - sb.append(Integer.toHexString(this.getVersion()[i]).length() > 1 ? Integer.toHexString(this.getVersion()[i]).substring(Integer.toHexString(this.getVersion()[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.getVersion()[i]).toUpperCase()); - } - if (this.getVersion().length > 128) sb.append(" ..."); - } - first = false; - sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - if (version == null) { - throw new TProtocolException(TProtocolException.MISSING_REQUIRED_FIELD, "Required field 'version' was not present! Struct: " + toString()); - } - } - -} - diff --git a/client/src/main/generated/com/vesoft/nebula/meta/VerifyClientVersionResp.java b/client/src/main/generated/com/vesoft/nebula/meta/VerifyClientVersionResp.java deleted file mode 100644 index aec55d70f..000000000 --- a/client/src/main/generated/com/vesoft/nebula/meta/VerifyClientVersionResp.java +++ /dev/null @@ -1,474 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.vesoft.nebula.meta; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import java.util.BitSet; -import java.util.Arrays; -import com.facebook.thrift.*; -import com.facebook.thrift.annotations.*; -import com.facebook.thrift.async.*; -import com.facebook.thrift.meta_data.*; -import com.facebook.thrift.server.*; -import com.facebook.thrift.transport.*; -import com.facebook.thrift.protocol.*; - -@SuppressWarnings({ "unused", "serial" }) -public class VerifyClientVersionResp implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("VerifyClientVersionResp"); - private static final TField CODE_FIELD_DESC = new TField("code", TType.I32, (short)1); - private static final TField LEADER_FIELD_DESC = new TField("leader", TType.STRUCT, (short)2); - private static final TField ERROR_MSG_FIELD_DESC = new TField("error_msg", TType.STRING, (short)3); - - /** - * - * @see com.vesoft.nebula.ErrorCode - */ - public com.vesoft.nebula.ErrorCode code; - public com.vesoft.nebula.HostAddr leader; - public byte[] error_msg; - public static final int CODE = 1; - public static final int LEADER = 2; - public static final int ERROR_MSG = 3; - - // isset id assignments - - public static final Map metaDataMap; - - static { - Map tmpMetaDataMap = new HashMap(); - tmpMetaDataMap.put(CODE, new FieldMetaData("code", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - tmpMetaDataMap.put(LEADER, new FieldMetaData("leader", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.vesoft.nebula.HostAddr.class))); - tmpMetaDataMap.put(ERROR_MSG, new FieldMetaData("error_msg", TFieldRequirementType.OPTIONAL, - new FieldValueMetaData(TType.STRING))); - metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); - } - - static { - FieldMetaData.addStructMetaDataMap(VerifyClientVersionResp.class, metaDataMap); - } - - public VerifyClientVersionResp() { - } - - public VerifyClientVersionResp( - com.vesoft.nebula.ErrorCode code, - com.vesoft.nebula.HostAddr leader) { - this(); - this.code = code; - this.leader = leader; - } - - public VerifyClientVersionResp( - com.vesoft.nebula.ErrorCode code, - com.vesoft.nebula.HostAddr leader, - byte[] error_msg) { - this(); - this.code = code; - this.leader = leader; - this.error_msg = error_msg; - } - - public static class Builder { - private com.vesoft.nebula.ErrorCode code; - private com.vesoft.nebula.HostAddr leader; - private byte[] error_msg; - - public Builder() { - } - - public Builder setCode(final com.vesoft.nebula.ErrorCode code) { - this.code = code; - return this; - } - - public Builder setLeader(final com.vesoft.nebula.HostAddr leader) { - this.leader = leader; - return this; - } - - public Builder setError_msg(final byte[] error_msg) { - this.error_msg = error_msg; - return this; - } - - public VerifyClientVersionResp build() { - VerifyClientVersionResp result = new VerifyClientVersionResp(); - result.setCode(this.code); - result.setLeader(this.leader); - result.setError_msg(this.error_msg); - return result; - } - } - - public static Builder builder() { - return new Builder(); - } - - /** - * Performs a deep copy on other. - */ - public VerifyClientVersionResp(VerifyClientVersionResp other) { - if (other.isSetCode()) { - this.code = TBaseHelper.deepCopy(other.code); - } - if (other.isSetLeader()) { - this.leader = TBaseHelper.deepCopy(other.leader); - } - if (other.isSetError_msg()) { - this.error_msg = TBaseHelper.deepCopy(other.error_msg); - } - } - - public VerifyClientVersionResp deepCopy() { - return new VerifyClientVersionResp(this); - } - - /** - * - * @see com.vesoft.nebula.ErrorCode - */ - public com.vesoft.nebula.ErrorCode getCode() { - return this.code; - } - - /** - * - * @see com.vesoft.nebula.ErrorCode - */ - public VerifyClientVersionResp setCode(com.vesoft.nebula.ErrorCode code) { - this.code = code; - return this; - } - - public void unsetCode() { - this.code = null; - } - - // Returns true if field code is set (has been assigned a value) and false otherwise - public boolean isSetCode() { - return this.code != null; - } - - public void setCodeIsSet(boolean __value) { - if (!__value) { - this.code = null; - } - } - - public com.vesoft.nebula.HostAddr getLeader() { - return this.leader; - } - - public VerifyClientVersionResp setLeader(com.vesoft.nebula.HostAddr leader) { - this.leader = leader; - return this; - } - - public void unsetLeader() { - this.leader = null; - } - - // Returns true if field leader is set (has been assigned a value) and false otherwise - public boolean isSetLeader() { - return this.leader != null; - } - - public void setLeaderIsSet(boolean __value) { - if (!__value) { - this.leader = null; - } - } - - public byte[] getError_msg() { - return this.error_msg; - } - - public VerifyClientVersionResp setError_msg(byte[] error_msg) { - this.error_msg = error_msg; - return this; - } - - public void unsetError_msg() { - this.error_msg = null; - } - - // Returns true if field error_msg is set (has been assigned a value) and false otherwise - public boolean isSetError_msg() { - return this.error_msg != null; - } - - public void setError_msgIsSet(boolean __value) { - if (!__value) { - this.error_msg = null; - } - } - - public void setFieldValue(int fieldID, Object __value) { - switch (fieldID) { - case CODE: - if (__value == null) { - unsetCode(); - } else { - setCode((com.vesoft.nebula.ErrorCode)__value); - } - break; - - case LEADER: - if (__value == null) { - unsetLeader(); - } else { - setLeader((com.vesoft.nebula.HostAddr)__value); - } - break; - - case ERROR_MSG: - if (__value == null) { - unsetError_msg(); - } else { - setError_msg((byte[])__value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case CODE: - return getCode(); - - case LEADER: - return getLeader(); - - case ERROR_MSG: - return getError_msg(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object _that) { - if (_that == null) - return false; - if (this == _that) - return true; - if (!(_that instanceof VerifyClientVersionResp)) - return false; - VerifyClientVersionResp that = (VerifyClientVersionResp)_that; - - if (!TBaseHelper.equalsNobinary(this.isSetCode(), that.isSetCode(), this.code, that.code)) { return false; } - - if (!TBaseHelper.equalsNobinary(this.isSetLeader(), that.isSetLeader(), this.leader, that.leader)) { return false; } - - if (!TBaseHelper.equalsSlow(this.isSetError_msg(), that.isSetError_msg(), this.error_msg, that.error_msg)) { return false; } - - return true; - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(new Object[] {code, leader, error_msg}); - } - - @Override - public int compareTo(VerifyClientVersionResp other) { - if (other == null) { - // See java.lang.Comparable docs - throw new NullPointerException(); - } - - if (other == this) { - return 0; - } - int lastComparison = 0; - - lastComparison = Boolean.valueOf(isSetCode()).compareTo(other.isSetCode()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(code, other.code); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = Boolean.valueOf(isSetLeader()).compareTo(other.isSetLeader()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(leader, other.leader); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = Boolean.valueOf(isSetError_msg()).compareTo(other.isSetError_msg()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(error_msg, other.error_msg); - if (lastComparison != 0) { - return lastComparison; - } - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField __field; - iprot.readStructBegin(metaDataMap); - while (true) - { - __field = iprot.readFieldBegin(); - if (__field.type == TType.STOP) { - break; - } - switch (__field.id) - { - case CODE: - if (__field.type == TType.I32) { - this.code = com.vesoft.nebula.ErrorCode.findByValue(iprot.readI32()); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - case LEADER: - if (__field.type == TType.STRUCT) { - this.leader = new com.vesoft.nebula.HostAddr(); - this.leader.read(iprot); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - case ERROR_MSG: - if (__field.type == TType.STRING) { - this.error_msg = iprot.readBinary(); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - default: - TProtocolUtil.skip(iprot, __field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.code != null) { - oprot.writeFieldBegin(CODE_FIELD_DESC); - oprot.writeI32(this.code == null ? 0 : this.code.getValue()); - oprot.writeFieldEnd(); - } - if (this.leader != null) { - oprot.writeFieldBegin(LEADER_FIELD_DESC); - this.leader.write(oprot); - oprot.writeFieldEnd(); - } - if (this.error_msg != null) { - if (isSetError_msg()) { - oprot.writeFieldBegin(ERROR_MSG_FIELD_DESC); - oprot.writeBinary(this.error_msg); - oprot.writeFieldEnd(); - } - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - return toString(1, true); - } - - @Override - public String toString(int indent, boolean prettyPrint) { - String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; - String newLine = prettyPrint ? "\n" : ""; - String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("VerifyClientVersionResp"); - sb.append(space); - sb.append("("); - sb.append(newLine); - boolean first = true; - - sb.append(indentStr); - sb.append("code"); - sb.append(space); - sb.append(":").append(space); - if (this.getCode() == null) { - sb.append("null"); - } else { - String code_name = this.getCode() == null ? "null" : this.getCode().name(); - if (code_name != null) { - sb.append(code_name); - sb.append(" ("); - } - sb.append(this.getCode()); - if (code_name != null) { - sb.append(")"); - } - } - first = false; - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("leader"); - sb.append(space); - sb.append(":").append(space); - if (this.getLeader() == null) { - sb.append("null"); - } else { - sb.append(TBaseHelper.toString(this.getLeader(), indent + 1, prettyPrint)); - } - first = false; - if (isSetError_msg()) - { - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("error_msg"); - sb.append(space); - sb.append(":").append(space); - if (this.getError_msg() == null) { - sb.append("null"); - } else { - int __error_msg_size = Math.min(this.getError_msg().length, 128); - for (int i = 0; i < __error_msg_size; i++) { - if (i != 0) sb.append(" "); - sb.append(Integer.toHexString(this.getError_msg()[i]).length() > 1 ? Integer.toHexString(this.getError_msg()[i]).substring(Integer.toHexString(this.getError_msg()[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.getError_msg()[i]).toUpperCase()); - } - if (this.getError_msg().length > 128) sb.append(" ..."); - } - first = false; - } - sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - } - -} - diff --git a/client/src/main/generated/com/vesoft/nebula/storage/ChainAddEdgesRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/ChainAddEdgesRequest.java deleted file mode 100644 index 60e78656c..000000000 --- a/client/src/main/generated/com/vesoft/nebula/storage/ChainAddEdgesRequest.java +++ /dev/null @@ -1,705 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.vesoft.nebula.storage; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import java.util.BitSet; -import java.util.Arrays; -import com.facebook.thrift.*; -import com.facebook.thrift.annotations.*; -import com.facebook.thrift.async.*; -import com.facebook.thrift.meta_data.*; -import com.facebook.thrift.server.*; -import com.facebook.thrift.transport.*; -import com.facebook.thrift.protocol.*; - -@SuppressWarnings({ "unused", "serial" }) -public class ChainAddEdgesRequest implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("ChainAddEdgesRequest"); - private static final TField SPACE_ID_FIELD_DESC = new TField("space_id", TType.I32, (short)1); - private static final TField PARTS_FIELD_DESC = new TField("parts", TType.MAP, (short)2); - private static final TField PROP_NAMES_FIELD_DESC = new TField("prop_names", TType.LIST, (short)3); - private static final TField IF_NOT_EXISTS_FIELD_DESC = new TField("if_not_exists", TType.BOOL, (short)4); - private static final TField TERM_FIELD_DESC = new TField("term", TType.I64, (short)5); - private static final TField EDGE_VERSION_FIELD_DESC = new TField("edge_version", TType.I64, (short)6); - - public int space_id; - public Map> parts; - public List prop_names; - public boolean if_not_exists; - public long term; - public long edge_version; - public static final int SPACE_ID = 1; - public static final int PARTS = 2; - public static final int PROP_NAMES = 3; - public static final int IF_NOT_EXISTS = 4; - public static final int TERM = 5; - public static final int EDGE_VERSION = 6; - - // isset id assignments - private static final int __SPACE_ID_ISSET_ID = 0; - private static final int __IF_NOT_EXISTS_ISSET_ID = 1; - private static final int __TERM_ISSET_ID = 2; - private static final int __EDGE_VERSION_ISSET_ID = 3; - private BitSet __isset_bit_vector = new BitSet(4); - - public static final Map metaDataMap; - - static { - Map tmpMetaDataMap = new HashMap(); - tmpMetaDataMap.put(SPACE_ID, new FieldMetaData("space_id", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - tmpMetaDataMap.put(PARTS, new FieldMetaData("parts", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.I32), - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, NewEdge.class))))); - tmpMetaDataMap.put(PROP_NAMES, new FieldMetaData("prop_names", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - tmpMetaDataMap.put(IF_NOT_EXISTS, new FieldMetaData("if_not_exists", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - tmpMetaDataMap.put(TERM, new FieldMetaData("term", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I64))); - tmpMetaDataMap.put(EDGE_VERSION, new FieldMetaData("edge_version", TFieldRequirementType.OPTIONAL, - new FieldValueMetaData(TType.I64))); - metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); - } - - static { - FieldMetaData.addStructMetaDataMap(ChainAddEdgesRequest.class, metaDataMap); - } - - public ChainAddEdgesRequest() { - } - - public ChainAddEdgesRequest( - int space_id, - Map> parts, - List prop_names, - boolean if_not_exists, - long term) { - this(); - this.space_id = space_id; - setSpace_idIsSet(true); - this.parts = parts; - this.prop_names = prop_names; - this.if_not_exists = if_not_exists; - setIf_not_existsIsSet(true); - this.term = term; - setTermIsSet(true); - } - - public ChainAddEdgesRequest( - int space_id, - Map> parts, - List prop_names, - boolean if_not_exists, - long term, - long edge_version) { - this(); - this.space_id = space_id; - setSpace_idIsSet(true); - this.parts = parts; - this.prop_names = prop_names; - this.if_not_exists = if_not_exists; - setIf_not_existsIsSet(true); - this.term = term; - setTermIsSet(true); - this.edge_version = edge_version; - setEdge_versionIsSet(true); - } - - public static class Builder { - private int space_id; - private Map> parts; - private List prop_names; - private boolean if_not_exists; - private long term; - private long edge_version; - - BitSet __optional_isset = new BitSet(4); - - public Builder() { - } - - public Builder setSpace_id(final int space_id) { - this.space_id = space_id; - __optional_isset.set(__SPACE_ID_ISSET_ID, true); - return this; - } - - public Builder setParts(final Map> parts) { - this.parts = parts; - return this; - } - - public Builder setProp_names(final List prop_names) { - this.prop_names = prop_names; - return this; - } - - public Builder setIf_not_exists(final boolean if_not_exists) { - this.if_not_exists = if_not_exists; - __optional_isset.set(__IF_NOT_EXISTS_ISSET_ID, true); - return this; - } - - public Builder setTerm(final long term) { - this.term = term; - __optional_isset.set(__TERM_ISSET_ID, true); - return this; - } - - public Builder setEdge_version(final long edge_version) { - this.edge_version = edge_version; - __optional_isset.set(__EDGE_VERSION_ISSET_ID, true); - return this; - } - - public ChainAddEdgesRequest build() { - ChainAddEdgesRequest result = new ChainAddEdgesRequest(); - if (__optional_isset.get(__SPACE_ID_ISSET_ID)) { - result.setSpace_id(this.space_id); - } - result.setParts(this.parts); - result.setProp_names(this.prop_names); - if (__optional_isset.get(__IF_NOT_EXISTS_ISSET_ID)) { - result.setIf_not_exists(this.if_not_exists); - } - if (__optional_isset.get(__TERM_ISSET_ID)) { - result.setTerm(this.term); - } - if (__optional_isset.get(__EDGE_VERSION_ISSET_ID)) { - result.setEdge_version(this.edge_version); - } - return result; - } - } - - public static Builder builder() { - return new Builder(); - } - - /** - * Performs a deep copy on other. - */ - public ChainAddEdgesRequest(ChainAddEdgesRequest other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - this.space_id = TBaseHelper.deepCopy(other.space_id); - if (other.isSetParts()) { - this.parts = TBaseHelper.deepCopy(other.parts); - } - if (other.isSetProp_names()) { - this.prop_names = TBaseHelper.deepCopy(other.prop_names); - } - this.if_not_exists = TBaseHelper.deepCopy(other.if_not_exists); - this.term = TBaseHelper.deepCopy(other.term); - this.edge_version = TBaseHelper.deepCopy(other.edge_version); - } - - public ChainAddEdgesRequest deepCopy() { - return new ChainAddEdgesRequest(this); - } - - public int getSpace_id() { - return this.space_id; - } - - public ChainAddEdgesRequest setSpace_id(int space_id) { - this.space_id = space_id; - setSpace_idIsSet(true); - return this; - } - - public void unsetSpace_id() { - __isset_bit_vector.clear(__SPACE_ID_ISSET_ID); - } - - // Returns true if field space_id is set (has been assigned a value) and false otherwise - public boolean isSetSpace_id() { - return __isset_bit_vector.get(__SPACE_ID_ISSET_ID); - } - - public void setSpace_idIsSet(boolean __value) { - __isset_bit_vector.set(__SPACE_ID_ISSET_ID, __value); - } - - public Map> getParts() { - return this.parts; - } - - public ChainAddEdgesRequest setParts(Map> parts) { - this.parts = parts; - return this; - } - - public void unsetParts() { - this.parts = null; - } - - // Returns true if field parts is set (has been assigned a value) and false otherwise - public boolean isSetParts() { - return this.parts != null; - } - - public void setPartsIsSet(boolean __value) { - if (!__value) { - this.parts = null; - } - } - - public List getProp_names() { - return this.prop_names; - } - - public ChainAddEdgesRequest setProp_names(List prop_names) { - this.prop_names = prop_names; - return this; - } - - public void unsetProp_names() { - this.prop_names = null; - } - - // Returns true if field prop_names is set (has been assigned a value) and false otherwise - public boolean isSetProp_names() { - return this.prop_names != null; - } - - public void setProp_namesIsSet(boolean __value) { - if (!__value) { - this.prop_names = null; - } - } - - public boolean isIf_not_exists() { - return this.if_not_exists; - } - - public ChainAddEdgesRequest setIf_not_exists(boolean if_not_exists) { - this.if_not_exists = if_not_exists; - setIf_not_existsIsSet(true); - return this; - } - - public void unsetIf_not_exists() { - __isset_bit_vector.clear(__IF_NOT_EXISTS_ISSET_ID); - } - - // Returns true if field if_not_exists is set (has been assigned a value) and false otherwise - public boolean isSetIf_not_exists() { - return __isset_bit_vector.get(__IF_NOT_EXISTS_ISSET_ID); - } - - public void setIf_not_existsIsSet(boolean __value) { - __isset_bit_vector.set(__IF_NOT_EXISTS_ISSET_ID, __value); - } - - public long getTerm() { - return this.term; - } - - public ChainAddEdgesRequest setTerm(long term) { - this.term = term; - setTermIsSet(true); - return this; - } - - public void unsetTerm() { - __isset_bit_vector.clear(__TERM_ISSET_ID); - } - - // Returns true if field term is set (has been assigned a value) and false otherwise - public boolean isSetTerm() { - return __isset_bit_vector.get(__TERM_ISSET_ID); - } - - public void setTermIsSet(boolean __value) { - __isset_bit_vector.set(__TERM_ISSET_ID, __value); - } - - public long getEdge_version() { - return this.edge_version; - } - - public ChainAddEdgesRequest setEdge_version(long edge_version) { - this.edge_version = edge_version; - setEdge_versionIsSet(true); - return this; - } - - public void unsetEdge_version() { - __isset_bit_vector.clear(__EDGE_VERSION_ISSET_ID); - } - - // Returns true if field edge_version is set (has been assigned a value) and false otherwise - public boolean isSetEdge_version() { - return __isset_bit_vector.get(__EDGE_VERSION_ISSET_ID); - } - - public void setEdge_versionIsSet(boolean __value) { - __isset_bit_vector.set(__EDGE_VERSION_ISSET_ID, __value); - } - - @SuppressWarnings("unchecked") - public void setFieldValue(int fieldID, Object __value) { - switch (fieldID) { - case SPACE_ID: - if (__value == null) { - unsetSpace_id(); - } else { - setSpace_id((Integer)__value); - } - break; - - case PARTS: - if (__value == null) { - unsetParts(); - } else { - setParts((Map>)__value); - } - break; - - case PROP_NAMES: - if (__value == null) { - unsetProp_names(); - } else { - setProp_names((List)__value); - } - break; - - case IF_NOT_EXISTS: - if (__value == null) { - unsetIf_not_exists(); - } else { - setIf_not_exists((Boolean)__value); - } - break; - - case TERM: - if (__value == null) { - unsetTerm(); - } else { - setTerm((Long)__value); - } - break; - - case EDGE_VERSION: - if (__value == null) { - unsetEdge_version(); - } else { - setEdge_version((Long)__value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SPACE_ID: - return new Integer(getSpace_id()); - - case PARTS: - return getParts(); - - case PROP_NAMES: - return getProp_names(); - - case IF_NOT_EXISTS: - return new Boolean(isIf_not_exists()); - - case TERM: - return new Long(getTerm()); - - case EDGE_VERSION: - return new Long(getEdge_version()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object _that) { - if (_that == null) - return false; - if (this == _that) - return true; - if (!(_that instanceof ChainAddEdgesRequest)) - return false; - ChainAddEdgesRequest that = (ChainAddEdgesRequest)_that; - - if (!TBaseHelper.equalsNobinary(this.space_id, that.space_id)) { return false; } - - if (!TBaseHelper.equalsNobinary(this.isSetParts(), that.isSetParts(), this.parts, that.parts)) { return false; } - - if (!TBaseHelper.equalsSlow(this.isSetProp_names(), that.isSetProp_names(), this.prop_names, that.prop_names)) { return false; } - - if (!TBaseHelper.equalsNobinary(this.if_not_exists, that.if_not_exists)) { return false; } - - if (!TBaseHelper.equalsNobinary(this.term, that.term)) { return false; } - - if (!TBaseHelper.equalsNobinary(this.isSetEdge_version(), that.isSetEdge_version(), this.edge_version, that.edge_version)) { return false; } - - return true; - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(new Object[] {space_id, parts, prop_names, if_not_exists, term, edge_version}); - } - - public void read(TProtocol iprot) throws TException { - TField __field; - iprot.readStructBegin(metaDataMap); - while (true) - { - __field = iprot.readFieldBegin(); - if (__field.type == TType.STOP) { - break; - } - switch (__field.id) - { - case SPACE_ID: - if (__field.type == TType.I32) { - this.space_id = iprot.readI32(); - setSpace_idIsSet(true); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - case PARTS: - if (__field.type == TType.MAP) { - { - TMap _map268 = iprot.readMapBegin(); - this.parts = new HashMap>(Math.max(0, 2*_map268.size)); - for (int _i269 = 0; - (_map268.size < 0) ? iprot.peekMap() : (_i269 < _map268.size); - ++_i269) - { - int _key270; - List _val271; - _key270 = iprot.readI32(); - { - TList _list272 = iprot.readListBegin(); - _val271 = new ArrayList(Math.max(0, _list272.size)); - for (int _i273 = 0; - (_list272.size < 0) ? iprot.peekList() : (_i273 < _list272.size); - ++_i273) - { - NewEdge _elem274; - _elem274 = new NewEdge(); - _elem274.read(iprot); - _val271.add(_elem274); - } - iprot.readListEnd(); - } - this.parts.put(_key270, _val271); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - case PROP_NAMES: - if (__field.type == TType.LIST) { - { - TList _list275 = iprot.readListBegin(); - this.prop_names = new ArrayList(Math.max(0, _list275.size)); - for (int _i276 = 0; - (_list275.size < 0) ? iprot.peekList() : (_i276 < _list275.size); - ++_i276) - { - byte[] _elem277; - _elem277 = iprot.readBinary(); - this.prop_names.add(_elem277); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - case IF_NOT_EXISTS: - if (__field.type == TType.BOOL) { - this.if_not_exists = iprot.readBool(); - setIf_not_existsIsSet(true); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - case TERM: - if (__field.type == TType.I64) { - this.term = iprot.readI64(); - setTermIsSet(true); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - case EDGE_VERSION: - if (__field.type == TType.I64) { - this.edge_version = iprot.readI64(); - setEdge_versionIsSet(true); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - default: - TProtocolUtil.skip(iprot, __field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(SPACE_ID_FIELD_DESC); - oprot.writeI32(this.space_id); - oprot.writeFieldEnd(); - if (this.parts != null) { - oprot.writeFieldBegin(PARTS_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.I32, TType.LIST, this.parts.size())); - for (Map.Entry> _iter278 : this.parts.entrySet()) { - oprot.writeI32(_iter278.getKey()); - { - oprot.writeListBegin(new TList(TType.STRUCT, _iter278.getValue().size())); - for (NewEdge _iter279 : _iter278.getValue()) { - _iter279.write(oprot); - } - oprot.writeListEnd(); - } - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.prop_names != null) { - oprot.writeFieldBegin(PROP_NAMES_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.prop_names.size())); - for (byte[] _iter280 : this.prop_names) { - oprot.writeBinary(_iter280); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(IF_NOT_EXISTS_FIELD_DESC); - oprot.writeBool(this.if_not_exists); - oprot.writeFieldEnd(); - oprot.writeFieldBegin(TERM_FIELD_DESC); - oprot.writeI64(this.term); - oprot.writeFieldEnd(); - if (isSetEdge_version()) { - oprot.writeFieldBegin(EDGE_VERSION_FIELD_DESC); - oprot.writeI64(this.edge_version); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - return toString(1, true); - } - - @Override - public String toString(int indent, boolean prettyPrint) { - String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; - String newLine = prettyPrint ? "\n" : ""; - String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("ChainAddEdgesRequest"); - sb.append(space); - sb.append("("); - sb.append(newLine); - boolean first = true; - - sb.append(indentStr); - sb.append("space_id"); - sb.append(space); - sb.append(":").append(space); - sb.append(TBaseHelper.toString(this.getSpace_id(), indent + 1, prettyPrint)); - first = false; - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("parts"); - sb.append(space); - sb.append(":").append(space); - if (this.getParts() == null) { - sb.append("null"); - } else { - sb.append(TBaseHelper.toString(this.getParts(), indent + 1, prettyPrint)); - } - first = false; - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("prop_names"); - sb.append(space); - sb.append(":").append(space); - if (this.getProp_names() == null) { - sb.append("null"); - } else { - sb.append(TBaseHelper.toString(this.getProp_names(), indent + 1, prettyPrint)); - } - first = false; - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("if_not_exists"); - sb.append(space); - sb.append(":").append(space); - sb.append(TBaseHelper.toString(this.isIf_not_exists(), indent + 1, prettyPrint)); - first = false; - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("term"); - sb.append(space); - sb.append(":").append(space); - sb.append(TBaseHelper.toString(this.getTerm(), indent + 1, prettyPrint)); - first = false; - if (isSetEdge_version()) - { - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("edge_version"); - sb.append(space); - sb.append(":").append(space); - sb.append(TBaseHelper.toString(this.getEdge_version(), indent + 1, prettyPrint)); - first = false; - } - sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - } - -} - diff --git a/client/src/main/generated/com/vesoft/nebula/storage/ChainUpdateEdgeRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/ChainUpdateEdgeRequest.java deleted file mode 100644 index ef8fad589..000000000 --- a/client/src/main/generated/com/vesoft/nebula/storage/ChainUpdateEdgeRequest.java +++ /dev/null @@ -1,595 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - * @generated - */ -package com.vesoft.nebula.storage; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import java.util.BitSet; -import java.util.Arrays; -import com.facebook.thrift.*; -import com.facebook.thrift.annotations.*; -import com.facebook.thrift.async.*; -import com.facebook.thrift.meta_data.*; -import com.facebook.thrift.server.*; -import com.facebook.thrift.transport.*; -import com.facebook.thrift.protocol.*; - -@SuppressWarnings({ "unused", "serial" }) -public class ChainUpdateEdgeRequest implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("ChainUpdateEdgeRequest"); - private static final TField UPDATE_EDGE_REQUEST_FIELD_DESC = new TField("update_edge_request", TType.STRUCT, (short)1); - private static final TField TERM_FIELD_DESC = new TField("term", TType.I64, (short)2); - private static final TField EDGE_VERSION_FIELD_DESC = new TField("edge_version", TType.I64, (short)3); - private static final TField SPACE_ID_FIELD_DESC = new TField("space_id", TType.I32, (short)4); - private static final TField PARTS_FIELD_DESC = new TField("parts", TType.LIST, (short)5); - - public UpdateEdgeRequest update_edge_request; - public long term; - public long edge_version; - public int space_id; - public List parts; - public static final int UPDATE_EDGE_REQUEST = 1; - public static final int TERM = 2; - public static final int EDGE_VERSION = 3; - public static final int SPACE_ID = 4; - public static final int PARTS = 5; - - // isset id assignments - private static final int __TERM_ISSET_ID = 0; - private static final int __EDGE_VERSION_ISSET_ID = 1; - private static final int __SPACE_ID_ISSET_ID = 2; - private BitSet __isset_bit_vector = new BitSet(3); - - public static final Map metaDataMap; - - static { - Map tmpMetaDataMap = new HashMap(); - tmpMetaDataMap.put(UPDATE_EDGE_REQUEST, new FieldMetaData("update_edge_request", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, UpdateEdgeRequest.class))); - tmpMetaDataMap.put(TERM, new FieldMetaData("term", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I64))); - tmpMetaDataMap.put(EDGE_VERSION, new FieldMetaData("edge_version", TFieldRequirementType.OPTIONAL, - new FieldValueMetaData(TType.I64))); - tmpMetaDataMap.put(SPACE_ID, new FieldMetaData("space_id", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - tmpMetaDataMap.put(PARTS, new FieldMetaData("parts", TFieldRequirementType.REQUIRED, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.I32)))); - metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); - } - - static { - FieldMetaData.addStructMetaDataMap(ChainUpdateEdgeRequest.class, metaDataMap); - } - - public ChainUpdateEdgeRequest() { - } - - public ChainUpdateEdgeRequest( - List parts) { - this(); - this.parts = parts; - } - - public ChainUpdateEdgeRequest( - UpdateEdgeRequest update_edge_request, - long term, - int space_id, - List parts) { - this(); - this.update_edge_request = update_edge_request; - this.term = term; - setTermIsSet(true); - this.space_id = space_id; - setSpace_idIsSet(true); - this.parts = parts; - } - - public ChainUpdateEdgeRequest( - UpdateEdgeRequest update_edge_request, - long term, - long edge_version, - int space_id, - List parts) { - this(); - this.update_edge_request = update_edge_request; - this.term = term; - setTermIsSet(true); - this.edge_version = edge_version; - setEdge_versionIsSet(true); - this.space_id = space_id; - setSpace_idIsSet(true); - this.parts = parts; - } - - public static class Builder { - private UpdateEdgeRequest update_edge_request; - private long term; - private long edge_version; - private int space_id; - private List parts; - - BitSet __optional_isset = new BitSet(3); - - public Builder() { - } - - public Builder setUpdate_edge_request(final UpdateEdgeRequest update_edge_request) { - this.update_edge_request = update_edge_request; - return this; - } - - public Builder setTerm(final long term) { - this.term = term; - __optional_isset.set(__TERM_ISSET_ID, true); - return this; - } - - public Builder setEdge_version(final long edge_version) { - this.edge_version = edge_version; - __optional_isset.set(__EDGE_VERSION_ISSET_ID, true); - return this; - } - - public Builder setSpace_id(final int space_id) { - this.space_id = space_id; - __optional_isset.set(__SPACE_ID_ISSET_ID, true); - return this; - } - - public Builder setParts(final List parts) { - this.parts = parts; - return this; - } - - public ChainUpdateEdgeRequest build() { - ChainUpdateEdgeRequest result = new ChainUpdateEdgeRequest(); - result.setUpdate_edge_request(this.update_edge_request); - if (__optional_isset.get(__TERM_ISSET_ID)) { - result.setTerm(this.term); - } - if (__optional_isset.get(__EDGE_VERSION_ISSET_ID)) { - result.setEdge_version(this.edge_version); - } - if (__optional_isset.get(__SPACE_ID_ISSET_ID)) { - result.setSpace_id(this.space_id); - } - result.setParts(this.parts); - return result; - } - } - - public static Builder builder() { - return new Builder(); - } - - /** - * Performs a deep copy on other. - */ - public ChainUpdateEdgeRequest(ChainUpdateEdgeRequest other) { - __isset_bit_vector.clear(); - __isset_bit_vector.or(other.__isset_bit_vector); - if (other.isSetUpdate_edge_request()) { - this.update_edge_request = TBaseHelper.deepCopy(other.update_edge_request); - } - this.term = TBaseHelper.deepCopy(other.term); - this.edge_version = TBaseHelper.deepCopy(other.edge_version); - this.space_id = TBaseHelper.deepCopy(other.space_id); - if (other.isSetParts()) { - this.parts = TBaseHelper.deepCopy(other.parts); - } - } - - public ChainUpdateEdgeRequest deepCopy() { - return new ChainUpdateEdgeRequest(this); - } - - public UpdateEdgeRequest getUpdate_edge_request() { - return this.update_edge_request; - } - - public ChainUpdateEdgeRequest setUpdate_edge_request(UpdateEdgeRequest update_edge_request) { - this.update_edge_request = update_edge_request; - return this; - } - - public void unsetUpdate_edge_request() { - this.update_edge_request = null; - } - - // Returns true if field update_edge_request is set (has been assigned a value) and false otherwise - public boolean isSetUpdate_edge_request() { - return this.update_edge_request != null; - } - - public void setUpdate_edge_requestIsSet(boolean __value) { - if (!__value) { - this.update_edge_request = null; - } - } - - public long getTerm() { - return this.term; - } - - public ChainUpdateEdgeRequest setTerm(long term) { - this.term = term; - setTermIsSet(true); - return this; - } - - public void unsetTerm() { - __isset_bit_vector.clear(__TERM_ISSET_ID); - } - - // Returns true if field term is set (has been assigned a value) and false otherwise - public boolean isSetTerm() { - return __isset_bit_vector.get(__TERM_ISSET_ID); - } - - public void setTermIsSet(boolean __value) { - __isset_bit_vector.set(__TERM_ISSET_ID, __value); - } - - public long getEdge_version() { - return this.edge_version; - } - - public ChainUpdateEdgeRequest setEdge_version(long edge_version) { - this.edge_version = edge_version; - setEdge_versionIsSet(true); - return this; - } - - public void unsetEdge_version() { - __isset_bit_vector.clear(__EDGE_VERSION_ISSET_ID); - } - - // Returns true if field edge_version is set (has been assigned a value) and false otherwise - public boolean isSetEdge_version() { - return __isset_bit_vector.get(__EDGE_VERSION_ISSET_ID); - } - - public void setEdge_versionIsSet(boolean __value) { - __isset_bit_vector.set(__EDGE_VERSION_ISSET_ID, __value); - } - - public int getSpace_id() { - return this.space_id; - } - - public ChainUpdateEdgeRequest setSpace_id(int space_id) { - this.space_id = space_id; - setSpace_idIsSet(true); - return this; - } - - public void unsetSpace_id() { - __isset_bit_vector.clear(__SPACE_ID_ISSET_ID); - } - - // Returns true if field space_id is set (has been assigned a value) and false otherwise - public boolean isSetSpace_id() { - return __isset_bit_vector.get(__SPACE_ID_ISSET_ID); - } - - public void setSpace_idIsSet(boolean __value) { - __isset_bit_vector.set(__SPACE_ID_ISSET_ID, __value); - } - - public List getParts() { - return this.parts; - } - - public ChainUpdateEdgeRequest setParts(List parts) { - this.parts = parts; - return this; - } - - public void unsetParts() { - this.parts = null; - } - - // Returns true if field parts is set (has been assigned a value) and false otherwise - public boolean isSetParts() { - return this.parts != null; - } - - public void setPartsIsSet(boolean __value) { - if (!__value) { - this.parts = null; - } - } - - @SuppressWarnings("unchecked") - public void setFieldValue(int fieldID, Object __value) { - switch (fieldID) { - case UPDATE_EDGE_REQUEST: - if (__value == null) { - unsetUpdate_edge_request(); - } else { - setUpdate_edge_request((UpdateEdgeRequest)__value); - } - break; - - case TERM: - if (__value == null) { - unsetTerm(); - } else { - setTerm((Long)__value); - } - break; - - case EDGE_VERSION: - if (__value == null) { - unsetEdge_version(); - } else { - setEdge_version((Long)__value); - } - break; - - case SPACE_ID: - if (__value == null) { - unsetSpace_id(); - } else { - setSpace_id((Integer)__value); - } - break; - - case PARTS: - if (__value == null) { - unsetParts(); - } else { - setParts((List)__value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case UPDATE_EDGE_REQUEST: - return getUpdate_edge_request(); - - case TERM: - return new Long(getTerm()); - - case EDGE_VERSION: - return new Long(getEdge_version()); - - case SPACE_ID: - return new Integer(getSpace_id()); - - case PARTS: - return getParts(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object _that) { - if (_that == null) - return false; - if (this == _that) - return true; - if (!(_that instanceof ChainUpdateEdgeRequest)) - return false; - ChainUpdateEdgeRequest that = (ChainUpdateEdgeRequest)_that; - - if (!TBaseHelper.equalsNobinary(this.isSetUpdate_edge_request(), that.isSetUpdate_edge_request(), this.update_edge_request, that.update_edge_request)) { return false; } - - if (!TBaseHelper.equalsNobinary(this.term, that.term)) { return false; } - - if (!TBaseHelper.equalsNobinary(this.isSetEdge_version(), that.isSetEdge_version(), this.edge_version, that.edge_version)) { return false; } - - if (!TBaseHelper.equalsNobinary(this.space_id, that.space_id)) { return false; } - - if (!TBaseHelper.equalsNobinary(this.isSetParts(), that.isSetParts(), this.parts, that.parts)) { return false; } - - return true; - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(new Object[] {update_edge_request, term, edge_version, space_id, parts}); - } - - public void read(TProtocol iprot) throws TException { - TField __field; - iprot.readStructBegin(metaDataMap); - while (true) - { - __field = iprot.readFieldBegin(); - if (__field.type == TType.STOP) { - break; - } - switch (__field.id) - { - case UPDATE_EDGE_REQUEST: - if (__field.type == TType.STRUCT) { - this.update_edge_request = new UpdateEdgeRequest(); - this.update_edge_request.read(iprot); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - case TERM: - if (__field.type == TType.I64) { - this.term = iprot.readI64(); - setTermIsSet(true); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - case EDGE_VERSION: - if (__field.type == TType.I64) { - this.edge_version = iprot.readI64(); - setEdge_versionIsSet(true); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - case SPACE_ID: - if (__field.type == TType.I32) { - this.space_id = iprot.readI32(); - setSpace_idIsSet(true); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - case PARTS: - if (__field.type == TType.LIST) { - { - TList _list281 = iprot.readListBegin(); - this.parts = new ArrayList(Math.max(0, _list281.size)); - for (int _i282 = 0; - (_list281.size < 0) ? iprot.peekList() : (_i282 < _list281.size); - ++_i282) - { - int _elem283; - _elem283 = iprot.readI32(); - this.parts.add(_elem283); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - default: - TProtocolUtil.skip(iprot, __field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.update_edge_request != null) { - oprot.writeFieldBegin(UPDATE_EDGE_REQUEST_FIELD_DESC); - this.update_edge_request.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(TERM_FIELD_DESC); - oprot.writeI64(this.term); - oprot.writeFieldEnd(); - if (isSetEdge_version()) { - oprot.writeFieldBegin(EDGE_VERSION_FIELD_DESC); - oprot.writeI64(this.edge_version); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(SPACE_ID_FIELD_DESC); - oprot.writeI32(this.space_id); - oprot.writeFieldEnd(); - if (this.parts != null) { - oprot.writeFieldBegin(PARTS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.I32, this.parts.size())); - for (int _iter284 : this.parts) { - oprot.writeI32(_iter284); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - return toString(1, true); - } - - @Override - public String toString(int indent, boolean prettyPrint) { - String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; - String newLine = prettyPrint ? "\n" : ""; - String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("ChainUpdateEdgeRequest"); - sb.append(space); - sb.append("("); - sb.append(newLine); - boolean first = true; - - sb.append(indentStr); - sb.append("update_edge_request"); - sb.append(space); - sb.append(":").append(space); - if (this.getUpdate_edge_request() == null) { - sb.append("null"); - } else { - sb.append(TBaseHelper.toString(this.getUpdate_edge_request(), indent + 1, prettyPrint)); - } - first = false; - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("term"); - sb.append(space); - sb.append(":").append(space); - sb.append(TBaseHelper.toString(this.getTerm(), indent + 1, prettyPrint)); - first = false; - if (isSetEdge_version()) - { - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("edge_version"); - sb.append(space); - sb.append(":").append(space); - sb.append(TBaseHelper.toString(this.getEdge_version(), indent + 1, prettyPrint)); - first = false; - } - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("space_id"); - sb.append(space); - sb.append(":").append(space); - sb.append(TBaseHelper.toString(this.getSpace_id(), indent + 1, prettyPrint)); - first = false; - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("parts"); - sb.append(space); - sb.append(":").append(space); - if (this.getParts() == null) { - sb.append("null"); - } else { - sb.append(TBaseHelper.toString(this.getParts(), indent + 1, prettyPrint)); - } - first = false; - sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - if (parts == null) { - throw new TProtocolException(TProtocolException.MISSING_REQUIRED_FIELD, "Required field 'parts' was not present! Struct: " + toString()); - } - } - -} - diff --git a/client/src/main/generated/com/vesoft/nebula/storage/GeneralStorageService.java b/client/src/main/generated/com/vesoft/nebula/storage/GeneralStorageService.java index 351d4458e..faea62896 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/GeneralStorageService.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/GeneralStorageService.java @@ -231,17 +231,17 @@ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientM super(protocolFactory, clientManager, transport); } - public void get(KVGetRequest req, AsyncMethodCallback resultHandler483) throws TException { + public void get(KVGetRequest req, AsyncMethodCallback resultHandler454) throws TException { checkReady(); - get_call method_call = new get_call(req, resultHandler483, this, ___protocolFactory, ___transport); + get_call method_call = new get_call(req, resultHandler454, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class get_call extends TAsyncMethodCall { private KVGetRequest req; - public get_call(KVGetRequest req, AsyncMethodCallback resultHandler484, TAsyncClient client480, TProtocolFactory protocolFactory481, TNonblockingTransport transport482) throws TException { - super(client480, protocolFactory481, transport482, resultHandler484, false); + public get_call(KVGetRequest req, AsyncMethodCallback resultHandler455, TAsyncClient client451, TProtocolFactory protocolFactory452, TNonblockingTransport transport453) throws TException { + super(client451, protocolFactory452, transport453, resultHandler455, false); this.req = req; } @@ -263,17 +263,17 @@ public KVGetResponse getResult() throws TException { } } - public void put(KVPutRequest req, AsyncMethodCallback resultHandler488) throws TException { + public void put(KVPutRequest req, AsyncMethodCallback resultHandler459) throws TException { checkReady(); - put_call method_call = new put_call(req, resultHandler488, this, ___protocolFactory, ___transport); + put_call method_call = new put_call(req, resultHandler459, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class put_call extends TAsyncMethodCall { private KVPutRequest req; - public put_call(KVPutRequest req, AsyncMethodCallback resultHandler489, TAsyncClient client485, TProtocolFactory protocolFactory486, TNonblockingTransport transport487) throws TException { - super(client485, protocolFactory486, transport487, resultHandler489, false); + public put_call(KVPutRequest req, AsyncMethodCallback resultHandler460, TAsyncClient client456, TProtocolFactory protocolFactory457, TNonblockingTransport transport458) throws TException { + super(client456, protocolFactory457, transport458, resultHandler460, false); this.req = req; } @@ -295,17 +295,17 @@ public ExecResponse getResult() throws TException { } } - public void remove(KVRemoveRequest req, AsyncMethodCallback resultHandler493) throws TException { + public void remove(KVRemoveRequest req, AsyncMethodCallback resultHandler464) throws TException { checkReady(); - remove_call method_call = new remove_call(req, resultHandler493, this, ___protocolFactory, ___transport); + remove_call method_call = new remove_call(req, resultHandler464, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class remove_call extends TAsyncMethodCall { private KVRemoveRequest req; - public remove_call(KVRemoveRequest req, AsyncMethodCallback resultHandler494, TAsyncClient client490, TProtocolFactory protocolFactory491, TNonblockingTransport transport492) throws TException { - super(client490, protocolFactory491, transport492, resultHandler494, false); + public remove_call(KVRemoveRequest req, AsyncMethodCallback resultHandler465, TAsyncClient client461, TProtocolFactory protocolFactory462, TNonblockingTransport transport463) throws TException { + super(client461, protocolFactory462, transport463, resultHandler465, false); this.req = req; } diff --git a/client/src/main/generated/com/vesoft/nebula/storage/GetValueRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/GetValueRequest.java new file mode 100644 index 000000000..4712c0e7f --- /dev/null +++ b/client/src/main/generated/com/vesoft/nebula/storage/GetValueRequest.java @@ -0,0 +1,439 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.vesoft.nebula.storage; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.Set; +import java.util.HashSet; +import java.util.Collections; +import java.util.BitSet; +import java.util.Arrays; +import com.facebook.thrift.*; +import com.facebook.thrift.annotations.*; +import com.facebook.thrift.async.*; +import com.facebook.thrift.meta_data.*; +import com.facebook.thrift.server.*; +import com.facebook.thrift.transport.*; +import com.facebook.thrift.protocol.*; + +@SuppressWarnings({ "unused", "serial" }) +public class GetValueRequest implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("GetValueRequest"); + private static final TField SPACE_ID_FIELD_DESC = new TField("space_id", TType.I32, (short)1); + private static final TField PART_ID_FIELD_DESC = new TField("part_id", TType.I32, (short)2); + private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)3); + + public int space_id; + public int part_id; + public byte[] key; + public static final int SPACE_ID = 1; + public static final int PART_ID = 2; + public static final int KEY = 3; + + // isset id assignments + private static final int __SPACE_ID_ISSET_ID = 0; + private static final int __PART_ID_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + + public static final Map metaDataMap; + + static { + Map tmpMetaDataMap = new HashMap(); + tmpMetaDataMap.put(SPACE_ID, new FieldMetaData("space_id", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMetaDataMap.put(PART_ID, new FieldMetaData("part_id", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMetaDataMap.put(KEY, new FieldMetaData("key", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(GetValueRequest.class, metaDataMap); + } + + public GetValueRequest() { + } + + public GetValueRequest( + int space_id, + int part_id, + byte[] key) { + this(); + this.space_id = space_id; + setSpace_idIsSet(true); + this.part_id = part_id; + setPart_idIsSet(true); + this.key = key; + } + + public static class Builder { + private int space_id; + private int part_id; + private byte[] key; + + BitSet __optional_isset = new BitSet(2); + + public Builder() { + } + + public Builder setSpace_id(final int space_id) { + this.space_id = space_id; + __optional_isset.set(__SPACE_ID_ISSET_ID, true); + return this; + } + + public Builder setPart_id(final int part_id) { + this.part_id = part_id; + __optional_isset.set(__PART_ID_ISSET_ID, true); + return this; + } + + public Builder setKey(final byte[] key) { + this.key = key; + return this; + } + + public GetValueRequest build() { + GetValueRequest result = new GetValueRequest(); + if (__optional_isset.get(__SPACE_ID_ISSET_ID)) { + result.setSpace_id(this.space_id); + } + if (__optional_isset.get(__PART_ID_ISSET_ID)) { + result.setPart_id(this.part_id); + } + result.setKey(this.key); + return result; + } + } + + public static Builder builder() { + return new Builder(); + } + + /** + * Performs a deep copy on other. + */ + public GetValueRequest(GetValueRequest other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.space_id = TBaseHelper.deepCopy(other.space_id); + this.part_id = TBaseHelper.deepCopy(other.part_id); + if (other.isSetKey()) { + this.key = TBaseHelper.deepCopy(other.key); + } + } + + public GetValueRequest deepCopy() { + return new GetValueRequest(this); + } + + public int getSpace_id() { + return this.space_id; + } + + public GetValueRequest setSpace_id(int space_id) { + this.space_id = space_id; + setSpace_idIsSet(true); + return this; + } + + public void unsetSpace_id() { + __isset_bit_vector.clear(__SPACE_ID_ISSET_ID); + } + + // Returns true if field space_id is set (has been assigned a value) and false otherwise + public boolean isSetSpace_id() { + return __isset_bit_vector.get(__SPACE_ID_ISSET_ID); + } + + public void setSpace_idIsSet(boolean __value) { + __isset_bit_vector.set(__SPACE_ID_ISSET_ID, __value); + } + + public int getPart_id() { + return this.part_id; + } + + public GetValueRequest setPart_id(int part_id) { + this.part_id = part_id; + setPart_idIsSet(true); + return this; + } + + public void unsetPart_id() { + __isset_bit_vector.clear(__PART_ID_ISSET_ID); + } + + // Returns true if field part_id is set (has been assigned a value) and false otherwise + public boolean isSetPart_id() { + return __isset_bit_vector.get(__PART_ID_ISSET_ID); + } + + public void setPart_idIsSet(boolean __value) { + __isset_bit_vector.set(__PART_ID_ISSET_ID, __value); + } + + public byte[] getKey() { + return this.key; + } + + public GetValueRequest setKey(byte[] key) { + this.key = key; + return this; + } + + public void unsetKey() { + this.key = null; + } + + // Returns true if field key is set (has been assigned a value) and false otherwise + public boolean isSetKey() { + return this.key != null; + } + + public void setKeyIsSet(boolean __value) { + if (!__value) { + this.key = null; + } + } + + public void setFieldValue(int fieldID, Object __value) { + switch (fieldID) { + case SPACE_ID: + if (__value == null) { + unsetSpace_id(); + } else { + setSpace_id((Integer)__value); + } + break; + + case PART_ID: + if (__value == null) { + unsetPart_id(); + } else { + setPart_id((Integer)__value); + } + break; + + case KEY: + if (__value == null) { + unsetKey(); + } else { + setKey((byte[])__value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SPACE_ID: + return new Integer(getSpace_id()); + + case PART_ID: + return new Integer(getPart_id()); + + case KEY: + return getKey(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object _that) { + if (_that == null) + return false; + if (this == _that) + return true; + if (!(_that instanceof GetValueRequest)) + return false; + GetValueRequest that = (GetValueRequest)_that; + + if (!TBaseHelper.equalsNobinary(this.space_id, that.space_id)) { return false; } + + if (!TBaseHelper.equalsNobinary(this.part_id, that.part_id)) { return false; } + + if (!TBaseHelper.equalsSlow(this.isSetKey(), that.isSetKey(), this.key, that.key)) { return false; } + + return true; + } + + @Override + public int hashCode() { + return Arrays.deepHashCode(new Object[] {space_id, part_id, key}); + } + + @Override + public int compareTo(GetValueRequest other) { + if (other == null) { + // See java.lang.Comparable docs + throw new NullPointerException(); + } + + if (other == this) { + return 0; + } + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSpace_id()).compareTo(other.isSetSpace_id()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(space_id, other.space_id); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = Boolean.valueOf(isSetPart_id()).compareTo(other.isSetPart_id()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(part_id, other.part_id); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(key, other.key); + if (lastComparison != 0) { + return lastComparison; + } + return 0; + } + + public void read(TProtocol iprot) throws TException { + TField __field; + iprot.readStructBegin(metaDataMap); + while (true) + { + __field = iprot.readFieldBegin(); + if (__field.type == TType.STOP) { + break; + } + switch (__field.id) + { + case SPACE_ID: + if (__field.type == TType.I32) { + this.space_id = iprot.readI32(); + setSpace_idIsSet(true); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + case PART_ID: + if (__field.type == TType.I32) { + this.part_id = iprot.readI32(); + setPart_idIsSet(true); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + case KEY: + if (__field.type == TType.STRING) { + this.key = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + default: + TProtocolUtil.skip(iprot, __field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SPACE_ID_FIELD_DESC); + oprot.writeI32(this.space_id); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(PART_ID_FIELD_DESC); + oprot.writeI32(this.part_id); + oprot.writeFieldEnd(); + if (this.key != null) { + oprot.writeFieldBegin(KEY_FIELD_DESC); + oprot.writeBinary(this.key); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + return toString(1, true); + } + + @Override + public String toString(int indent, boolean prettyPrint) { + String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; + String newLine = prettyPrint ? "\n" : ""; + String space = prettyPrint ? " " : ""; + StringBuilder sb = new StringBuilder("GetValueRequest"); + sb.append(space); + sb.append("("); + sb.append(newLine); + boolean first = true; + + sb.append(indentStr); + sb.append("space_id"); + sb.append(space); + sb.append(":").append(space); + sb.append(TBaseHelper.toString(this.getSpace_id(), indent + 1, prettyPrint)); + first = false; + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("part_id"); + sb.append(space); + sb.append(":").append(space); + sb.append(TBaseHelper.toString(this.getPart_id(), indent + 1, prettyPrint)); + first = false; + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("key"); + sb.append(space); + sb.append(":").append(space); + if (this.getKey() == null) { + sb.append("null"); + } else { + int __key_size = Math.min(this.getKey().length, 128); + for (int i = 0; i < __key_size; i++) { + if (i != 0) sb.append(" "); + sb.append(Integer.toHexString(this.getKey()[i]).length() > 1 ? Integer.toHexString(this.getKey()[i]).substring(Integer.toHexString(this.getKey()[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.getKey()[i]).toUpperCase()); + } + if (this.getKey().length > 128) sb.append(" ..."); + } + first = false; + sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git a/client/src/main/generated/com/vesoft/nebula/storage/GetValueResponse.java b/client/src/main/generated/com/vesoft/nebula/storage/GetValueResponse.java new file mode 100644 index 000000000..8a0b704b8 --- /dev/null +++ b/client/src/main/generated/com/vesoft/nebula/storage/GetValueResponse.java @@ -0,0 +1,365 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package com.vesoft.nebula.storage; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.Set; +import java.util.HashSet; +import java.util.Collections; +import java.util.BitSet; +import java.util.Arrays; +import com.facebook.thrift.*; +import com.facebook.thrift.annotations.*; +import com.facebook.thrift.async.*; +import com.facebook.thrift.meta_data.*; +import com.facebook.thrift.server.*; +import com.facebook.thrift.transport.*; +import com.facebook.thrift.protocol.*; + +@SuppressWarnings({ "unused", "serial" }) +public class GetValueResponse implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("GetValueResponse"); + private static final TField RESULT_FIELD_DESC = new TField("result", TType.STRUCT, (short)1); + private static final TField VALUE_FIELD_DESC = new TField("value", TType.STRING, (short)2); + + public ResponseCommon result; + public byte[] value; + public static final int RESULT = 1; + public static final int VALUE = 2; + + // isset id assignments + + public static final Map metaDataMap; + + static { + Map tmpMetaDataMap = new HashMap(); + tmpMetaDataMap.put(RESULT, new FieldMetaData("result", TFieldRequirementType.REQUIRED, + new StructMetaData(TType.STRUCT, ResponseCommon.class))); + tmpMetaDataMap.put(VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); + } + + static { + FieldMetaData.addStructMetaDataMap(GetValueResponse.class, metaDataMap); + } + + public GetValueResponse() { + } + + public GetValueResponse( + ResponseCommon result) { + this(); + this.result = result; + } + + public GetValueResponse( + ResponseCommon result, + byte[] value) { + this(); + this.result = result; + this.value = value; + } + + public static class Builder { + private ResponseCommon result; + private byte[] value; + + public Builder() { + } + + public Builder setResult(final ResponseCommon result) { + this.result = result; + return this; + } + + public Builder setValue(final byte[] value) { + this.value = value; + return this; + } + + public GetValueResponse build() { + GetValueResponse result = new GetValueResponse(); + result.setResult(this.result); + result.setValue(this.value); + return result; + } + } + + public static Builder builder() { + return new Builder(); + } + + /** + * Performs a deep copy on other. + */ + public GetValueResponse(GetValueResponse other) { + if (other.isSetResult()) { + this.result = TBaseHelper.deepCopy(other.result); + } + if (other.isSetValue()) { + this.value = TBaseHelper.deepCopy(other.value); + } + } + + public GetValueResponse deepCopy() { + return new GetValueResponse(this); + } + + public ResponseCommon getResult() { + return this.result; + } + + public GetValueResponse setResult(ResponseCommon result) { + this.result = result; + return this; + } + + public void unsetResult() { + this.result = null; + } + + // Returns true if field result is set (has been assigned a value) and false otherwise + public boolean isSetResult() { + return this.result != null; + } + + public void setResultIsSet(boolean __value) { + if (!__value) { + this.result = null; + } + } + + public byte[] getValue() { + return this.value; + } + + public GetValueResponse setValue(byte[] value) { + this.value = value; + return this; + } + + public void unsetValue() { + this.value = null; + } + + // Returns true if field value is set (has been assigned a value) and false otherwise + public boolean isSetValue() { + return this.value != null; + } + + public void setValueIsSet(boolean __value) { + if (!__value) { + this.value = null; + } + } + + public void setFieldValue(int fieldID, Object __value) { + switch (fieldID) { + case RESULT: + if (__value == null) { + unsetResult(); + } else { + setResult((ResponseCommon)__value); + } + break; + + case VALUE: + if (__value == null) { + unsetValue(); + } else { + setValue((byte[])__value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case RESULT: + return getResult(); + + case VALUE: + return getValue(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object _that) { + if (_that == null) + return false; + if (this == _that) + return true; + if (!(_that instanceof GetValueResponse)) + return false; + GetValueResponse that = (GetValueResponse)_that; + + if (!TBaseHelper.equalsNobinary(this.isSetResult(), that.isSetResult(), this.result, that.result)) { return false; } + + if (!TBaseHelper.equalsSlow(this.isSetValue(), that.isSetValue(), this.value, that.value)) { return false; } + + return true; + } + + @Override + public int hashCode() { + return Arrays.deepHashCode(new Object[] {result, value}); + } + + @Override + public int compareTo(GetValueResponse other) { + if (other == null) { + // See java.lang.Comparable docs + throw new NullPointerException(); + } + + if (other == this) { + return 0; + } + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetResult()).compareTo(other.isSetResult()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(result, other.result); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(value, other.value); + if (lastComparison != 0) { + return lastComparison; + } + return 0; + } + + public void read(TProtocol iprot) throws TException { + TField __field; + iprot.readStructBegin(metaDataMap); + while (true) + { + __field = iprot.readFieldBegin(); + if (__field.type == TType.STOP) { + break; + } + switch (__field.id) + { + case RESULT: + if (__field.type == TType.STRUCT) { + this.result = new ResponseCommon(); + this.result.read(iprot); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + case VALUE: + if (__field.type == TType.STRING) { + this.value = iprot.readBinary(); + } else { + TProtocolUtil.skip(iprot, __field.type); + } + break; + default: + TProtocolUtil.skip(iprot, __field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + + // check for required fields of primitive type, which can't be checked in the validate method + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.result != null) { + oprot.writeFieldBegin(RESULT_FIELD_DESC); + this.result.write(oprot); + oprot.writeFieldEnd(); + } + if (this.value != null) { + oprot.writeFieldBegin(VALUE_FIELD_DESC); + oprot.writeBinary(this.value); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + return toString(1, true); + } + + @Override + public String toString(int indent, boolean prettyPrint) { + String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; + String newLine = prettyPrint ? "\n" : ""; + String space = prettyPrint ? " " : ""; + StringBuilder sb = new StringBuilder("GetValueResponse"); + sb.append(space); + sb.append("("); + sb.append(newLine); + boolean first = true; + + sb.append(indentStr); + sb.append("result"); + sb.append(space); + sb.append(":").append(space); + if (this.getResult() == null) { + sb.append("null"); + } else { + sb.append(TBaseHelper.toString(this.getResult(), indent + 1, prettyPrint)); + } + first = false; + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("value"); + sb.append(space); + sb.append(":").append(space); + if (this.getValue() == null) { + sb.append("null"); + } else { + int __value_size = Math.min(this.getValue().length, 128); + for (int i = 0; i < __value_size; i++) { + if (i != 0) sb.append(" "); + sb.append(Integer.toHexString(this.getValue()[i]).length() > 1 ? Integer.toHexString(this.getValue()[i]).substring(Integer.toHexString(this.getValue()[i]).length() - 2).toUpperCase() : "0" + Integer.toHexString(this.getValue()[i]).toUpperCase()); + } + if (this.getValue().length > 128) sb.append(" ..."); + } + first = false; + sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + if (result == null) { + throw new TProtocolException(TProtocolException.MISSING_REQUIRED_FIELD, "Required field 'result' was not present! Struct: " + toString()); + } + } + +} + diff --git a/client/src/main/generated/com/vesoft/nebula/storage/GraphStorageService.java b/client/src/main/generated/com/vesoft/nebula/storage/GraphStorageService.java index 99ea338d6..844249043 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/GraphStorageService.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/GraphStorageService.java @@ -59,9 +59,7 @@ public interface Iface { public GetNeighborsResponse lookupAndTraverse(LookupAndTraverseRequest req) throws TException; - public UpdateResponse chainUpdateEdge(UpdateEdgeRequest req) throws TException; - - public ExecResponse chainAddEdges(AddEdgesRequest req) throws TException; + public ExecResponse addEdgesAtomic(AddEdgesRequest req) throws TException; } @@ -95,9 +93,7 @@ public interface AsyncIface { public void lookupAndTraverse(LookupAndTraverseRequest req, AsyncMethodCallback resultHandler) throws TException; - public void chainUpdateEdge(UpdateEdgeRequest req, AsyncMethodCallback resultHandler) throws TException; - - public void chainAddEdges(AddEdgesRequest req, AsyncMethodCallback resultHandler) throws TException; + public void addEdgesAtomic(AddEdgesRequest req, AsyncMethodCallback resultHandler) throws TException; } @@ -760,94 +756,49 @@ public GetNeighborsResponse recv_lookupAndTraverse() throws TException throw new TApplicationException(TApplicationException.MISSING_RESULT, "lookupAndTraverse failed: unknown result"); } - public UpdateResponse chainUpdateEdge(UpdateEdgeRequest req) throws TException + public ExecResponse addEdgesAtomic(AddEdgesRequest req) throws TException { - ContextStack ctx = getContextStack("GraphStorageService.chainUpdateEdge", null); + ContextStack ctx = getContextStack("GraphStorageService.addEdgesAtomic", null); this.setContextStack(ctx); - send_chainUpdateEdge(req); - return recv_chainUpdateEdge(); + send_addEdgesAtomic(req); + return recv_addEdgesAtomic(); } - public void send_chainUpdateEdge(UpdateEdgeRequest req) throws TException + public void send_addEdgesAtomic(AddEdgesRequest req) throws TException { ContextStack ctx = this.getContextStack(); - super.preWrite(ctx, "GraphStorageService.chainUpdateEdge", null); - oprot_.writeMessageBegin(new TMessage("chainUpdateEdge", TMessageType.CALL, seqid_)); - chainUpdateEdge_args args = new chainUpdateEdge_args(); + super.preWrite(ctx, "GraphStorageService.addEdgesAtomic", null); + oprot_.writeMessageBegin(new TMessage("addEdgesAtomic", TMessageType.CALL, seqid_)); + addEdgesAtomic_args args = new addEdgesAtomic_args(); args.req = req; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); - super.postWrite(ctx, "GraphStorageService.chainUpdateEdge", args); + super.postWrite(ctx, "GraphStorageService.addEdgesAtomic", args); return; } - public UpdateResponse recv_chainUpdateEdge() throws TException + public ExecResponse recv_addEdgesAtomic() throws TException { ContextStack ctx = super.getContextStack(); long bytes; TMessageType mtype; - super.preRead(ctx, "GraphStorageService.chainUpdateEdge"); + super.preRead(ctx, "GraphStorageService.addEdgesAtomic"); TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } - chainUpdateEdge_result result = new chainUpdateEdge_result(); + addEdgesAtomic_result result = new addEdgesAtomic_result(); result.read(iprot_); iprot_.readMessageEnd(); - super.postRead(ctx, "GraphStorageService.chainUpdateEdge", result); + super.postRead(ctx, "GraphStorageService.addEdgesAtomic", result); if (result.isSetSuccess()) { return result.success; } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "chainUpdateEdge failed: unknown result"); - } - - public ExecResponse chainAddEdges(AddEdgesRequest req) throws TException - { - ContextStack ctx = getContextStack("GraphStorageService.chainAddEdges", null); - this.setContextStack(ctx); - send_chainAddEdges(req); - return recv_chainAddEdges(); - } - - public void send_chainAddEdges(AddEdgesRequest req) throws TException - { - ContextStack ctx = this.getContextStack(); - super.preWrite(ctx, "GraphStorageService.chainAddEdges", null); - oprot_.writeMessageBegin(new TMessage("chainAddEdges", TMessageType.CALL, seqid_)); - chainAddEdges_args args = new chainAddEdges_args(); - args.req = req; - args.write(oprot_); - oprot_.writeMessageEnd(); - oprot_.getTransport().flush(); - super.postWrite(ctx, "GraphStorageService.chainAddEdges", args); - return; - } - - public ExecResponse recv_chainAddEdges() throws TException - { - ContextStack ctx = super.getContextStack(); - long bytes; - TMessageType mtype; - super.preRead(ctx, "GraphStorageService.chainAddEdges"); - TMessage msg = iprot_.readMessageBegin(); - if (msg.type == TMessageType.EXCEPTION) { - TApplicationException x = TApplicationException.read(iprot_); - iprot_.readMessageEnd(); - throw x; - } - chainAddEdges_result result = new chainAddEdges_result(); - result.read(iprot_); - iprot_.readMessageEnd(); - super.postRead(ctx, "GraphStorageService.chainAddEdges", result); - - if (result.isSetSuccess()) { - return result.success; - } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "chainAddEdges failed: unknown result"); + throw new TApplicationException(TApplicationException.MISSING_RESULT, "addEdgesAtomic failed: unknown result"); } } @@ -868,17 +819,17 @@ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientM super(protocolFactory, clientManager, transport); } - public void getNeighbors(GetNeighborsRequest req, AsyncMethodCallback resultHandler304) throws TException { + public void getNeighbors(GetNeighborsRequest req, AsyncMethodCallback resultHandler280) throws TException { checkReady(); - getNeighbors_call method_call = new getNeighbors_call(req, resultHandler304, this, ___protocolFactory, ___transport); + getNeighbors_call method_call = new getNeighbors_call(req, resultHandler280, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getNeighbors_call extends TAsyncMethodCall { private GetNeighborsRequest req; - public getNeighbors_call(GetNeighborsRequest req, AsyncMethodCallback resultHandler305, TAsyncClient client301, TProtocolFactory protocolFactory302, TNonblockingTransport transport303) throws TException { - super(client301, protocolFactory302, transport303, resultHandler305, false); + public getNeighbors_call(GetNeighborsRequest req, AsyncMethodCallback resultHandler281, TAsyncClient client277, TProtocolFactory protocolFactory278, TNonblockingTransport transport279) throws TException { + super(client277, protocolFactory278, transport279, resultHandler281, false); this.req = req; } @@ -900,17 +851,17 @@ public GetNeighborsResponse getResult() throws TException { } } - public void getProps(GetPropRequest req, AsyncMethodCallback resultHandler309) throws TException { + public void getProps(GetPropRequest req, AsyncMethodCallback resultHandler285) throws TException { checkReady(); - getProps_call method_call = new getProps_call(req, resultHandler309, this, ___protocolFactory, ___transport); + getProps_call method_call = new getProps_call(req, resultHandler285, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getProps_call extends TAsyncMethodCall { private GetPropRequest req; - public getProps_call(GetPropRequest req, AsyncMethodCallback resultHandler310, TAsyncClient client306, TProtocolFactory protocolFactory307, TNonblockingTransport transport308) throws TException { - super(client306, protocolFactory307, transport308, resultHandler310, false); + public getProps_call(GetPropRequest req, AsyncMethodCallback resultHandler286, TAsyncClient client282, TProtocolFactory protocolFactory283, TNonblockingTransport transport284) throws TException { + super(client282, protocolFactory283, transport284, resultHandler286, false); this.req = req; } @@ -932,17 +883,17 @@ public GetPropResponse getResult() throws TException { } } - public void addVertices(AddVerticesRequest req, AsyncMethodCallback resultHandler314) throws TException { + public void addVertices(AddVerticesRequest req, AsyncMethodCallback resultHandler290) throws TException { checkReady(); - addVertices_call method_call = new addVertices_call(req, resultHandler314, this, ___protocolFactory, ___transport); + addVertices_call method_call = new addVertices_call(req, resultHandler290, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addVertices_call extends TAsyncMethodCall { private AddVerticesRequest req; - public addVertices_call(AddVerticesRequest req, AsyncMethodCallback resultHandler315, TAsyncClient client311, TProtocolFactory protocolFactory312, TNonblockingTransport transport313) throws TException { - super(client311, protocolFactory312, transport313, resultHandler315, false); + public addVertices_call(AddVerticesRequest req, AsyncMethodCallback resultHandler291, TAsyncClient client287, TProtocolFactory protocolFactory288, TNonblockingTransport transport289) throws TException { + super(client287, protocolFactory288, transport289, resultHandler291, false); this.req = req; } @@ -964,17 +915,17 @@ public ExecResponse getResult() throws TException { } } - public void addEdges(AddEdgesRequest req, AsyncMethodCallback resultHandler319) throws TException { + public void addEdges(AddEdgesRequest req, AsyncMethodCallback resultHandler295) throws TException { checkReady(); - addEdges_call method_call = new addEdges_call(req, resultHandler319, this, ___protocolFactory, ___transport); + addEdges_call method_call = new addEdges_call(req, resultHandler295, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addEdges_call extends TAsyncMethodCall { private AddEdgesRequest req; - public addEdges_call(AddEdgesRequest req, AsyncMethodCallback resultHandler320, TAsyncClient client316, TProtocolFactory protocolFactory317, TNonblockingTransport transport318) throws TException { - super(client316, protocolFactory317, transport318, resultHandler320, false); + public addEdges_call(AddEdgesRequest req, AsyncMethodCallback resultHandler296, TAsyncClient client292, TProtocolFactory protocolFactory293, TNonblockingTransport transport294) throws TException { + super(client292, protocolFactory293, transport294, resultHandler296, false); this.req = req; } @@ -996,17 +947,17 @@ public ExecResponse getResult() throws TException { } } - public void deleteEdges(DeleteEdgesRequest req, AsyncMethodCallback resultHandler324) throws TException { + public void deleteEdges(DeleteEdgesRequest req, AsyncMethodCallback resultHandler300) throws TException { checkReady(); - deleteEdges_call method_call = new deleteEdges_call(req, resultHandler324, this, ___protocolFactory, ___transport); + deleteEdges_call method_call = new deleteEdges_call(req, resultHandler300, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class deleteEdges_call extends TAsyncMethodCall { private DeleteEdgesRequest req; - public deleteEdges_call(DeleteEdgesRequest req, AsyncMethodCallback resultHandler325, TAsyncClient client321, TProtocolFactory protocolFactory322, TNonblockingTransport transport323) throws TException { - super(client321, protocolFactory322, transport323, resultHandler325, false); + public deleteEdges_call(DeleteEdgesRequest req, AsyncMethodCallback resultHandler301, TAsyncClient client297, TProtocolFactory protocolFactory298, TNonblockingTransport transport299) throws TException { + super(client297, protocolFactory298, transport299, resultHandler301, false); this.req = req; } @@ -1028,17 +979,17 @@ public ExecResponse getResult() throws TException { } } - public void deleteVertices(DeleteVerticesRequest req, AsyncMethodCallback resultHandler329) throws TException { + public void deleteVertices(DeleteVerticesRequest req, AsyncMethodCallback resultHandler305) throws TException { checkReady(); - deleteVertices_call method_call = new deleteVertices_call(req, resultHandler329, this, ___protocolFactory, ___transport); + deleteVertices_call method_call = new deleteVertices_call(req, resultHandler305, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class deleteVertices_call extends TAsyncMethodCall { private DeleteVerticesRequest req; - public deleteVertices_call(DeleteVerticesRequest req, AsyncMethodCallback resultHandler330, TAsyncClient client326, TProtocolFactory protocolFactory327, TNonblockingTransport transport328) throws TException { - super(client326, protocolFactory327, transport328, resultHandler330, false); + public deleteVertices_call(DeleteVerticesRequest req, AsyncMethodCallback resultHandler306, TAsyncClient client302, TProtocolFactory protocolFactory303, TNonblockingTransport transport304) throws TException { + super(client302, protocolFactory303, transport304, resultHandler306, false); this.req = req; } @@ -1060,17 +1011,17 @@ public ExecResponse getResult() throws TException { } } - public void deleteTags(DeleteTagsRequest req, AsyncMethodCallback resultHandler334) throws TException { + public void deleteTags(DeleteTagsRequest req, AsyncMethodCallback resultHandler310) throws TException { checkReady(); - deleteTags_call method_call = new deleteTags_call(req, resultHandler334, this, ___protocolFactory, ___transport); + deleteTags_call method_call = new deleteTags_call(req, resultHandler310, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class deleteTags_call extends TAsyncMethodCall { private DeleteTagsRequest req; - public deleteTags_call(DeleteTagsRequest req, AsyncMethodCallback resultHandler335, TAsyncClient client331, TProtocolFactory protocolFactory332, TNonblockingTransport transport333) throws TException { - super(client331, protocolFactory332, transport333, resultHandler335, false); + public deleteTags_call(DeleteTagsRequest req, AsyncMethodCallback resultHandler311, TAsyncClient client307, TProtocolFactory protocolFactory308, TNonblockingTransport transport309) throws TException { + super(client307, protocolFactory308, transport309, resultHandler311, false); this.req = req; } @@ -1092,17 +1043,17 @@ public ExecResponse getResult() throws TException { } } - public void updateVertex(UpdateVertexRequest req, AsyncMethodCallback resultHandler339) throws TException { + public void updateVertex(UpdateVertexRequest req, AsyncMethodCallback resultHandler315) throws TException { checkReady(); - updateVertex_call method_call = new updateVertex_call(req, resultHandler339, this, ___protocolFactory, ___transport); + updateVertex_call method_call = new updateVertex_call(req, resultHandler315, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class updateVertex_call extends TAsyncMethodCall { private UpdateVertexRequest req; - public updateVertex_call(UpdateVertexRequest req, AsyncMethodCallback resultHandler340, TAsyncClient client336, TProtocolFactory protocolFactory337, TNonblockingTransport transport338) throws TException { - super(client336, protocolFactory337, transport338, resultHandler340, false); + public updateVertex_call(UpdateVertexRequest req, AsyncMethodCallback resultHandler316, TAsyncClient client312, TProtocolFactory protocolFactory313, TNonblockingTransport transport314) throws TException { + super(client312, protocolFactory313, transport314, resultHandler316, false); this.req = req; } @@ -1124,17 +1075,17 @@ public UpdateResponse getResult() throws TException { } } - public void updateEdge(UpdateEdgeRequest req, AsyncMethodCallback resultHandler344) throws TException { + public void updateEdge(UpdateEdgeRequest req, AsyncMethodCallback resultHandler320) throws TException { checkReady(); - updateEdge_call method_call = new updateEdge_call(req, resultHandler344, this, ___protocolFactory, ___transport); + updateEdge_call method_call = new updateEdge_call(req, resultHandler320, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class updateEdge_call extends TAsyncMethodCall { private UpdateEdgeRequest req; - public updateEdge_call(UpdateEdgeRequest req, AsyncMethodCallback resultHandler345, TAsyncClient client341, TProtocolFactory protocolFactory342, TNonblockingTransport transport343) throws TException { - super(client341, protocolFactory342, transport343, resultHandler345, false); + public updateEdge_call(UpdateEdgeRequest req, AsyncMethodCallback resultHandler321, TAsyncClient client317, TProtocolFactory protocolFactory318, TNonblockingTransport transport319) throws TException { + super(client317, protocolFactory318, transport319, resultHandler321, false); this.req = req; } @@ -1156,17 +1107,17 @@ public UpdateResponse getResult() throws TException { } } - public void scanVertex(ScanVertexRequest req, AsyncMethodCallback resultHandler349) throws TException { + public void scanVertex(ScanVertexRequest req, AsyncMethodCallback resultHandler325) throws TException { checkReady(); - scanVertex_call method_call = new scanVertex_call(req, resultHandler349, this, ___protocolFactory, ___transport); + scanVertex_call method_call = new scanVertex_call(req, resultHandler325, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class scanVertex_call extends TAsyncMethodCall { private ScanVertexRequest req; - public scanVertex_call(ScanVertexRequest req, AsyncMethodCallback resultHandler350, TAsyncClient client346, TProtocolFactory protocolFactory347, TNonblockingTransport transport348) throws TException { - super(client346, protocolFactory347, transport348, resultHandler350, false); + public scanVertex_call(ScanVertexRequest req, AsyncMethodCallback resultHandler326, TAsyncClient client322, TProtocolFactory protocolFactory323, TNonblockingTransport transport324) throws TException { + super(client322, protocolFactory323, transport324, resultHandler326, false); this.req = req; } @@ -1188,17 +1139,17 @@ public ScanVertexResponse getResult() throws TException { } } - public void scanEdge(ScanEdgeRequest req, AsyncMethodCallback resultHandler354) throws TException { + public void scanEdge(ScanEdgeRequest req, AsyncMethodCallback resultHandler330) throws TException { checkReady(); - scanEdge_call method_call = new scanEdge_call(req, resultHandler354, this, ___protocolFactory, ___transport); + scanEdge_call method_call = new scanEdge_call(req, resultHandler330, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class scanEdge_call extends TAsyncMethodCall { private ScanEdgeRequest req; - public scanEdge_call(ScanEdgeRequest req, AsyncMethodCallback resultHandler355, TAsyncClient client351, TProtocolFactory protocolFactory352, TNonblockingTransport transport353) throws TException { - super(client351, protocolFactory352, transport353, resultHandler355, false); + public scanEdge_call(ScanEdgeRequest req, AsyncMethodCallback resultHandler331, TAsyncClient client327, TProtocolFactory protocolFactory328, TNonblockingTransport transport329) throws TException { + super(client327, protocolFactory328, transport329, resultHandler331, false); this.req = req; } @@ -1220,17 +1171,17 @@ public ScanEdgeResponse getResult() throws TException { } } - public void getUUID(GetUUIDReq req, AsyncMethodCallback resultHandler359) throws TException { + public void getUUID(GetUUIDReq req, AsyncMethodCallback resultHandler335) throws TException { checkReady(); - getUUID_call method_call = new getUUID_call(req, resultHandler359, this, ___protocolFactory, ___transport); + getUUID_call method_call = new getUUID_call(req, resultHandler335, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getUUID_call extends TAsyncMethodCall { private GetUUIDReq req; - public getUUID_call(GetUUIDReq req, AsyncMethodCallback resultHandler360, TAsyncClient client356, TProtocolFactory protocolFactory357, TNonblockingTransport transport358) throws TException { - super(client356, protocolFactory357, transport358, resultHandler360, false); + public getUUID_call(GetUUIDReq req, AsyncMethodCallback resultHandler336, TAsyncClient client332, TProtocolFactory protocolFactory333, TNonblockingTransport transport334) throws TException { + super(client332, protocolFactory333, transport334, resultHandler336, false); this.req = req; } @@ -1252,17 +1203,17 @@ public GetUUIDResp getResult() throws TException { } } - public void lookupIndex(LookupIndexRequest req, AsyncMethodCallback resultHandler364) throws TException { + public void lookupIndex(LookupIndexRequest req, AsyncMethodCallback resultHandler340) throws TException { checkReady(); - lookupIndex_call method_call = new lookupIndex_call(req, resultHandler364, this, ___protocolFactory, ___transport); + lookupIndex_call method_call = new lookupIndex_call(req, resultHandler340, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class lookupIndex_call extends TAsyncMethodCall { private LookupIndexRequest req; - public lookupIndex_call(LookupIndexRequest req, AsyncMethodCallback resultHandler365, TAsyncClient client361, TProtocolFactory protocolFactory362, TNonblockingTransport transport363) throws TException { - super(client361, protocolFactory362, transport363, resultHandler365, false); + public lookupIndex_call(LookupIndexRequest req, AsyncMethodCallback resultHandler341, TAsyncClient client337, TProtocolFactory protocolFactory338, TNonblockingTransport transport339) throws TException { + super(client337, protocolFactory338, transport339, resultHandler341, false); this.req = req; } @@ -1284,17 +1235,17 @@ public LookupIndexResp getResult() throws TException { } } - public void lookupAndTraverse(LookupAndTraverseRequest req, AsyncMethodCallback resultHandler369) throws TException { + public void lookupAndTraverse(LookupAndTraverseRequest req, AsyncMethodCallback resultHandler345) throws TException { checkReady(); - lookupAndTraverse_call method_call = new lookupAndTraverse_call(req, resultHandler369, this, ___protocolFactory, ___transport); + lookupAndTraverse_call method_call = new lookupAndTraverse_call(req, resultHandler345, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class lookupAndTraverse_call extends TAsyncMethodCall { private LookupAndTraverseRequest req; - public lookupAndTraverse_call(LookupAndTraverseRequest req, AsyncMethodCallback resultHandler370, TAsyncClient client366, TProtocolFactory protocolFactory367, TNonblockingTransport transport368) throws TException { - super(client366, protocolFactory367, transport368, resultHandler370, false); + public lookupAndTraverse_call(LookupAndTraverseRequest req, AsyncMethodCallback resultHandler346, TAsyncClient client342, TProtocolFactory protocolFactory343, TNonblockingTransport transport344) throws TException { + super(client342, protocolFactory343, transport344, resultHandler346, false); this.req = req; } @@ -1316,55 +1267,23 @@ public GetNeighborsResponse getResult() throws TException { } } - public void chainUpdateEdge(UpdateEdgeRequest req, AsyncMethodCallback resultHandler374) throws TException { + public void addEdgesAtomic(AddEdgesRequest req, AsyncMethodCallback resultHandler350) throws TException { checkReady(); - chainUpdateEdge_call method_call = new chainUpdateEdge_call(req, resultHandler374, this, ___protocolFactory, ___transport); + addEdgesAtomic_call method_call = new addEdgesAtomic_call(req, resultHandler350, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class chainUpdateEdge_call extends TAsyncMethodCall { - private UpdateEdgeRequest req; - public chainUpdateEdge_call(UpdateEdgeRequest req, AsyncMethodCallback resultHandler375, TAsyncClient client371, TProtocolFactory protocolFactory372, TNonblockingTransport transport373) throws TException { - super(client371, protocolFactory372, transport373, resultHandler375, false); - this.req = req; - } - - public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("chainUpdateEdge", TMessageType.CALL, 0)); - chainUpdateEdge_args args = new chainUpdateEdge_args(); - args.setReq(req); - args.write(prot); - prot.writeMessageEnd(); - } - - public UpdateResponse getResult() throws TException { - if (getState() != State.RESPONSE_READ) { - throw new IllegalStateException("Method call not finished!"); - } - TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); - TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_chainUpdateEdge(); - } - } - - public void chainAddEdges(AddEdgesRequest req, AsyncMethodCallback resultHandler379) throws TException { - checkReady(); - chainAddEdges_call method_call = new chainAddEdges_call(req, resultHandler379, this, ___protocolFactory, ___transport); - this.___currentMethod = method_call; - ___manager.call(method_call); - } - - public static class chainAddEdges_call extends TAsyncMethodCall { + public static class addEdgesAtomic_call extends TAsyncMethodCall { private AddEdgesRequest req; - public chainAddEdges_call(AddEdgesRequest req, AsyncMethodCallback resultHandler380, TAsyncClient client376, TProtocolFactory protocolFactory377, TNonblockingTransport transport378) throws TException { - super(client376, protocolFactory377, transport378, resultHandler380, false); + public addEdgesAtomic_call(AddEdgesRequest req, AsyncMethodCallback resultHandler351, TAsyncClient client347, TProtocolFactory protocolFactory348, TNonblockingTransport transport349) throws TException { + super(client347, protocolFactory348, transport349, resultHandler351, false); this.req = req; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("chainAddEdges", TMessageType.CALL, 0)); - chainAddEdges_args args = new chainAddEdges_args(); + prot.writeMessageBegin(new TMessage("addEdgesAtomic", TMessageType.CALL, 0)); + addEdgesAtomic_args args = new addEdgesAtomic_args(); args.setReq(req); args.write(prot); prot.writeMessageEnd(); @@ -1376,7 +1295,7 @@ public ExecResponse getResult() throws TException { } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_chainAddEdges(); + return (new Client(prot)).recv_addEdgesAtomic(); } } @@ -1402,8 +1321,7 @@ public Processor(Iface iface) processMap_.put("getUUID", new getUUID()); processMap_.put("lookupIndex", new lookupIndex()); processMap_.put("lookupAndTraverse", new lookupAndTraverse()); - processMap_.put("chainUpdateEdge", new chainUpdateEdge()); - processMap_.put("chainAddEdges", new chainAddEdges()); + processMap_.put("addEdgesAtomic", new addEdgesAtomic()); } protected static interface ProcessFunction { @@ -1730,44 +1648,23 @@ public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionCont } - private class chainUpdateEdge implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException - { - Object handler_ctx = event_handler_.getContext("GraphStorageService.chainUpdateEdge", server_ctx); - chainUpdateEdge_args args = new chainUpdateEdge_args(); - event_handler_.preRead(handler_ctx, "GraphStorageService.chainUpdateEdge"); - args.read(iprot); - iprot.readMessageEnd(); - event_handler_.postRead(handler_ctx, "GraphStorageService.chainUpdateEdge", args); - chainUpdateEdge_result result = new chainUpdateEdge_result(); - result.success = iface_.chainUpdateEdge(args.req); - event_handler_.preWrite(handler_ctx, "GraphStorageService.chainUpdateEdge", result); - oprot.writeMessageBegin(new TMessage("chainUpdateEdge", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - event_handler_.postWrite(handler_ctx, "GraphStorageService.chainUpdateEdge", result); - } - - } - - private class chainAddEdges implements ProcessFunction { + private class addEdgesAtomic implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException { - Object handler_ctx = event_handler_.getContext("GraphStorageService.chainAddEdges", server_ctx); - chainAddEdges_args args = new chainAddEdges_args(); - event_handler_.preRead(handler_ctx, "GraphStorageService.chainAddEdges"); + Object handler_ctx = event_handler_.getContext("GraphStorageService.addEdgesAtomic", server_ctx); + addEdgesAtomic_args args = new addEdgesAtomic_args(); + event_handler_.preRead(handler_ctx, "GraphStorageService.addEdgesAtomic"); args.read(iprot); iprot.readMessageEnd(); - event_handler_.postRead(handler_ctx, "GraphStorageService.chainAddEdges", args); - chainAddEdges_result result = new chainAddEdges_result(); - result.success = iface_.chainAddEdges(args.req); - event_handler_.preWrite(handler_ctx, "GraphStorageService.chainAddEdges", result); - oprot.writeMessageBegin(new TMessage("chainAddEdges", TMessageType.REPLY, seqid)); + event_handler_.postRead(handler_ctx, "GraphStorageService.addEdgesAtomic", args); + addEdgesAtomic_result result = new addEdgesAtomic_result(); + result.success = iface_.addEdgesAtomic(args.req); + event_handler_.preWrite(handler_ctx, "GraphStorageService.addEdgesAtomic", result); + oprot.writeMessageBegin(new TMessage("addEdgesAtomic", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); - event_handler_.postWrite(handler_ctx, "GraphStorageService.chainAddEdges", result); + event_handler_.postWrite(handler_ctx, "GraphStorageService.addEdgesAtomic", result); } } @@ -7404,397 +7301,8 @@ public void validate() throws TException { } - public static class chainUpdateEdge_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("chainUpdateEdge_args"); - private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1); - - public UpdateEdgeRequest req; - public static final int REQ = 1; - - // isset id assignments - - public static final Map metaDataMap; - - static { - Map tmpMetaDataMap = new HashMap(); - tmpMetaDataMap.put(REQ, new FieldMetaData("req", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, UpdateEdgeRequest.class))); - metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); - } - - static { - FieldMetaData.addStructMetaDataMap(chainUpdateEdge_args.class, metaDataMap); - } - - public chainUpdateEdge_args() { - } - - public chainUpdateEdge_args( - UpdateEdgeRequest req) { - this(); - this.req = req; - } - - /** - * Performs a deep copy on other. - */ - public chainUpdateEdge_args(chainUpdateEdge_args other) { - if (other.isSetReq()) { - this.req = TBaseHelper.deepCopy(other.req); - } - } - - public chainUpdateEdge_args deepCopy() { - return new chainUpdateEdge_args(this); - } - - public UpdateEdgeRequest getReq() { - return this.req; - } - - public chainUpdateEdge_args setReq(UpdateEdgeRequest req) { - this.req = req; - return this; - } - - public void unsetReq() { - this.req = null; - } - - // Returns true if field req is set (has been assigned a value) and false otherwise - public boolean isSetReq() { - return this.req != null; - } - - public void setReqIsSet(boolean __value) { - if (!__value) { - this.req = null; - } - } - - public void setFieldValue(int fieldID, Object __value) { - switch (fieldID) { - case REQ: - if (__value == null) { - unsetReq(); - } else { - setReq((UpdateEdgeRequest)__value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case REQ: - return getReq(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object _that) { - if (_that == null) - return false; - if (this == _that) - return true; - if (!(_that instanceof chainUpdateEdge_args)) - return false; - chainUpdateEdge_args that = (chainUpdateEdge_args)_that; - - if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; } - - return true; - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(new Object[] {req}); - } - - public void read(TProtocol iprot) throws TException { - TField __field; - iprot.readStructBegin(metaDataMap); - while (true) - { - __field = iprot.readFieldBegin(); - if (__field.type == TType.STOP) { - break; - } - switch (__field.id) - { - case REQ: - if (__field.type == TType.STRUCT) { - this.req = new UpdateEdgeRequest(); - this.req.read(iprot); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - default: - TProtocolUtil.skip(iprot, __field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.req != null) { - oprot.writeFieldBegin(REQ_FIELD_DESC); - this.req.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - return toString(1, true); - } - - @Override - public String toString(int indent, boolean prettyPrint) { - String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; - String newLine = prettyPrint ? "\n" : ""; - String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("chainUpdateEdge_args"); - sb.append(space); - sb.append("("); - sb.append(newLine); - boolean first = true; - - sb.append(indentStr); - sb.append("req"); - sb.append(space); - sb.append(":").append(space); - if (this.getReq() == null) { - sb.append("null"); - } else { - sb.append(TBaseHelper.toString(this.getReq(), indent + 1, prettyPrint)); - } - first = false; - sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - } - - } - - public static class chainUpdateEdge_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("chainUpdateEdge_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - - public UpdateResponse success; - public static final int SUCCESS = 0; - - // isset id assignments - - public static final Map metaDataMap; - - static { - Map tmpMetaDataMap = new HashMap(); - tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, UpdateResponse.class))); - metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); - } - - static { - FieldMetaData.addStructMetaDataMap(chainUpdateEdge_result.class, metaDataMap); - } - - public chainUpdateEdge_result() { - } - - public chainUpdateEdge_result( - UpdateResponse success) { - this(); - this.success = success; - } - - /** - * Performs a deep copy on other. - */ - public chainUpdateEdge_result(chainUpdateEdge_result other) { - if (other.isSetSuccess()) { - this.success = TBaseHelper.deepCopy(other.success); - } - } - - public chainUpdateEdge_result deepCopy() { - return new chainUpdateEdge_result(this); - } - - public UpdateResponse getSuccess() { - return this.success; - } - - public chainUpdateEdge_result setSuccess(UpdateResponse 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 void setFieldValue(int fieldID, Object __value) { - switch (fieldID) { - case SUCCESS: - if (__value == null) { - unsetSuccess(); - } else { - setSuccess((UpdateResponse)__value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object _that) { - if (_that == null) - return false; - if (this == _that) - return true; - if (!(_that instanceof chainUpdateEdge_result)) - return false; - chainUpdateEdge_result that = (chainUpdateEdge_result)_that; - - if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; } - - return true; - } - - @Override - public int hashCode() { - return Arrays.deepHashCode(new Object[] {success}); - } - - public void read(TProtocol iprot) throws TException { - TField __field; - iprot.readStructBegin(metaDataMap); - while (true) - { - __field = iprot.readFieldBegin(); - if (__field.type == TType.STOP) { - break; - } - switch (__field.id) - { - case SUCCESS: - if (__field.type == TType.STRUCT) { - this.success = new UpdateResponse(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; - default: - TProtocolUtil.skip(iprot, __field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - return toString(1, true); - } - - @Override - public String toString(int indent, boolean prettyPrint) { - String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; - String newLine = prettyPrint ? "\n" : ""; - String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("chainUpdateEdge_result"); - sb.append(space); - sb.append("("); - sb.append(newLine); - boolean first = true; - - sb.append(indentStr); - sb.append("success"); - sb.append(space); - sb.append(":").append(space); - if (this.getSuccess() == null) { - sb.append("null"); - } else { - sb.append(TBaseHelper.toString(this.getSuccess(), indent + 1, prettyPrint)); - } - first = false; - sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - } - - } - - public static class chainAddEdges_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("chainAddEdges_args"); + public static class addEdgesAtomic_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("addEdgesAtomic_args"); private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1); public AddEdgesRequest req; @@ -7812,13 +7320,13 @@ public static class chainAddEdges_args implements TBase, java.io.Serializable, C } static { - FieldMetaData.addStructMetaDataMap(chainAddEdges_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(addEdgesAtomic_args.class, metaDataMap); } - public chainAddEdges_args() { + public addEdgesAtomic_args() { } - public chainAddEdges_args( + public addEdgesAtomic_args( AddEdgesRequest req) { this(); this.req = req; @@ -7827,21 +7335,21 @@ public chainAddEdges_args( /** * Performs a deep copy on other. */ - public chainAddEdges_args(chainAddEdges_args other) { + public addEdgesAtomic_args(addEdgesAtomic_args other) { if (other.isSetReq()) { this.req = TBaseHelper.deepCopy(other.req); } } - public chainAddEdges_args deepCopy() { - return new chainAddEdges_args(this); + public addEdgesAtomic_args deepCopy() { + return new addEdgesAtomic_args(this); } public AddEdgesRequest getReq() { return this.req; } - public chainAddEdges_args setReq(AddEdgesRequest req) { + public addEdgesAtomic_args setReq(AddEdgesRequest req) { this.req = req; return this; } @@ -7892,9 +7400,9 @@ public boolean equals(Object _that) { return false; if (this == _that) return true; - if (!(_that instanceof chainAddEdges_args)) + if (!(_that instanceof addEdgesAtomic_args)) return false; - chainAddEdges_args that = (chainAddEdges_args)_that; + addEdgesAtomic_args that = (addEdgesAtomic_args)_that; if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; } @@ -7961,7 +7469,7 @@ public String toString(int indent, boolean prettyPrint) { String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; String newLine = prettyPrint ? "\n" : ""; String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("chainAddEdges_args"); + StringBuilder sb = new StringBuilder("addEdgesAtomic_args"); sb.append(space); sb.append("("); sb.append(newLine); @@ -7988,8 +7496,8 @@ public void validate() throws TException { } - public static class chainAddEdges_result implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("chainAddEdges_result"); + public static class addEdgesAtomic_result implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("addEdgesAtomic_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); public ExecResponse success; @@ -8007,13 +7515,13 @@ public static class chainAddEdges_result implements TBase, java.io.Serializable, } static { - FieldMetaData.addStructMetaDataMap(chainAddEdges_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(addEdgesAtomic_result.class, metaDataMap); } - public chainAddEdges_result() { + public addEdgesAtomic_result() { } - public chainAddEdges_result( + public addEdgesAtomic_result( ExecResponse success) { this(); this.success = success; @@ -8022,21 +7530,21 @@ public chainAddEdges_result( /** * Performs a deep copy on other. */ - public chainAddEdges_result(chainAddEdges_result other) { + public addEdgesAtomic_result(addEdgesAtomic_result other) { if (other.isSetSuccess()) { this.success = TBaseHelper.deepCopy(other.success); } } - public chainAddEdges_result deepCopy() { - return new chainAddEdges_result(this); + public addEdgesAtomic_result deepCopy() { + return new addEdgesAtomic_result(this); } public ExecResponse getSuccess() { return this.success; } - public chainAddEdges_result setSuccess(ExecResponse success) { + public addEdgesAtomic_result setSuccess(ExecResponse success) { this.success = success; return this; } @@ -8087,9 +7595,9 @@ public boolean equals(Object _that) { return false; if (this == _that) return true; - if (!(_that instanceof chainAddEdges_result)) + if (!(_that instanceof addEdgesAtomic_result)) return false; - chainAddEdges_result that = (chainAddEdges_result)_that; + addEdgesAtomic_result that = (addEdgesAtomic_result)_that; if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; } @@ -8102,7 +7610,7 @@ public int hashCode() { } @Override - public int compareTo(chainAddEdges_result other) { + public int compareTo(addEdgesAtomic_result other) { if (other == null) { // See java.lang.Comparable docs throw new NullPointerException(); @@ -8178,7 +7686,7 @@ public String toString(int indent, boolean prettyPrint) { String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; String newLine = prettyPrint ? "\n" : ""; String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("chainAddEdges_result"); + StringBuilder sb = new StringBuilder("addEdgesAtomic_result"); sb.append(space); sb.append("("); sb.append(newLine); diff --git a/client/src/main/generated/com/vesoft/nebula/storage/InternalStorageService.java b/client/src/main/generated/com/vesoft/nebula/storage/InternalStorageService.java index dc8f229b4..0b7b04369 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/InternalStorageService.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/InternalStorageService.java @@ -31,17 +31,17 @@ public class InternalStorageService { public interface Iface { - public ExecResponse chainAddEdges(ChainAddEdgesRequest req) throws TException; + public GetValueResponse getValue(GetValueRequest req) throws TException; - public UpdateResponse chainUpdateEdge(ChainUpdateEdgeRequest req) throws TException; + public ExecResponse forwardTransaction(InternalTxnRequest req) throws TException; } public interface AsyncIface { - public void chainAddEdges(ChainAddEdgesRequest req, AsyncMethodCallback resultHandler) throws TException; + public void getValue(GetValueRequest req, AsyncMethodCallback resultHandler) throws TException; - public void chainUpdateEdge(ChainUpdateEdgeRequest req, AsyncMethodCallback resultHandler) throws TException; + public void forwardTransaction(InternalTxnRequest req, AsyncMethodCallback resultHandler) throws TException; } @@ -74,94 +74,94 @@ public TProtocol getOutputProtocol() return this.oprot_; } - public ExecResponse chainAddEdges(ChainAddEdgesRequest req) throws TException + public GetValueResponse getValue(GetValueRequest req) throws TException { - ContextStack ctx = getContextStack("InternalStorageService.chainAddEdges", null); + ContextStack ctx = getContextStack("InternalStorageService.getValue", null); this.setContextStack(ctx); - send_chainAddEdges(req); - return recv_chainAddEdges(); + send_getValue(req); + return recv_getValue(); } - public void send_chainAddEdges(ChainAddEdgesRequest req) throws TException + public void send_getValue(GetValueRequest req) throws TException { ContextStack ctx = this.getContextStack(); - super.preWrite(ctx, "InternalStorageService.chainAddEdges", null); - oprot_.writeMessageBegin(new TMessage("chainAddEdges", TMessageType.CALL, seqid_)); - chainAddEdges_args args = new chainAddEdges_args(); + super.preWrite(ctx, "InternalStorageService.getValue", null); + oprot_.writeMessageBegin(new TMessage("getValue", TMessageType.CALL, seqid_)); + getValue_args args = new getValue_args(); args.req = req; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); - super.postWrite(ctx, "InternalStorageService.chainAddEdges", args); + super.postWrite(ctx, "InternalStorageService.getValue", args); return; } - public ExecResponse recv_chainAddEdges() throws TException + public GetValueResponse recv_getValue() throws TException { ContextStack ctx = super.getContextStack(); long bytes; TMessageType mtype; - super.preRead(ctx, "InternalStorageService.chainAddEdges"); + super.preRead(ctx, "InternalStorageService.getValue"); TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } - chainAddEdges_result result = new chainAddEdges_result(); + getValue_result result = new getValue_result(); result.read(iprot_); iprot_.readMessageEnd(); - super.postRead(ctx, "InternalStorageService.chainAddEdges", result); + super.postRead(ctx, "InternalStorageService.getValue", result); if (result.isSetSuccess()) { return result.success; } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "chainAddEdges failed: unknown result"); + throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValue failed: unknown result"); } - public UpdateResponse chainUpdateEdge(ChainUpdateEdgeRequest req) throws TException + public ExecResponse forwardTransaction(InternalTxnRequest req) throws TException { - ContextStack ctx = getContextStack("InternalStorageService.chainUpdateEdge", null); + ContextStack ctx = getContextStack("InternalStorageService.forwardTransaction", null); this.setContextStack(ctx); - send_chainUpdateEdge(req); - return recv_chainUpdateEdge(); + send_forwardTransaction(req); + return recv_forwardTransaction(); } - public void send_chainUpdateEdge(ChainUpdateEdgeRequest req) throws TException + public void send_forwardTransaction(InternalTxnRequest req) throws TException { ContextStack ctx = this.getContextStack(); - super.preWrite(ctx, "InternalStorageService.chainUpdateEdge", null); - oprot_.writeMessageBegin(new TMessage("chainUpdateEdge", TMessageType.CALL, seqid_)); - chainUpdateEdge_args args = new chainUpdateEdge_args(); + super.preWrite(ctx, "InternalStorageService.forwardTransaction", null); + oprot_.writeMessageBegin(new TMessage("forwardTransaction", TMessageType.CALL, seqid_)); + forwardTransaction_args args = new forwardTransaction_args(); args.req = req; args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); - super.postWrite(ctx, "InternalStorageService.chainUpdateEdge", args); + super.postWrite(ctx, "InternalStorageService.forwardTransaction", args); return; } - public UpdateResponse recv_chainUpdateEdge() throws TException + public ExecResponse recv_forwardTransaction() throws TException { ContextStack ctx = super.getContextStack(); long bytes; TMessageType mtype; - super.preRead(ctx, "InternalStorageService.chainUpdateEdge"); + super.preRead(ctx, "InternalStorageService.forwardTransaction"); TMessage msg = iprot_.readMessageBegin(); if (msg.type == TMessageType.EXCEPTION) { TApplicationException x = TApplicationException.read(iprot_); iprot_.readMessageEnd(); throw x; } - chainUpdateEdge_result result = new chainUpdateEdge_result(); + forwardTransaction_result result = new forwardTransaction_result(); result.read(iprot_); iprot_.readMessageEnd(); - super.postRead(ctx, "InternalStorageService.chainUpdateEdge", result); + super.postRead(ctx, "InternalStorageService.forwardTransaction", result); if (result.isSetSuccess()) { return result.success; } - throw new TApplicationException(TApplicationException.MISSING_RESULT, "chainUpdateEdge failed: unknown result"); + throw new TApplicationException(TApplicationException.MISSING_RESULT, "forwardTransaction failed: unknown result"); } } @@ -182,67 +182,67 @@ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientM super(protocolFactory, clientManager, transport); } - public void chainAddEdges(ChainAddEdgesRequest req, AsyncMethodCallback resultHandler500) throws TException { + public void getValue(GetValueRequest req, AsyncMethodCallback resultHandler471) throws TException { checkReady(); - chainAddEdges_call method_call = new chainAddEdges_call(req, resultHandler500, this, ___protocolFactory, ___transport); + getValue_call method_call = new getValue_call(req, resultHandler471, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class chainAddEdges_call extends TAsyncMethodCall { - private ChainAddEdgesRequest req; - public chainAddEdges_call(ChainAddEdgesRequest req, AsyncMethodCallback resultHandler501, TAsyncClient client497, TProtocolFactory protocolFactory498, TNonblockingTransport transport499) throws TException { - super(client497, protocolFactory498, transport499, resultHandler501, false); + public static class getValue_call extends TAsyncMethodCall { + private GetValueRequest req; + public getValue_call(GetValueRequest req, AsyncMethodCallback resultHandler472, TAsyncClient client468, TProtocolFactory protocolFactory469, TNonblockingTransport transport470) throws TException { + super(client468, protocolFactory469, transport470, resultHandler472, false); this.req = req; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("chainAddEdges", TMessageType.CALL, 0)); - chainAddEdges_args args = new chainAddEdges_args(); + prot.writeMessageBegin(new TMessage("getValue", TMessageType.CALL, 0)); + getValue_args args = new getValue_args(); args.setReq(req); args.write(prot); prot.writeMessageEnd(); } - public ExecResponse getResult() throws TException { + public GetValueResponse getResult() throws TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_chainAddEdges(); + return (new Client(prot)).recv_getValue(); } } - public void chainUpdateEdge(ChainUpdateEdgeRequest req, AsyncMethodCallback resultHandler505) throws TException { + public void forwardTransaction(InternalTxnRequest req, AsyncMethodCallback resultHandler476) throws TException { checkReady(); - chainUpdateEdge_call method_call = new chainUpdateEdge_call(req, resultHandler505, this, ___protocolFactory, ___transport); + forwardTransaction_call method_call = new forwardTransaction_call(req, resultHandler476, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } - public static class chainUpdateEdge_call extends TAsyncMethodCall { - private ChainUpdateEdgeRequest req; - public chainUpdateEdge_call(ChainUpdateEdgeRequest req, AsyncMethodCallback resultHandler506, TAsyncClient client502, TProtocolFactory protocolFactory503, TNonblockingTransport transport504) throws TException { - super(client502, protocolFactory503, transport504, resultHandler506, false); + public static class forwardTransaction_call extends TAsyncMethodCall { + private InternalTxnRequest req; + public forwardTransaction_call(InternalTxnRequest req, AsyncMethodCallback resultHandler477, TAsyncClient client473, TProtocolFactory protocolFactory474, TNonblockingTransport transport475) throws TException { + super(client473, protocolFactory474, transport475, resultHandler477, false); this.req = req; } public void write_args(TProtocol prot) throws TException { - prot.writeMessageBegin(new TMessage("chainUpdateEdge", TMessageType.CALL, 0)); - chainUpdateEdge_args args = new chainUpdateEdge_args(); + prot.writeMessageBegin(new TMessage("forwardTransaction", TMessageType.CALL, 0)); + forwardTransaction_args args = new forwardTransaction_args(); args.setReq(req); args.write(prot); prot.writeMessageEnd(); } - public UpdateResponse getResult() throws TException { + public ExecResponse getResult() throws TException { if (getState() != State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport); - return (new Client(prot)).recv_chainUpdateEdge(); + return (new Client(prot)).recv_forwardTransaction(); } } @@ -254,8 +254,8 @@ public Processor(Iface iface) { iface_ = iface; event_handler_ = new TProcessorEventHandler(); // Empty handler - processMap_.put("chainAddEdges", new chainAddEdges()); - processMap_.put("chainUpdateEdge", new chainUpdateEdge()); + processMap_.put("getValue", new getValue()); + processMap_.put("forwardTransaction", new forwardTransaction()); } protected static interface ProcessFunction { @@ -288,55 +288,55 @@ public boolean process(TProtocol iprot, TProtocol oprot, TConnectionContext serv return true; } - private class chainAddEdges implements ProcessFunction { + private class getValue implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException { - Object handler_ctx = event_handler_.getContext("InternalStorageService.chainAddEdges", server_ctx); - chainAddEdges_args args = new chainAddEdges_args(); - event_handler_.preRead(handler_ctx, "InternalStorageService.chainAddEdges"); + Object handler_ctx = event_handler_.getContext("InternalStorageService.getValue", server_ctx); + getValue_args args = new getValue_args(); + event_handler_.preRead(handler_ctx, "InternalStorageService.getValue"); args.read(iprot); iprot.readMessageEnd(); - event_handler_.postRead(handler_ctx, "InternalStorageService.chainAddEdges", args); - chainAddEdges_result result = new chainAddEdges_result(); - result.success = iface_.chainAddEdges(args.req); - event_handler_.preWrite(handler_ctx, "InternalStorageService.chainAddEdges", result); - oprot.writeMessageBegin(new TMessage("chainAddEdges", TMessageType.REPLY, seqid)); + event_handler_.postRead(handler_ctx, "InternalStorageService.getValue", args); + getValue_result result = new getValue_result(); + result.success = iface_.getValue(args.req); + event_handler_.preWrite(handler_ctx, "InternalStorageService.getValue", result); + oprot.writeMessageBegin(new TMessage("getValue", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); - event_handler_.postWrite(handler_ctx, "InternalStorageService.chainAddEdges", result); + event_handler_.postWrite(handler_ctx, "InternalStorageService.getValue", result); } } - private class chainUpdateEdge implements ProcessFunction { + private class forwardTransaction implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException { - Object handler_ctx = event_handler_.getContext("InternalStorageService.chainUpdateEdge", server_ctx); - chainUpdateEdge_args args = new chainUpdateEdge_args(); - event_handler_.preRead(handler_ctx, "InternalStorageService.chainUpdateEdge"); + Object handler_ctx = event_handler_.getContext("InternalStorageService.forwardTransaction", server_ctx); + forwardTransaction_args args = new forwardTransaction_args(); + event_handler_.preRead(handler_ctx, "InternalStorageService.forwardTransaction"); args.read(iprot); iprot.readMessageEnd(); - event_handler_.postRead(handler_ctx, "InternalStorageService.chainUpdateEdge", args); - chainUpdateEdge_result result = new chainUpdateEdge_result(); - result.success = iface_.chainUpdateEdge(args.req); - event_handler_.preWrite(handler_ctx, "InternalStorageService.chainUpdateEdge", result); - oprot.writeMessageBegin(new TMessage("chainUpdateEdge", TMessageType.REPLY, seqid)); + event_handler_.postRead(handler_ctx, "InternalStorageService.forwardTransaction", args); + forwardTransaction_result result = new forwardTransaction_result(); + result.success = iface_.forwardTransaction(args.req); + event_handler_.preWrite(handler_ctx, "InternalStorageService.forwardTransaction", result); + oprot.writeMessageBegin(new TMessage("forwardTransaction", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); - event_handler_.postWrite(handler_ctx, "InternalStorageService.chainUpdateEdge", result); + event_handler_.postWrite(handler_ctx, "InternalStorageService.forwardTransaction", result); } } } - public static class chainAddEdges_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("chainAddEdges_args"); + public static class getValue_args implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("getValue_args"); private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1); - public ChainAddEdgesRequest req; + public GetValueRequest req; public static final int REQ = 1; // isset id assignments @@ -346,19 +346,19 @@ public static class chainAddEdges_args implements TBase, java.io.Serializable, C static { Map tmpMetaDataMap = new HashMap(); tmpMetaDataMap.put(REQ, new FieldMetaData("req", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, ChainAddEdgesRequest.class))); + new StructMetaData(TType.STRUCT, GetValueRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } static { - FieldMetaData.addStructMetaDataMap(chainAddEdges_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(getValue_args.class, metaDataMap); } - public chainAddEdges_args() { + public getValue_args() { } - public chainAddEdges_args( - ChainAddEdgesRequest req) { + public getValue_args( + GetValueRequest req) { this(); this.req = req; } @@ -366,21 +366,21 @@ public chainAddEdges_args( /** * Performs a deep copy on other. */ - public chainAddEdges_args(chainAddEdges_args other) { + public getValue_args(getValue_args other) { if (other.isSetReq()) { this.req = TBaseHelper.deepCopy(other.req); } } - public chainAddEdges_args deepCopy() { - return new chainAddEdges_args(this); + public getValue_args deepCopy() { + return new getValue_args(this); } - public ChainAddEdgesRequest getReq() { + public GetValueRequest getReq() { return this.req; } - public chainAddEdges_args setReq(ChainAddEdgesRequest req) { + public getValue_args setReq(GetValueRequest req) { this.req = req; return this; } @@ -406,7 +406,7 @@ public void setFieldValue(int fieldID, Object __value) { if (__value == null) { unsetReq(); } else { - setReq((ChainAddEdgesRequest)__value); + setReq((GetValueRequest)__value); } break; @@ -431,9 +431,9 @@ public boolean equals(Object _that) { return false; if (this == _that) return true; - if (!(_that instanceof chainAddEdges_args)) + if (!(_that instanceof getValue_args)) return false; - chainAddEdges_args that = (chainAddEdges_args)_that; + getValue_args that = (getValue_args)_that; if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; } @@ -445,6 +445,29 @@ public int hashCode() { return Arrays.deepHashCode(new Object[] {req}); } + @Override + public int compareTo(getValue_args other) { + if (other == null) { + // See java.lang.Comparable docs + throw new NullPointerException(); + } + + if (other == this) { + return 0; + } + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + return 0; + } + public void read(TProtocol iprot) throws TException { TField __field; iprot.readStructBegin(metaDataMap); @@ -458,7 +481,7 @@ public void read(TProtocol iprot) throws TException { { case REQ: if (__field.type == TType.STRUCT) { - this.req = new ChainAddEdgesRequest(); + this.req = new GetValueRequest(); this.req.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); @@ -500,7 +523,7 @@ public String toString(int indent, boolean prettyPrint) { String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; String newLine = prettyPrint ? "\n" : ""; String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("chainAddEdges_args"); + StringBuilder sb = new StringBuilder("getValue_args"); sb.append(space); sb.append("("); sb.append(newLine); @@ -527,11 +550,11 @@ public void validate() throws TException { } - public static class chainAddEdges_result implements TBase, java.io.Serializable, Cloneable, Comparable { - private static final TStruct STRUCT_DESC = new TStruct("chainAddEdges_result"); + public static class getValue_result implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("getValue_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - public ExecResponse success; + public GetValueResponse success; public static final int SUCCESS = 0; // isset id assignments @@ -541,19 +564,19 @@ public static class chainAddEdges_result implements TBase, java.io.Serializable, static { Map tmpMetaDataMap = new HashMap(); tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, ExecResponse.class))); + new StructMetaData(TType.STRUCT, GetValueResponse.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } static { - FieldMetaData.addStructMetaDataMap(chainAddEdges_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(getValue_result.class, metaDataMap); } - public chainAddEdges_result() { + public getValue_result() { } - public chainAddEdges_result( - ExecResponse success) { + public getValue_result( + GetValueResponse success) { this(); this.success = success; } @@ -561,21 +584,21 @@ public chainAddEdges_result( /** * Performs a deep copy on other. */ - public chainAddEdges_result(chainAddEdges_result other) { + public getValue_result(getValue_result other) { if (other.isSetSuccess()) { this.success = TBaseHelper.deepCopy(other.success); } } - public chainAddEdges_result deepCopy() { - return new chainAddEdges_result(this); + public getValue_result deepCopy() { + return new getValue_result(this); } - public ExecResponse getSuccess() { + public GetValueResponse getSuccess() { return this.success; } - public chainAddEdges_result setSuccess(ExecResponse success) { + public getValue_result setSuccess(GetValueResponse success) { this.success = success; return this; } @@ -601,7 +624,7 @@ public void setFieldValue(int fieldID, Object __value) { if (__value == null) { unsetSuccess(); } else { - setSuccess((ExecResponse)__value); + setSuccess((GetValueResponse)__value); } break; @@ -626,9 +649,9 @@ public boolean equals(Object _that) { return false; if (this == _that) return true; - if (!(_that instanceof chainAddEdges_result)) + if (!(_that instanceof getValue_result)) return false; - chainAddEdges_result that = (chainAddEdges_result)_that; + getValue_result that = (getValue_result)_that; if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; } @@ -641,7 +664,7 @@ public int hashCode() { } @Override - public int compareTo(chainAddEdges_result other) { + public int compareTo(getValue_result other) { if (other == null) { // See java.lang.Comparable docs throw new NullPointerException(); @@ -676,7 +699,7 @@ public void read(TProtocol iprot) throws TException { { case SUCCESS: if (__field.type == TType.STRUCT) { - this.success = new ExecResponse(); + this.success = new GetValueResponse(); this.success.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); @@ -717,7 +740,7 @@ public String toString(int indent, boolean prettyPrint) { String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; String newLine = prettyPrint ? "\n" : ""; String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("chainAddEdges_result"); + StringBuilder sb = new StringBuilder("getValue_result"); sb.append(space); sb.append("("); sb.append(newLine); @@ -744,11 +767,11 @@ public void validate() throws TException { } - public static class chainUpdateEdge_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("chainUpdateEdge_args"); + public static class forwardTransaction_args implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("forwardTransaction_args"); private static final TField REQ_FIELD_DESC = new TField("req", TType.STRUCT, (short)1); - public ChainUpdateEdgeRequest req; + public InternalTxnRequest req; public static final int REQ = 1; // isset id assignments @@ -758,19 +781,19 @@ public static class chainUpdateEdge_args implements TBase, java.io.Serializable, static { Map tmpMetaDataMap = new HashMap(); tmpMetaDataMap.put(REQ, new FieldMetaData("req", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, ChainUpdateEdgeRequest.class))); + new StructMetaData(TType.STRUCT, InternalTxnRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } static { - FieldMetaData.addStructMetaDataMap(chainUpdateEdge_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(forwardTransaction_args.class, metaDataMap); } - public chainUpdateEdge_args() { + public forwardTransaction_args() { } - public chainUpdateEdge_args( - ChainUpdateEdgeRequest req) { + public forwardTransaction_args( + InternalTxnRequest req) { this(); this.req = req; } @@ -778,21 +801,21 @@ public chainUpdateEdge_args( /** * Performs a deep copy on other. */ - public chainUpdateEdge_args(chainUpdateEdge_args other) { + public forwardTransaction_args(forwardTransaction_args other) { if (other.isSetReq()) { this.req = TBaseHelper.deepCopy(other.req); } } - public chainUpdateEdge_args deepCopy() { - return new chainUpdateEdge_args(this); + public forwardTransaction_args deepCopy() { + return new forwardTransaction_args(this); } - public ChainUpdateEdgeRequest getReq() { + public InternalTxnRequest getReq() { return this.req; } - public chainUpdateEdge_args setReq(ChainUpdateEdgeRequest req) { + public forwardTransaction_args setReq(InternalTxnRequest req) { this.req = req; return this; } @@ -818,7 +841,7 @@ public void setFieldValue(int fieldID, Object __value) { if (__value == null) { unsetReq(); } else { - setReq((ChainUpdateEdgeRequest)__value); + setReq((InternalTxnRequest)__value); } break; @@ -843,9 +866,9 @@ public boolean equals(Object _that) { return false; if (this == _that) return true; - if (!(_that instanceof chainUpdateEdge_args)) + if (!(_that instanceof forwardTransaction_args)) return false; - chainUpdateEdge_args that = (chainUpdateEdge_args)_that; + forwardTransaction_args that = (forwardTransaction_args)_that; if (!TBaseHelper.equalsNobinary(this.isSetReq(), that.isSetReq(), this.req, that.req)) { return false; } @@ -857,6 +880,29 @@ public int hashCode() { return Arrays.deepHashCode(new Object[] {req}); } + @Override + public int compareTo(forwardTransaction_args other) { + if (other == null) { + // See java.lang.Comparable docs + throw new NullPointerException(); + } + + if (other == this) { + return 0; + } + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(req, other.req); + if (lastComparison != 0) { + return lastComparison; + } + return 0; + } + public void read(TProtocol iprot) throws TException { TField __field; iprot.readStructBegin(metaDataMap); @@ -870,7 +916,7 @@ public void read(TProtocol iprot) throws TException { { case REQ: if (__field.type == TType.STRUCT) { - this.req = new ChainUpdateEdgeRequest(); + this.req = new InternalTxnRequest(); this.req.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); @@ -912,7 +958,7 @@ public String toString(int indent, boolean prettyPrint) { String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; String newLine = prettyPrint ? "\n" : ""; String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("chainUpdateEdge_args"); + StringBuilder sb = new StringBuilder("forwardTransaction_args"); sb.append(space); sb.append("("); sb.append(newLine); @@ -939,11 +985,11 @@ public void validate() throws TException { } - public static class chainUpdateEdge_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("chainUpdateEdge_result"); + public static class forwardTransaction_result implements TBase, java.io.Serializable, Cloneable, Comparable { + private static final TStruct STRUCT_DESC = new TStruct("forwardTransaction_result"); private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - public UpdateResponse success; + public ExecResponse success; public static final int SUCCESS = 0; // isset id assignments @@ -953,19 +999,19 @@ public static class chainUpdateEdge_result implements TBase, java.io.Serializabl static { Map tmpMetaDataMap = new HashMap(); tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, UpdateResponse.class))); + new StructMetaData(TType.STRUCT, ExecResponse.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } static { - FieldMetaData.addStructMetaDataMap(chainUpdateEdge_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(forwardTransaction_result.class, metaDataMap); } - public chainUpdateEdge_result() { + public forwardTransaction_result() { } - public chainUpdateEdge_result( - UpdateResponse success) { + public forwardTransaction_result( + ExecResponse success) { this(); this.success = success; } @@ -973,21 +1019,21 @@ public chainUpdateEdge_result( /** * Performs a deep copy on other. */ - public chainUpdateEdge_result(chainUpdateEdge_result other) { + public forwardTransaction_result(forwardTransaction_result other) { if (other.isSetSuccess()) { this.success = TBaseHelper.deepCopy(other.success); } } - public chainUpdateEdge_result deepCopy() { - return new chainUpdateEdge_result(this); + public forwardTransaction_result deepCopy() { + return new forwardTransaction_result(this); } - public UpdateResponse getSuccess() { + public ExecResponse getSuccess() { return this.success; } - public chainUpdateEdge_result setSuccess(UpdateResponse success) { + public forwardTransaction_result setSuccess(ExecResponse success) { this.success = success; return this; } @@ -1013,7 +1059,7 @@ public void setFieldValue(int fieldID, Object __value) { if (__value == null) { unsetSuccess(); } else { - setSuccess((UpdateResponse)__value); + setSuccess((ExecResponse)__value); } break; @@ -1038,9 +1084,9 @@ public boolean equals(Object _that) { return false; if (this == _that) return true; - if (!(_that instanceof chainUpdateEdge_result)) + if (!(_that instanceof forwardTransaction_result)) return false; - chainUpdateEdge_result that = (chainUpdateEdge_result)_that; + forwardTransaction_result that = (forwardTransaction_result)_that; if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; } @@ -1052,6 +1098,29 @@ public int hashCode() { return Arrays.deepHashCode(new Object[] {success}); } + @Override + public int compareTo(forwardTransaction_result other) { + if (other == null) { + // See java.lang.Comparable docs + throw new NullPointerException(); + } + + if (other == this) { + return 0; + } + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + return 0; + } + public void read(TProtocol iprot) throws TException { TField __field; iprot.readStructBegin(metaDataMap); @@ -1065,7 +1134,7 @@ public void read(TProtocol iprot) throws TException { { case SUCCESS: if (__field.type == TType.STRUCT) { - this.success = new UpdateResponse(); + this.success = new ExecResponse(); this.success.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); @@ -1106,7 +1175,7 @@ public String toString(int indent, boolean prettyPrint) { String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : ""; String newLine = prettyPrint ? "\n" : ""; String space = prettyPrint ? " " : ""; - StringBuilder sb = new StringBuilder("chainUpdateEdge_result"); + StringBuilder sb = new StringBuilder("forwardTransaction_result"); sb.append(space); sb.append("("); sb.append(newLine); diff --git a/client/src/main/generated/com/vesoft/nebula/storage/InternalTxnRequest.java b/client/src/main/generated/com/vesoft/nebula/storage/InternalTxnRequest.java index 1fc752175..36b4e5cd5 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/InternalTxnRequest.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/InternalTxnRequest.java @@ -24,28 +24,31 @@ import com.facebook.thrift.protocol.*; @SuppressWarnings({ "unused", "serial" }) -public class InternalTxnRequest implements TBase, java.io.Serializable, Cloneable { +public class InternalTxnRequest implements TBase, java.io.Serializable, Cloneable, Comparable { private static final TStruct STRUCT_DESC = new TStruct("InternalTxnRequest"); private static final TField TXN_ID_FIELD_DESC = new TField("txn_id", TType.I64, (short)1); - private static final TField TERM_OF_PARTS_FIELD_DESC = new TField("term_of_parts", TType.MAP, (short)2); - private static final TField ADD_EDGE_REQ_FIELD_DESC = new TField("add_edge_req", TType.STRUCT, (short)3); - private static final TField UPD_EDGE_REQ_FIELD_DESC = new TField("upd_edge_req", TType.STRUCT, (short)4); - private static final TField EDGE_VER_FIELD_DESC = new TField("edge_ver", TType.MAP, (short)5); + private static final TField SPACE_ID_FIELD_DESC = new TField("space_id", TType.I32, (short)2); + private static final TField PART_ID_FIELD_DESC = new TField("part_id", TType.I32, (short)3); + private static final TField POSITION_FIELD_DESC = new TField("position", TType.I32, (short)4); + private static final TField DATA_FIELD_DESC = new TField("data", TType.LIST, (short)5); public long txn_id; - public Map term_of_parts; - public AddEdgesRequest add_edge_req; - public UpdateEdgeRequest upd_edge_req; - public Map> edge_ver; + public int space_id; + public int part_id; + public int position; + public List> data; public static final int TXN_ID = 1; - public static final int TERM_OF_PARTS = 2; - public static final int ADD_EDGE_REQ = 3; - public static final int UPD_EDGE_REQ = 4; - public static final int EDGE_VER = 5; + public static final int SPACE_ID = 2; + public static final int PART_ID = 3; + public static final int POSITION = 4; + public static final int DATA = 5; // isset id assignments private static final int __TXN_ID_ISSET_ID = 0; - private BitSet __isset_bit_vector = new BitSet(1); + private static final int __SPACE_ID_ISSET_ID = 1; + private static final int __PART_ID_ISSET_ID = 2; + private static final int __POSITION_ISSET_ID = 3; + private BitSet __isset_bit_vector = new BitSet(4); public static final Map metaDataMap; @@ -53,19 +56,16 @@ public class InternalTxnRequest implements TBase, java.io.Serializable, Cloneabl Map tmpMetaDataMap = new HashMap(); tmpMetaDataMap.put(TXN_ID, new FieldMetaData("txn_id", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I64))); - tmpMetaDataMap.put(TERM_OF_PARTS, new FieldMetaData("term_of_parts", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.I32), - new FieldValueMetaData(TType.I64)))); - tmpMetaDataMap.put(ADD_EDGE_REQ, new FieldMetaData("add_edge_req", TFieldRequirementType.OPTIONAL, - new StructMetaData(TType.STRUCT, AddEdgesRequest.class))); - tmpMetaDataMap.put(UPD_EDGE_REQ, new FieldMetaData("upd_edge_req", TFieldRequirementType.OPTIONAL, - new StructMetaData(TType.STRUCT, UpdateEdgeRequest.class))); - tmpMetaDataMap.put(EDGE_VER, new FieldMetaData("edge_ver", TFieldRequirementType.OPTIONAL, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.I32), + tmpMetaDataMap.put(SPACE_ID, new FieldMetaData("space_id", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMetaDataMap.put(PART_ID, new FieldMetaData("part_id", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMetaDataMap.put(POSITION, new FieldMetaData("position", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMetaDataMap.put(DATA, new FieldMetaData("data", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.I64))))); + new FieldValueMetaData(TType.STRING))))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -78,36 +78,30 @@ public InternalTxnRequest() { public InternalTxnRequest( long txn_id, - Map term_of_parts) { + int space_id, + int part_id, + int position, + List> data) { this(); this.txn_id = txn_id; setTxn_idIsSet(true); - this.term_of_parts = term_of_parts; - } - - public InternalTxnRequest( - long txn_id, - Map term_of_parts, - AddEdgesRequest add_edge_req, - UpdateEdgeRequest upd_edge_req, - Map> edge_ver) { - this(); - this.txn_id = txn_id; - setTxn_idIsSet(true); - this.term_of_parts = term_of_parts; - this.add_edge_req = add_edge_req; - this.upd_edge_req = upd_edge_req; - this.edge_ver = edge_ver; + this.space_id = space_id; + setSpace_idIsSet(true); + this.part_id = part_id; + setPart_idIsSet(true); + this.position = position; + setPositionIsSet(true); + this.data = data; } public static class Builder { private long txn_id; - private Map term_of_parts; - private AddEdgesRequest add_edge_req; - private UpdateEdgeRequest upd_edge_req; - private Map> edge_ver; + private int space_id; + private int part_id; + private int position; + private List> data; - BitSet __optional_isset = new BitSet(1); + BitSet __optional_isset = new BitSet(4); public Builder() { } @@ -118,23 +112,26 @@ public Builder setTxn_id(final long txn_id) { return this; } - public Builder setTerm_of_parts(final Map term_of_parts) { - this.term_of_parts = term_of_parts; + public Builder setSpace_id(final int space_id) { + this.space_id = space_id; + __optional_isset.set(__SPACE_ID_ISSET_ID, true); return this; } - public Builder setAdd_edge_req(final AddEdgesRequest add_edge_req) { - this.add_edge_req = add_edge_req; + public Builder setPart_id(final int part_id) { + this.part_id = part_id; + __optional_isset.set(__PART_ID_ISSET_ID, true); return this; } - public Builder setUpd_edge_req(final UpdateEdgeRequest upd_edge_req) { - this.upd_edge_req = upd_edge_req; + public Builder setPosition(final int position) { + this.position = position; + __optional_isset.set(__POSITION_ISSET_ID, true); return this; } - public Builder setEdge_ver(final Map> edge_ver) { - this.edge_ver = edge_ver; + public Builder setData(final List> data) { + this.data = data; return this; } @@ -143,10 +140,16 @@ public InternalTxnRequest build() { if (__optional_isset.get(__TXN_ID_ISSET_ID)) { result.setTxn_id(this.txn_id); } - result.setTerm_of_parts(this.term_of_parts); - result.setAdd_edge_req(this.add_edge_req); - result.setUpd_edge_req(this.upd_edge_req); - result.setEdge_ver(this.edge_ver); + if (__optional_isset.get(__SPACE_ID_ISSET_ID)) { + result.setSpace_id(this.space_id); + } + if (__optional_isset.get(__PART_ID_ISSET_ID)) { + result.setPart_id(this.part_id); + } + if (__optional_isset.get(__POSITION_ISSET_ID)) { + result.setPosition(this.position); + } + result.setData(this.data); return result; } } @@ -162,17 +165,11 @@ public InternalTxnRequest(InternalTxnRequest other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); this.txn_id = TBaseHelper.deepCopy(other.txn_id); - if (other.isSetTerm_of_parts()) { - this.term_of_parts = TBaseHelper.deepCopy(other.term_of_parts); - } - if (other.isSetAdd_edge_req()) { - this.add_edge_req = TBaseHelper.deepCopy(other.add_edge_req); - } - if (other.isSetUpd_edge_req()) { - this.upd_edge_req = TBaseHelper.deepCopy(other.upd_edge_req); - } - if (other.isSetEdge_ver()) { - this.edge_ver = TBaseHelper.deepCopy(other.edge_ver); + this.space_id = TBaseHelper.deepCopy(other.space_id); + this.part_id = TBaseHelper.deepCopy(other.part_id); + this.position = TBaseHelper.deepCopy(other.position); + if (other.isSetData()) { + this.data = TBaseHelper.deepCopy(other.data); } } @@ -203,99 +200,96 @@ public void setTxn_idIsSet(boolean __value) { __isset_bit_vector.set(__TXN_ID_ISSET_ID, __value); } - public Map getTerm_of_parts() { - return this.term_of_parts; + public int getSpace_id() { + return this.space_id; } - public InternalTxnRequest setTerm_of_parts(Map term_of_parts) { - this.term_of_parts = term_of_parts; + public InternalTxnRequest setSpace_id(int space_id) { + this.space_id = space_id; + setSpace_idIsSet(true); return this; } - public void unsetTerm_of_parts() { - this.term_of_parts = null; + public void unsetSpace_id() { + __isset_bit_vector.clear(__SPACE_ID_ISSET_ID); } - // Returns true if field term_of_parts is set (has been assigned a value) and false otherwise - public boolean isSetTerm_of_parts() { - return this.term_of_parts != null; + // Returns true if field space_id is set (has been assigned a value) and false otherwise + public boolean isSetSpace_id() { + return __isset_bit_vector.get(__SPACE_ID_ISSET_ID); } - public void setTerm_of_partsIsSet(boolean __value) { - if (!__value) { - this.term_of_parts = null; - } + public void setSpace_idIsSet(boolean __value) { + __isset_bit_vector.set(__SPACE_ID_ISSET_ID, __value); } - public AddEdgesRequest getAdd_edge_req() { - return this.add_edge_req; + public int getPart_id() { + return this.part_id; } - public InternalTxnRequest setAdd_edge_req(AddEdgesRequest add_edge_req) { - this.add_edge_req = add_edge_req; + public InternalTxnRequest setPart_id(int part_id) { + this.part_id = part_id; + setPart_idIsSet(true); return this; } - public void unsetAdd_edge_req() { - this.add_edge_req = null; + public void unsetPart_id() { + __isset_bit_vector.clear(__PART_ID_ISSET_ID); } - // Returns true if field add_edge_req is set (has been assigned a value) and false otherwise - public boolean isSetAdd_edge_req() { - return this.add_edge_req != null; + // Returns true if field part_id is set (has been assigned a value) and false otherwise + public boolean isSetPart_id() { + return __isset_bit_vector.get(__PART_ID_ISSET_ID); } - public void setAdd_edge_reqIsSet(boolean __value) { - if (!__value) { - this.add_edge_req = null; - } + public void setPart_idIsSet(boolean __value) { + __isset_bit_vector.set(__PART_ID_ISSET_ID, __value); } - public UpdateEdgeRequest getUpd_edge_req() { - return this.upd_edge_req; + public int getPosition() { + return this.position; } - public InternalTxnRequest setUpd_edge_req(UpdateEdgeRequest upd_edge_req) { - this.upd_edge_req = upd_edge_req; + public InternalTxnRequest setPosition(int position) { + this.position = position; + setPositionIsSet(true); return this; } - public void unsetUpd_edge_req() { - this.upd_edge_req = null; + public void unsetPosition() { + __isset_bit_vector.clear(__POSITION_ISSET_ID); } - // Returns true if field upd_edge_req is set (has been assigned a value) and false otherwise - public boolean isSetUpd_edge_req() { - return this.upd_edge_req != null; + // Returns true if field position is set (has been assigned a value) and false otherwise + public boolean isSetPosition() { + return __isset_bit_vector.get(__POSITION_ISSET_ID); } - public void setUpd_edge_reqIsSet(boolean __value) { - if (!__value) { - this.upd_edge_req = null; - } + public void setPositionIsSet(boolean __value) { + __isset_bit_vector.set(__POSITION_ISSET_ID, __value); } - public Map> getEdge_ver() { - return this.edge_ver; + public List> getData() { + return this.data; } - public InternalTxnRequest setEdge_ver(Map> edge_ver) { - this.edge_ver = edge_ver; + public InternalTxnRequest setData(List> data) { + this.data = data; return this; } - public void unsetEdge_ver() { - this.edge_ver = null; + public void unsetData() { + this.data = null; } - // Returns true if field edge_ver is set (has been assigned a value) and false otherwise - public boolean isSetEdge_ver() { - return this.edge_ver != 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 setEdge_verIsSet(boolean __value) { + public void setDataIsSet(boolean __value) { if (!__value) { - this.edge_ver = null; + this.data = null; } } @@ -310,35 +304,35 @@ public void setFieldValue(int fieldID, Object __value) { } break; - case TERM_OF_PARTS: + case SPACE_ID: if (__value == null) { - unsetTerm_of_parts(); + unsetSpace_id(); } else { - setTerm_of_parts((Map)__value); + setSpace_id((Integer)__value); } break; - case ADD_EDGE_REQ: + case PART_ID: if (__value == null) { - unsetAdd_edge_req(); + unsetPart_id(); } else { - setAdd_edge_req((AddEdgesRequest)__value); + setPart_id((Integer)__value); } break; - case UPD_EDGE_REQ: + case POSITION: if (__value == null) { - unsetUpd_edge_req(); + unsetPosition(); } else { - setUpd_edge_req((UpdateEdgeRequest)__value); + setPosition((Integer)__value); } break; - case EDGE_VER: + case DATA: if (__value == null) { - unsetEdge_ver(); + unsetData(); } else { - setEdge_ver((Map>)__value); + setData((List>)__value); } break; @@ -352,17 +346,17 @@ public Object getFieldValue(int fieldID) { case TXN_ID: return new Long(getTxn_id()); - case TERM_OF_PARTS: - return getTerm_of_parts(); + case SPACE_ID: + return new Integer(getSpace_id()); - case ADD_EDGE_REQ: - return getAdd_edge_req(); + case PART_ID: + return new Integer(getPart_id()); - case UPD_EDGE_REQ: - return getUpd_edge_req(); + case POSITION: + return new Integer(getPosition()); - case EDGE_VER: - return getEdge_ver(); + case DATA: + return getData(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -381,20 +375,75 @@ public boolean equals(Object _that) { if (!TBaseHelper.equalsNobinary(this.txn_id, that.txn_id)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetTerm_of_parts(), that.isSetTerm_of_parts(), this.term_of_parts, that.term_of_parts)) { return false; } + if (!TBaseHelper.equalsNobinary(this.space_id, that.space_id)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetAdd_edge_req(), that.isSetAdd_edge_req(), this.add_edge_req, that.add_edge_req)) { return false; } + if (!TBaseHelper.equalsNobinary(this.part_id, that.part_id)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetUpd_edge_req(), that.isSetUpd_edge_req(), this.upd_edge_req, that.upd_edge_req)) { return false; } + if (!TBaseHelper.equalsNobinary(this.position, that.position)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetEdge_ver(), that.isSetEdge_ver(), this.edge_ver, that.edge_ver)) { return false; } + if (!TBaseHelper.equalsSlow(this.isSetData(), that.isSetData(), this.data, that.data)) { return false; } return true; } @Override public int hashCode() { - return Arrays.deepHashCode(new Object[] {txn_id, term_of_parts, add_edge_req, upd_edge_req, edge_ver}); + return Arrays.deepHashCode(new Object[] {txn_id, space_id, part_id, position, data}); + } + + @Override + public int compareTo(InternalTxnRequest other) { + if (other == null) { + // See java.lang.Comparable docs + throw new NullPointerException(); + } + + if (other == this) { + return 0; + } + int lastComparison = 0; + + lastComparison = Boolean.valueOf(isSetTxn_id()).compareTo(other.isSetTxn_id()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(txn_id, other.txn_id); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = Boolean.valueOf(isSetSpace_id()).compareTo(other.isSetSpace_id()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(space_id, other.space_id); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = Boolean.valueOf(isSetPart_id()).compareTo(other.isSetPart_id()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(part_id, other.part_id); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = Boolean.valueOf(isSetPosition()).compareTo(other.isSetPosition()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(position, other.position); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = Boolean.valueOf(isSetData()).compareTo(other.isSetData()); + if (lastComparison != 0) { + return lastComparison; + } + lastComparison = TBaseHelper.compareTo(data, other.data); + if (lastComparison != 0) { + return lastComparison; + } + return 0; } public void read(TProtocol iprot) throws TException { @@ -416,71 +465,56 @@ public void read(TProtocol iprot) throws TException { TProtocolUtil.skip(iprot, __field.type); } break; - case TERM_OF_PARTS: - if (__field.type == TType.MAP) { - { - TMap _map254 = iprot.readMapBegin(); - this.term_of_parts = new HashMap(Math.max(0, 2*_map254.size)); - for (int _i255 = 0; - (_map254.size < 0) ? iprot.peekMap() : (_i255 < _map254.size); - ++_i255) - { - int _key256; - long _val257; - _key256 = iprot.readI32(); - _val257 = iprot.readI64(); - this.term_of_parts.put(_key256, _val257); - } - iprot.readMapEnd(); - } + case SPACE_ID: + if (__field.type == TType.I32) { + this.space_id = iprot.readI32(); + setSpace_idIsSet(true); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case ADD_EDGE_REQ: - if (__field.type == TType.STRUCT) { - this.add_edge_req = new AddEdgesRequest(); - this.add_edge_req.read(iprot); + case PART_ID: + if (__field.type == TType.I32) { + this.part_id = iprot.readI32(); + setPart_idIsSet(true); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case UPD_EDGE_REQ: - if (__field.type == TType.STRUCT) { - this.upd_edge_req = new UpdateEdgeRequest(); - this.upd_edge_req.read(iprot); + case POSITION: + if (__field.type == TType.I32) { + this.position = iprot.readI32(); + setPositionIsSet(true); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case EDGE_VER: - if (__field.type == TType.MAP) { + case DATA: + if (__field.type == TType.LIST) { { - TMap _map258 = iprot.readMapBegin(); - this.edge_ver = new HashMap>(Math.max(0, 2*_map258.size)); - for (int _i259 = 0; - (_map258.size < 0) ? iprot.peekMap() : (_i259 < _map258.size); - ++_i259) + TList _list254 = iprot.readListBegin(); + this.data = new ArrayList>(Math.max(0, _list254.size)); + for (int _i255 = 0; + (_list254.size < 0) ? iprot.peekList() : (_i255 < _list254.size); + ++_i255) { - int _key260; - List _val261; - _key260 = iprot.readI32(); + List _elem256; { - TList _list262 = iprot.readListBegin(); - _val261 = new ArrayList(Math.max(0, _list262.size)); - for (int _i263 = 0; - (_list262.size < 0) ? iprot.peekList() : (_i263 < _list262.size); - ++_i263) + TList _list257 = iprot.readListBegin(); + _elem256 = new ArrayList(Math.max(0, _list257.size)); + for (int _i258 = 0; + (_list257.size < 0) ? iprot.peekList() : (_i258 < _list257.size); + ++_i258) { - long _elem264; - _elem264 = iprot.readI64(); - _val261.add(_elem264); + byte[] _elem259; + _elem259 = iprot.readBinary(); + _elem256.add(_elem259); } iprot.readListEnd(); } - this.edge_ver.put(_key260, _val261); + this.data.add(_elem256); } - iprot.readMapEnd(); + iprot.readListEnd(); } } else { TProtocolUtil.skip(iprot, __field.type); @@ -506,51 +540,31 @@ public void write(TProtocol oprot) throws TException { oprot.writeFieldBegin(TXN_ID_FIELD_DESC); oprot.writeI64(this.txn_id); oprot.writeFieldEnd(); - if (this.term_of_parts != null) { - oprot.writeFieldBegin(TERM_OF_PARTS_FIELD_DESC); + oprot.writeFieldBegin(SPACE_ID_FIELD_DESC); + oprot.writeI32(this.space_id); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(PART_ID_FIELD_DESC); + oprot.writeI32(this.part_id); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(POSITION_FIELD_DESC); + oprot.writeI32(this.position); + oprot.writeFieldEnd(); + if (this.data != null) { + oprot.writeFieldBegin(DATA_FIELD_DESC); { - oprot.writeMapBegin(new TMap(TType.I32, TType.I64, this.term_of_parts.size())); - for (Map.Entry _iter265 : this.term_of_parts.entrySet()) { - oprot.writeI32(_iter265.getKey()); - oprot.writeI64(_iter265.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - if (this.add_edge_req != null) { - if (isSetAdd_edge_req()) { - oprot.writeFieldBegin(ADD_EDGE_REQ_FIELD_DESC); - this.add_edge_req.write(oprot); - oprot.writeFieldEnd(); - } - } - if (this.upd_edge_req != null) { - if (isSetUpd_edge_req()) { - oprot.writeFieldBegin(UPD_EDGE_REQ_FIELD_DESC); - this.upd_edge_req.write(oprot); - oprot.writeFieldEnd(); - } - } - if (this.edge_ver != null) { - if (isSetEdge_ver()) { - oprot.writeFieldBegin(EDGE_VER_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.I32, TType.LIST, this.edge_ver.size())); - for (Map.Entry> _iter266 : this.edge_ver.entrySet()) { - oprot.writeI32(_iter266.getKey()); - { - oprot.writeListBegin(new TList(TType.I64, _iter266.getValue().size())); - for (long _iter267 : _iter266.getValue()) { - oprot.writeI64(_iter267); - } - oprot.writeListEnd(); + oprot.writeListBegin(new TList(TType.LIST, this.data.size())); + for (List _iter260 : this.data) { + { + oprot.writeListBegin(new TList(TType.STRING, _iter260.size())); + for (byte[] _iter261 : _iter260) { + oprot.writeBinary(_iter261); } + oprot.writeListEnd(); } - oprot.writeMapEnd(); } - oprot.writeFieldEnd(); + oprot.writeListEnd(); } + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -580,57 +594,36 @@ public String toString(int indent, boolean prettyPrint) { first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("term_of_parts"); + sb.append("space_id"); + sb.append(space); + sb.append(":").append(space); + sb.append(TBaseHelper.toString(this.getSpace_id(), indent + 1, prettyPrint)); + first = false; + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("part_id"); + sb.append(space); + sb.append(":").append(space); + sb.append(TBaseHelper.toString(this.getPart_id(), indent + 1, prettyPrint)); + first = false; + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("position"); sb.append(space); sb.append(":").append(space); - if (this.getTerm_of_parts() == null) { + sb.append(TBaseHelper.toString(this.getPosition(), indent + 1, prettyPrint)); + first = false; + if (!first) sb.append("," + newLine); + sb.append(indentStr); + sb.append("data"); + sb.append(space); + sb.append(":").append(space); + if (this.getData() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getTerm_of_parts(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getData(), indent + 1, prettyPrint)); } first = false; - if (isSetAdd_edge_req()) - { - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("add_edge_req"); - sb.append(space); - sb.append(":").append(space); - if (this.getAdd_edge_req() == null) { - sb.append("null"); - } else { - sb.append(TBaseHelper.toString(this.getAdd_edge_req(), indent + 1, prettyPrint)); - } - first = false; - } - if (isSetUpd_edge_req()) - { - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("upd_edge_req"); - sb.append(space); - sb.append(":").append(space); - if (this.getUpd_edge_req() == null) { - sb.append("null"); - } else { - sb.append(TBaseHelper.toString(this.getUpd_edge_req(), indent + 1, prettyPrint)); - } - first = false; - } - if (isSetEdge_ver()) - { - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("edge_ver"); - sb.append(space); - sb.append(":").append(space); - if (this.getEdge_ver() == null) { - sb.append("null"); - } else { - sb.append(TBaseHelper.toString(this.getEdge_ver(), indent + 1, prettyPrint)); - } - first = false; - } sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); sb.append(")"); return sb.toString(); diff --git a/client/src/main/generated/com/vesoft/nebula/storage/RequestCommon.java b/client/src/main/generated/com/vesoft/nebula/storage/RequestCommon.java index 94c7bcb37..96a5a568e 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/RequestCommon.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/RequestCommon.java @@ -28,20 +28,16 @@ public class RequestCommon implements TBase, java.io.Serializable, Cloneable, Co private static final TStruct STRUCT_DESC = new TStruct("RequestCommon"); private static final TField SESSION_ID_FIELD_DESC = new TField("session_id", TType.I64, (short)1); private static final TField PLAN_ID_FIELD_DESC = new TField("plan_id", TType.I64, (short)2); - private static final TField PROFILE_DETAIL_FIELD_DESC = new TField("profile_detail", TType.BOOL, (short)3); public long session_id; public long plan_id; - public boolean profile_detail; public static final int SESSION_ID = 1; public static final int PLAN_ID = 2; - public static final int PROFILE_DETAIL = 3; // isset id assignments private static final int __SESSION_ID_ISSET_ID = 0; private static final int __PLAN_ID_ISSET_ID = 1; - private static final int __PROFILE_DETAIL_ISSET_ID = 2; - private BitSet __isset_bit_vector = new BitSet(3); + private BitSet __isset_bit_vector = new BitSet(2); public static final Map metaDataMap; @@ -51,8 +47,6 @@ public class RequestCommon implements TBase, java.io.Serializable, Cloneable, Co new FieldValueMetaData(TType.I64))); tmpMetaDataMap.put(PLAN_ID, new FieldMetaData("plan_id", TFieldRequirementType.OPTIONAL, new FieldValueMetaData(TType.I64))); - tmpMetaDataMap.put(PROFILE_DETAIL, new FieldMetaData("profile_detail", TFieldRequirementType.OPTIONAL, - new FieldValueMetaData(TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -65,23 +59,19 @@ public RequestCommon() { public RequestCommon( long session_id, - long plan_id, - boolean profile_detail) { + long plan_id) { this(); this.session_id = session_id; setSession_idIsSet(true); this.plan_id = plan_id; setPlan_idIsSet(true); - this.profile_detail = profile_detail; - setProfile_detailIsSet(true); } public static class Builder { private long session_id; private long plan_id; - private boolean profile_detail; - BitSet __optional_isset = new BitSet(3); + BitSet __optional_isset = new BitSet(2); public Builder() { } @@ -98,12 +88,6 @@ public Builder setPlan_id(final long plan_id) { return this; } - public Builder setProfile_detail(final boolean profile_detail) { - this.profile_detail = profile_detail; - __optional_isset.set(__PROFILE_DETAIL_ISSET_ID, true); - return this; - } - public RequestCommon build() { RequestCommon result = new RequestCommon(); if (__optional_isset.get(__SESSION_ID_ISSET_ID)) { @@ -112,9 +96,6 @@ public RequestCommon build() { if (__optional_isset.get(__PLAN_ID_ISSET_ID)) { result.setPlan_id(this.plan_id); } - if (__optional_isset.get(__PROFILE_DETAIL_ISSET_ID)) { - result.setProfile_detail(this.profile_detail); - } return result; } } @@ -131,7 +112,6 @@ public RequestCommon(RequestCommon other) { __isset_bit_vector.or(other.__isset_bit_vector); this.session_id = TBaseHelper.deepCopy(other.session_id); this.plan_id = TBaseHelper.deepCopy(other.plan_id); - this.profile_detail = TBaseHelper.deepCopy(other.profile_detail); } public RequestCommon deepCopy() { @@ -184,29 +164,6 @@ public void setPlan_idIsSet(boolean __value) { __isset_bit_vector.set(__PLAN_ID_ISSET_ID, __value); } - public boolean isProfile_detail() { - return this.profile_detail; - } - - public RequestCommon setProfile_detail(boolean profile_detail) { - this.profile_detail = profile_detail; - setProfile_detailIsSet(true); - return this; - } - - public void unsetProfile_detail() { - __isset_bit_vector.clear(__PROFILE_DETAIL_ISSET_ID); - } - - // Returns true if field profile_detail is set (has been assigned a value) and false otherwise - public boolean isSetProfile_detail() { - return __isset_bit_vector.get(__PROFILE_DETAIL_ISSET_ID); - } - - public void setProfile_detailIsSet(boolean __value) { - __isset_bit_vector.set(__PROFILE_DETAIL_ISSET_ID, __value); - } - public void setFieldValue(int fieldID, Object __value) { switch (fieldID) { case SESSION_ID: @@ -225,14 +182,6 @@ public void setFieldValue(int fieldID, Object __value) { } break; - case PROFILE_DETAIL: - if (__value == null) { - unsetProfile_detail(); - } else { - setProfile_detail((Boolean)__value); - } - break; - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -246,9 +195,6 @@ public Object getFieldValue(int fieldID) { case PLAN_ID: return new Long(getPlan_id()); - case PROFILE_DETAIL: - return new Boolean(isProfile_detail()); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -268,14 +214,12 @@ public boolean equals(Object _that) { if (!TBaseHelper.equalsNobinary(this.isSetPlan_id(), that.isSetPlan_id(), this.plan_id, that.plan_id)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetProfile_detail(), that.isSetProfile_detail(), this.profile_detail, that.profile_detail)) { return false; } - return true; } @Override public int hashCode() { - return Arrays.deepHashCode(new Object[] {session_id, plan_id, profile_detail}); + return Arrays.deepHashCode(new Object[] {session_id, plan_id}); } @Override @@ -306,14 +250,6 @@ public int compareTo(RequestCommon other) { if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetProfile_detail()).compareTo(other.isSetProfile_detail()); - if (lastComparison != 0) { - return lastComparison; - } - lastComparison = TBaseHelper.compareTo(profile_detail, other.profile_detail); - if (lastComparison != 0) { - return lastComparison; - } return 0; } @@ -344,14 +280,6 @@ public void read(TProtocol iprot) throws TException { TProtocolUtil.skip(iprot, __field.type); } break; - case PROFILE_DETAIL: - if (__field.type == TType.BOOL) { - this.profile_detail = iprot.readBool(); - setProfile_detailIsSet(true); - } else { - TProtocolUtil.skip(iprot, __field.type); - } - break; default: TProtocolUtil.skip(iprot, __field.type); break; @@ -379,11 +307,6 @@ public void write(TProtocol oprot) throws TException { oprot.writeI64(this.plan_id); oprot.writeFieldEnd(); } - if (isSetProfile_detail()) { - oprot.writeFieldBegin(PROFILE_DETAIL_FIELD_DESC); - oprot.writeBool(this.profile_detail); - oprot.writeFieldEnd(); - } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -423,16 +346,6 @@ public String toString(int indent, boolean prettyPrint) { sb.append(TBaseHelper.toString(this.getPlan_id(), indent + 1, prettyPrint)); first = false; } - if (isSetProfile_detail()) - { - if (!first) sb.append("," + newLine); - sb.append(indentStr); - sb.append("profile_detail"); - sb.append(space); - sb.append(":").append(space); - sb.append(TBaseHelper.toString(this.isProfile_detail(), indent + 1, prettyPrint)); - first = false; - } sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); sb.append(")"); return sb.toString(); diff --git a/client/src/main/generated/com/vesoft/nebula/storage/StorageAdminService.java b/client/src/main/generated/com/vesoft/nebula/storage/StorageAdminService.java index 04627c6a4..8b6e3019c 100644 --- a/client/src/main/generated/com/vesoft/nebula/storage/StorageAdminService.java +++ b/client/src/main/generated/com/vesoft/nebula/storage/StorageAdminService.java @@ -868,17 +868,17 @@ public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientM super(protocolFactory, clientManager, transport); } - public void transLeader(TransLeaderReq req, AsyncMethodCallback resultHandler400) throws TException { + public void transLeader(TransLeaderReq req, AsyncMethodCallback resultHandler371) throws TException { checkReady(); - transLeader_call method_call = new transLeader_call(req, resultHandler400, this, ___protocolFactory, ___transport); + transLeader_call method_call = new transLeader_call(req, resultHandler371, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class transLeader_call extends TAsyncMethodCall { private TransLeaderReq req; - public transLeader_call(TransLeaderReq req, AsyncMethodCallback resultHandler401, TAsyncClient client397, TProtocolFactory protocolFactory398, TNonblockingTransport transport399) throws TException { - super(client397, protocolFactory398, transport399, resultHandler401, false); + public transLeader_call(TransLeaderReq req, AsyncMethodCallback resultHandler372, TAsyncClient client368, TProtocolFactory protocolFactory369, TNonblockingTransport transport370) throws TException { + super(client368, protocolFactory369, transport370, resultHandler372, false); this.req = req; } @@ -900,17 +900,17 @@ public AdminExecResp getResult() throws TException { } } - public void addPart(AddPartReq req, AsyncMethodCallback resultHandler405) throws TException { + public void addPart(AddPartReq req, AsyncMethodCallback resultHandler376) throws TException { checkReady(); - addPart_call method_call = new addPart_call(req, resultHandler405, this, ___protocolFactory, ___transport); + addPart_call method_call = new addPart_call(req, resultHandler376, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addPart_call extends TAsyncMethodCall { private AddPartReq req; - public addPart_call(AddPartReq req, AsyncMethodCallback resultHandler406, TAsyncClient client402, TProtocolFactory protocolFactory403, TNonblockingTransport transport404) throws TException { - super(client402, protocolFactory403, transport404, resultHandler406, false); + public addPart_call(AddPartReq req, AsyncMethodCallback resultHandler377, TAsyncClient client373, TProtocolFactory protocolFactory374, TNonblockingTransport transport375) throws TException { + super(client373, protocolFactory374, transport375, resultHandler377, false); this.req = req; } @@ -932,17 +932,17 @@ public AdminExecResp getResult() throws TException { } } - public void addLearner(AddLearnerReq req, AsyncMethodCallback resultHandler410) throws TException { + public void addLearner(AddLearnerReq req, AsyncMethodCallback resultHandler381) throws TException { checkReady(); - addLearner_call method_call = new addLearner_call(req, resultHandler410, this, ___protocolFactory, ___transport); + addLearner_call method_call = new addLearner_call(req, resultHandler381, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addLearner_call extends TAsyncMethodCall { private AddLearnerReq req; - public addLearner_call(AddLearnerReq req, AsyncMethodCallback resultHandler411, TAsyncClient client407, TProtocolFactory protocolFactory408, TNonblockingTransport transport409) throws TException { - super(client407, protocolFactory408, transport409, resultHandler411, false); + public addLearner_call(AddLearnerReq req, AsyncMethodCallback resultHandler382, TAsyncClient client378, TProtocolFactory protocolFactory379, TNonblockingTransport transport380) throws TException { + super(client378, protocolFactory379, transport380, resultHandler382, false); this.req = req; } @@ -964,17 +964,17 @@ public AdminExecResp getResult() throws TException { } } - public void removePart(RemovePartReq req, AsyncMethodCallback resultHandler415) throws TException { + public void removePart(RemovePartReq req, AsyncMethodCallback resultHandler386) throws TException { checkReady(); - removePart_call method_call = new removePart_call(req, resultHandler415, this, ___protocolFactory, ___transport); + removePart_call method_call = new removePart_call(req, resultHandler386, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class removePart_call extends TAsyncMethodCall { private RemovePartReq req; - public removePart_call(RemovePartReq req, AsyncMethodCallback resultHandler416, TAsyncClient client412, TProtocolFactory protocolFactory413, TNonblockingTransport transport414) throws TException { - super(client412, protocolFactory413, transport414, resultHandler416, false); + public removePart_call(RemovePartReq req, AsyncMethodCallback resultHandler387, TAsyncClient client383, TProtocolFactory protocolFactory384, TNonblockingTransport transport385) throws TException { + super(client383, protocolFactory384, transport385, resultHandler387, false); this.req = req; } @@ -996,17 +996,17 @@ public AdminExecResp getResult() throws TException { } } - public void memberChange(MemberChangeReq req, AsyncMethodCallback resultHandler420) throws TException { + public void memberChange(MemberChangeReq req, AsyncMethodCallback resultHandler391) throws TException { checkReady(); - memberChange_call method_call = new memberChange_call(req, resultHandler420, this, ___protocolFactory, ___transport); + memberChange_call method_call = new memberChange_call(req, resultHandler391, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class memberChange_call extends TAsyncMethodCall { private MemberChangeReq req; - public memberChange_call(MemberChangeReq req, AsyncMethodCallback resultHandler421, TAsyncClient client417, TProtocolFactory protocolFactory418, TNonblockingTransport transport419) throws TException { - super(client417, protocolFactory418, transport419, resultHandler421, false); + public memberChange_call(MemberChangeReq req, AsyncMethodCallback resultHandler392, TAsyncClient client388, TProtocolFactory protocolFactory389, TNonblockingTransport transport390) throws TException { + super(client388, protocolFactory389, transport390, resultHandler392, false); this.req = req; } @@ -1028,17 +1028,17 @@ public AdminExecResp getResult() throws TException { } } - public void waitingForCatchUpData(CatchUpDataReq req, AsyncMethodCallback resultHandler425) throws TException { + public void waitingForCatchUpData(CatchUpDataReq req, AsyncMethodCallback resultHandler396) throws TException { checkReady(); - waitingForCatchUpData_call method_call = new waitingForCatchUpData_call(req, resultHandler425, this, ___protocolFactory, ___transport); + waitingForCatchUpData_call method_call = new waitingForCatchUpData_call(req, resultHandler396, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class waitingForCatchUpData_call extends TAsyncMethodCall { private CatchUpDataReq req; - public waitingForCatchUpData_call(CatchUpDataReq req, AsyncMethodCallback resultHandler426, TAsyncClient client422, TProtocolFactory protocolFactory423, TNonblockingTransport transport424) throws TException { - super(client422, protocolFactory423, transport424, resultHandler426, false); + public waitingForCatchUpData_call(CatchUpDataReq req, AsyncMethodCallback resultHandler397, TAsyncClient client393, TProtocolFactory protocolFactory394, TNonblockingTransport transport395) throws TException { + super(client393, protocolFactory394, transport395, resultHandler397, false); this.req = req; } @@ -1060,17 +1060,17 @@ public AdminExecResp getResult() throws TException { } } - public void createCheckpoint(CreateCPRequest req, AsyncMethodCallback resultHandler430) throws TException { + public void createCheckpoint(CreateCPRequest req, AsyncMethodCallback resultHandler401) throws TException { checkReady(); - createCheckpoint_call method_call = new createCheckpoint_call(req, resultHandler430, this, ___protocolFactory, ___transport); + createCheckpoint_call method_call = new createCheckpoint_call(req, resultHandler401, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class createCheckpoint_call extends TAsyncMethodCall { private CreateCPRequest req; - public createCheckpoint_call(CreateCPRequest req, AsyncMethodCallback resultHandler431, TAsyncClient client427, TProtocolFactory protocolFactory428, TNonblockingTransport transport429) throws TException { - super(client427, protocolFactory428, transport429, resultHandler431, false); + public createCheckpoint_call(CreateCPRequest req, AsyncMethodCallback resultHandler402, TAsyncClient client398, TProtocolFactory protocolFactory399, TNonblockingTransport transport400) throws TException { + super(client398, protocolFactory399, transport400, resultHandler402, false); this.req = req; } @@ -1092,17 +1092,17 @@ public CreateCPResp getResult() throws TException { } } - public void dropCheckpoint(DropCPRequest req, AsyncMethodCallback resultHandler435) throws TException { + public void dropCheckpoint(DropCPRequest req, AsyncMethodCallback resultHandler406) throws TException { checkReady(); - dropCheckpoint_call method_call = new dropCheckpoint_call(req, resultHandler435, this, ___protocolFactory, ___transport); + dropCheckpoint_call method_call = new dropCheckpoint_call(req, resultHandler406, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class dropCheckpoint_call extends TAsyncMethodCall { private DropCPRequest req; - public dropCheckpoint_call(DropCPRequest req, AsyncMethodCallback resultHandler436, TAsyncClient client432, TProtocolFactory protocolFactory433, TNonblockingTransport transport434) throws TException { - super(client432, protocolFactory433, transport434, resultHandler436, false); + public dropCheckpoint_call(DropCPRequest req, AsyncMethodCallback resultHandler407, TAsyncClient client403, TProtocolFactory protocolFactory404, TNonblockingTransport transport405) throws TException { + super(client403, protocolFactory404, transport405, resultHandler407, false); this.req = req; } @@ -1124,17 +1124,17 @@ public AdminExecResp getResult() throws TException { } } - public void blockingWrites(BlockingSignRequest req, AsyncMethodCallback resultHandler440) throws TException { + public void blockingWrites(BlockingSignRequest req, AsyncMethodCallback resultHandler411) throws TException { checkReady(); - blockingWrites_call method_call = new blockingWrites_call(req, resultHandler440, this, ___protocolFactory, ___transport); + blockingWrites_call method_call = new blockingWrites_call(req, resultHandler411, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class blockingWrites_call extends TAsyncMethodCall { private BlockingSignRequest req; - public blockingWrites_call(BlockingSignRequest req, AsyncMethodCallback resultHandler441, TAsyncClient client437, TProtocolFactory protocolFactory438, TNonblockingTransport transport439) throws TException { - super(client437, protocolFactory438, transport439, resultHandler441, false); + public blockingWrites_call(BlockingSignRequest req, AsyncMethodCallback resultHandler412, TAsyncClient client408, TProtocolFactory protocolFactory409, TNonblockingTransport transport410) throws TException { + super(client408, protocolFactory409, transport410, resultHandler412, false); this.req = req; } @@ -1156,17 +1156,17 @@ public AdminExecResp getResult() throws TException { } } - public void rebuildTagIndex(RebuildIndexRequest req, AsyncMethodCallback resultHandler445) throws TException { + public void rebuildTagIndex(RebuildIndexRequest req, AsyncMethodCallback resultHandler416) throws TException { checkReady(); - rebuildTagIndex_call method_call = new rebuildTagIndex_call(req, resultHandler445, this, ___protocolFactory, ___transport); + rebuildTagIndex_call method_call = new rebuildTagIndex_call(req, resultHandler416, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class rebuildTagIndex_call extends TAsyncMethodCall { private RebuildIndexRequest req; - public rebuildTagIndex_call(RebuildIndexRequest req, AsyncMethodCallback resultHandler446, TAsyncClient client442, TProtocolFactory protocolFactory443, TNonblockingTransport transport444) throws TException { - super(client442, protocolFactory443, transport444, resultHandler446, false); + public rebuildTagIndex_call(RebuildIndexRequest req, AsyncMethodCallback resultHandler417, TAsyncClient client413, TProtocolFactory protocolFactory414, TNonblockingTransport transport415) throws TException { + super(client413, protocolFactory414, transport415, resultHandler417, false); this.req = req; } @@ -1188,17 +1188,17 @@ public AdminExecResp getResult() throws TException { } } - public void rebuildEdgeIndex(RebuildIndexRequest req, AsyncMethodCallback resultHandler450) throws TException { + public void rebuildEdgeIndex(RebuildIndexRequest req, AsyncMethodCallback resultHandler421) throws TException { checkReady(); - rebuildEdgeIndex_call method_call = new rebuildEdgeIndex_call(req, resultHandler450, this, ___protocolFactory, ___transport); + rebuildEdgeIndex_call method_call = new rebuildEdgeIndex_call(req, resultHandler421, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class rebuildEdgeIndex_call extends TAsyncMethodCall { private RebuildIndexRequest req; - public rebuildEdgeIndex_call(RebuildIndexRequest req, AsyncMethodCallback resultHandler451, TAsyncClient client447, TProtocolFactory protocolFactory448, TNonblockingTransport transport449) throws TException { - super(client447, protocolFactory448, transport449, resultHandler451, false); + public rebuildEdgeIndex_call(RebuildIndexRequest req, AsyncMethodCallback resultHandler422, TAsyncClient client418, TProtocolFactory protocolFactory419, TNonblockingTransport transport420) throws TException { + super(client418, protocolFactory419, transport420, resultHandler422, false); this.req = req; } @@ -1220,17 +1220,17 @@ public AdminExecResp getResult() throws TException { } } - public void getLeaderParts(GetLeaderReq req, AsyncMethodCallback resultHandler455) throws TException { + public void getLeaderParts(GetLeaderReq req, AsyncMethodCallback resultHandler426) throws TException { checkReady(); - getLeaderParts_call method_call = new getLeaderParts_call(req, resultHandler455, this, ___protocolFactory, ___transport); + getLeaderParts_call method_call = new getLeaderParts_call(req, resultHandler426, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class getLeaderParts_call extends TAsyncMethodCall { private GetLeaderReq req; - public getLeaderParts_call(GetLeaderReq req, AsyncMethodCallback resultHandler456, TAsyncClient client452, TProtocolFactory protocolFactory453, TNonblockingTransport transport454) throws TException { - super(client452, protocolFactory453, transport454, resultHandler456, false); + public getLeaderParts_call(GetLeaderReq req, AsyncMethodCallback resultHandler427, TAsyncClient client423, TProtocolFactory protocolFactory424, TNonblockingTransport transport425) throws TException { + super(client423, protocolFactory424, transport425, resultHandler427, false); this.req = req; } @@ -1252,17 +1252,17 @@ public GetLeaderPartsResp getResult() throws TException { } } - public void checkPeers(CheckPeersReq req, AsyncMethodCallback resultHandler460) throws TException { + public void checkPeers(CheckPeersReq req, AsyncMethodCallback resultHandler431) throws TException { checkReady(); - checkPeers_call method_call = new checkPeers_call(req, resultHandler460, this, ___protocolFactory, ___transport); + checkPeers_call method_call = new checkPeers_call(req, resultHandler431, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class checkPeers_call extends TAsyncMethodCall { private CheckPeersReq req; - public checkPeers_call(CheckPeersReq req, AsyncMethodCallback resultHandler461, TAsyncClient client457, TProtocolFactory protocolFactory458, TNonblockingTransport transport459) throws TException { - super(client457, protocolFactory458, transport459, resultHandler461, false); + public checkPeers_call(CheckPeersReq req, AsyncMethodCallback resultHandler432, TAsyncClient client428, TProtocolFactory protocolFactory429, TNonblockingTransport transport430) throws TException { + super(client428, protocolFactory429, transport430, resultHandler432, false); this.req = req; } @@ -1284,17 +1284,17 @@ public AdminExecResp getResult() throws TException { } } - public void addAdminTask(AddAdminTaskRequest req, AsyncMethodCallback resultHandler465) throws TException { + public void addAdminTask(AddAdminTaskRequest req, AsyncMethodCallback resultHandler436) throws TException { checkReady(); - addAdminTask_call method_call = new addAdminTask_call(req, resultHandler465, this, ___protocolFactory, ___transport); + addAdminTask_call method_call = new addAdminTask_call(req, resultHandler436, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class addAdminTask_call extends TAsyncMethodCall { private AddAdminTaskRequest req; - public addAdminTask_call(AddAdminTaskRequest req, AsyncMethodCallback resultHandler466, TAsyncClient client462, TProtocolFactory protocolFactory463, TNonblockingTransport transport464) throws TException { - super(client462, protocolFactory463, transport464, resultHandler466, false); + public addAdminTask_call(AddAdminTaskRequest req, AsyncMethodCallback resultHandler437, TAsyncClient client433, TProtocolFactory protocolFactory434, TNonblockingTransport transport435) throws TException { + super(client433, protocolFactory434, transport435, resultHandler437, false); this.req = req; } @@ -1316,17 +1316,17 @@ public AdminExecResp getResult() throws TException { } } - public void stopAdminTask(StopAdminTaskRequest req, AsyncMethodCallback resultHandler470) throws TException { + public void stopAdminTask(StopAdminTaskRequest req, AsyncMethodCallback resultHandler441) throws TException { checkReady(); - stopAdminTask_call method_call = new stopAdminTask_call(req, resultHandler470, this, ___protocolFactory, ___transport); + stopAdminTask_call method_call = new stopAdminTask_call(req, resultHandler441, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class stopAdminTask_call extends TAsyncMethodCall { private StopAdminTaskRequest req; - public stopAdminTask_call(StopAdminTaskRequest req, AsyncMethodCallback resultHandler471, TAsyncClient client467, TProtocolFactory protocolFactory468, TNonblockingTransport transport469) throws TException { - super(client467, protocolFactory468, transport469, resultHandler471, false); + public stopAdminTask_call(StopAdminTaskRequest req, AsyncMethodCallback resultHandler442, TAsyncClient client438, TProtocolFactory protocolFactory439, TNonblockingTransport transport440) throws TException { + super(client438, protocolFactory439, transport440, resultHandler442, false); this.req = req; } @@ -1348,17 +1348,17 @@ public AdminExecResp getResult() throws TException { } } - public void listClusterInfo(ListClusterInfoReq req, AsyncMethodCallback resultHandler475) throws TException { + public void listClusterInfo(ListClusterInfoReq req, AsyncMethodCallback resultHandler446) throws TException { checkReady(); - listClusterInfo_call method_call = new listClusterInfo_call(req, resultHandler475, this, ___protocolFactory, ___transport); + listClusterInfo_call method_call = new listClusterInfo_call(req, resultHandler446, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; ___manager.call(method_call); } public static class listClusterInfo_call extends TAsyncMethodCall { private ListClusterInfoReq req; - public listClusterInfo_call(ListClusterInfoReq req, AsyncMethodCallback resultHandler476, TAsyncClient client472, TProtocolFactory protocolFactory473, TNonblockingTransport transport474) throws TException { - super(client472, protocolFactory473, transport474, resultHandler476, false); + public listClusterInfo_call(ListClusterInfoReq req, AsyncMethodCallback resultHandler447, TAsyncClient client443, TProtocolFactory protocolFactory444, TNonblockingTransport transport445) throws TException { + super(client443, protocolFactory444, transport445, resultHandler447, false); this.req = req; } diff --git a/client/src/test/java/com/vesoft/nebula/encoder/MetaCacheImplTest.java b/client/src/test/java/com/vesoft/nebula/encoder/MetaCacheImplTest.java index 09bda6469..ccfdff3f0 100644 --- a/client/src/test/java/com/vesoft/nebula/encoder/MetaCacheImplTest.java +++ b/client/src/test/java/com/vesoft/nebula/encoder/MetaCacheImplTest.java @@ -61,7 +61,7 @@ private Schema genNoDefaultVal() { new ColumnTypeDef(PropertyType.STRING)); columns.add(columnDef); columnDef = new ColumnDef(("Col09").getBytes(), - new ColumnTypeDef(PropertyType.FIXED_STRING, (short)12, null)); + new ColumnTypeDef(PropertyType.FIXED_STRING, (short)12)); columns.add(columnDef); columnDef = new ColumnDef(("Col10").getBytes(), new ColumnTypeDef(PropertyType.TIMESTAMP)); @@ -178,7 +178,7 @@ public MetaCacheImplTest() { "utf-8".getBytes(), "utf-8".getBytes(), new ColumnTypeDef( - PropertyType.FIXED_STRING, (short)20, null)); + PropertyType.FIXED_STRING, (short)20)); this.spaceItem = spaceItem; this.spaceItem.properties = spaceDesc; From f8d2ad9386efd8c8707fa40c5cee2e08f84ba5c5 Mon Sep 17 00:00:00 2001 From: Klay Date: Tue, 12 Oct 2021 12:12:07 -0700 Subject: [PATCH 6/6] append empty line for ssl files --- examples/src/main/resources/ssl/selfsigned.key | 2 +- examples/src/main/resources/ssl/selfsigned.password | 2 +- examples/src/main/resources/ssl/selfsigned.pem | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/src/main/resources/ssl/selfsigned.key b/examples/src/main/resources/ssl/selfsigned.key index 533ac941e..6006d0f27 100644 --- a/examples/src/main/resources/ssl/selfsigned.key +++ b/examples/src/main/resources/ssl/selfsigned.key @@ -27,4 +27,4 @@ zI3YMMd2G8hApt/QFlm4Ry8CqaJUmDcjDNIJT3M+RldUgfz37NsX05cA5e9+I1AL 2406F/v5U9gWsYx7HuwJtQrDzYYDbl1GD4H+qHFJE5JYhPP4AyWYxJ1NR5dqyvrt +3r5+xlwZrS76c10RsBWL7th8ZEzRxOZxbtLwbf4bG/tIGfQP2sTnWwA+qym6b2S sRduqOTP+xwnhOq/ZKn8lfsDfhT8CPnKHBsd09kM9y/UWuxFe0upLydRLE/Wsb9s ------END RSA PRIVATE KEY----- \ No newline at end of file +-----END RSA PRIVATE KEY----- diff --git a/examples/src/main/resources/ssl/selfsigned.password b/examples/src/main/resources/ssl/selfsigned.password index 60b7570cd..143be9ab9 100644 --- a/examples/src/main/resources/ssl/selfsigned.password +++ b/examples/src/main/resources/ssl/selfsigned.password @@ -1 +1 @@ -vesoft \ No newline at end of file +vesoft diff --git a/examples/src/main/resources/ssl/selfsigned.pem b/examples/src/main/resources/ssl/selfsigned.pem index 0815f63d6..412ba3161 100644 --- a/examples/src/main/resources/ssl/selfsigned.pem +++ b/examples/src/main/resources/ssl/selfsigned.pem @@ -21,4 +21,4 @@ IxBY5yggx3/lGi8tAgvUdarhd7mQO67UJ0V4YU3hAkbnZ8grHHXj+4hfgUpY4ok6 yaed6HXwknBb9W8N1jZI8ginhkhjaeRCHdMiF+fBvNCtmeR1bCml1Uz7ailrpcaT Mf84+5VYuFEnaRZYWFNsWNCOBlJ/6/b3V10vMXzMmYHqz3xgAq0M3fVTFTzopnAX DLSzorL/dYVdqEDCQi5XI9YAlgWN4VeGzJI+glkLOCNzHxRNP6Qev+YI+7Uxz6I= ------END CERTIFICATE----- \ No newline at end of file +-----END CERTIFICATE-----