protected final int getConnectedServerVersion() { HazelcastClientInstanceImpl client = getClient(); ClientConnectionManager connectionManager = client.getConnectionManager(); Collection<ClientConnection> activeConnections = connectionManager.getActiveConnections(); for (ClientConnection connection : activeConnections) { return connection.getConnectedServerVersion(); } return UNKNOWN_HAZELCAST_VERSION; }
protected <T> T invokeOnPartitionInterruptibly(ClientMessage clientMessage, int partitionId) throws InterruptedException { try { final Future future = new ClientInvocation(getClient(), clientMessage, getName(), partitionId).invoke(); return (T) future.get(); } catch (Exception e) { throw ExceptionUtil.rethrowAllowInterrupted(e); } }
protected final int getConnectedServerVersion() { HazelcastClientInstanceImpl client = getClient(); ClientConnectionManager connectionManager = client.getConnectionManager(); Collection<ClientConnection> activeConnections = connectionManager.getActiveConnections(); for (ClientConnection connection : activeConnections) { return connection.getConnectedServerVersion(); } return UNKNOWN_HAZELCAST_VERSION; }
protected <T> T invoke(ClientMessage clientMessage) { try { final Future future = new ClientInvocation(getClient(), clientMessage, getName()).invoke(); return (T) future.get(); } catch (Exception e) { throw rethrow(e); } }
protected <T> T invokeOnPartition(ClientMessage clientMessage, int partitionId) { try { final Future future = new ClientInvocation(getClient(), clientMessage, getName(), partitionId).invoke(); return (T) future.get(); } catch (Exception e) { throw rethrow(e); } }
protected <T> T invokeOnPartition(ClientMessage clientMessage, int partitionId) { try { final Future future = new ClientInvocation(getClient(), clientMessage, getName(), partitionId).invoke(); return (T) future.get(); } catch (Exception e) { throw rethrow(e); } }
protected <T> T invoke(ClientMessage clientMessage) { try { final Future future = new ClientInvocation(getClient(), clientMessage, getName()).invoke(); return (T) future.get(); } catch (Exception e) { throw rethrow(e); } }
protected <T> T invokeOnAddress(ClientMessage clientMessage, Address address) { try { final Future future = new ClientInvocation(getClient(), clientMessage, getName(), address).invoke(); return (T) future.get(); } catch (Exception e) { throw rethrow(e); } }
protected <T> T invokeOnAddress(ClientMessage clientMessage, Address address) { try { final Future future = new ClientInvocation(getClient(), clientMessage, getName(), address).invoke(); return (T) future.get(); } catch (Exception e) { throw rethrow(e); } }
protected <T> T invokeOnPartitionInterruptibly(ClientMessage clientMessage, int partitionId) throws InterruptedException { try { final Future future = new ClientInvocation(getClient(), clientMessage, getName(), partitionId).invoke(); return (T) future.get(); } catch (Exception e) { throw ExceptionUtil.rethrowAllowInterrupted(e); } }
/** * Destroys the remote distributed object counterpart of this proxy by * issuing the destruction request to the cluster. */ public final void destroyRemotely() { ClientMessage clientMessage = ClientDestroyProxyCodec.encodeRequest(getDistributedObjectName(), getServiceName()); try { new ClientInvocation(getClient(), clientMessage, getName()).invoke().get(); } catch (Exception e) { throw rethrow(e); } }
/** * Destroys the remote distributed object counterpart of this proxy by * issuing the destruction request to the cluster. */ public final void destroyRemotely() { ClientMessage clientMessage = ClientDestroyProxyCodec.encodeRequest(getDistributedObjectName(), getServiceName()); try { new ClientInvocation(getClient(), clientMessage, getName()).invoke().get(); } catch (Exception e) { throw rethrow(e); } }