public class GridClientNioTcpConnection extends GridClientConnection
clientId, closeReason, top| Modifier and Type | Method and Description |
|---|---|
<K,V> GridClientFutureAdapter<Boolean> |
cacheAppend(String cacheName,
K key,
V val,
Set<GridClientCacheFlag> flags,
UUID destNodeId)
Append requested value to already cached one.
|
<K,V> GridClientFutureAdapter<Boolean> |
cacheCompareAndSet(String cacheName,
K key,
V newVal,
V oldVal,
Set<GridClientCacheFlag> flags,
UUID destNodeId)
New valueActual/old valueBehaviour
null null Remove entry for key.
newVal null Put newVal into cache if such key doesn't exist.
null oldVal Remove if actual value oldVal is equals to value in cache.
newVal oldVal Replace if actual value oldVal is equals to value in cache.
|
<K,V> GridClientFutureAdapter<Map<K,V>> |
cacheGetAll(String cacheName,
Collection<K> keys,
Set<GridClientCacheFlag> flags,
UUID destNodeId)
Gets bundle of entries for specified keys from the cache.
|
<K> GridClientFutureAdapter<GridClientDataMetrics> |
cacheMetrics(String cacheName,
UUID destNodeId)
Gets cache metrics for the key.
|
<K,V> GridClientFutureAdapter<Boolean> |
cachePrepend(String cacheName,
K key,
V val,
Set<GridClientCacheFlag> flags,
UUID destNodeId)
Prepend requested value to already cached one.
|
<K,V> GridClientFutureAdapter<Boolean> |
cachePutAll(String cacheName,
Map<K,V> entries,
Set<GridClientCacheFlag> flags,
UUID destNodeId)
Puts bundle of entries into cache.
|
<K> GridClientFutureAdapter<Boolean> |
cacheRemove(String cacheName,
K key,
Set<GridClientCacheFlag> flags,
UUID destNodeId)
Removes entry from the cache for specified key.
|
<K> GridClientFutureAdapter<Boolean> |
cacheRemoveAll(String cacheName,
Collection<K> keys,
Set<GridClientCacheFlag> flags,
UUID destNodeId)
Removes bundle of entries for specified keys from the cache.
|
<K,V> GridClientFutureAdapter<Boolean> |
cacheReplace(String cacheName,
K key,
V val,
Set<GridClientCacheFlag> flags,
UUID destNodeId)
Replace key-value pair in cache if already exist.
|
<R> GridClientFutureAdapter<R> |
execute(String taskName,
Object arg,
UUID destNodeId)
Execute task in the grid.
|
GridClientFutureAdapter<GridRouterRequest> |
forwardMessage(Object msg)
Forwards a message in raw form to the connected node.
|
GridClientFuture<List<String>> |
log(String path,
int fromLine,
int toLine,
UUID destNodeId)
Gets log entries.
|
GridClientFuture<GridClientNode> |
node(String ipAddr,
boolean inclAttrs,
boolean includeMetrics,
UUID destNodeId)
Gets node by node IP.
|
GridClientFuture<GridClientNode> |
node(UUID id,
boolean inclAttrs,
boolean inclMetrics,
UUID destNodeId)
Gets node by node ID.
|
GridClientFuture<List<GridClientNode>> |
topology(boolean inclAttrs,
boolean inclMetrics,
UUID destNodeId)
Gets grid topology nodes.
|
cacheGet, cachePut, checkClosed, credentials, encodeCacheFlags, getCloseReasonAsException, getCloseReasonMessage, isClosed, metricsMapToMetrics, safeDouble, safeLong, serverAddress, sslContextpublic <K,V> GridClientFutureAdapter<Boolean> cachePutAll(String cacheName, Map<K,V> entries, Set<GridClientCacheFlag> flags, UUID destNodeId) throws GridClientConnectionResetException, GridClientClosedException
cachePutAll in class GridClientConnectioncacheName - Cache name.entries - Entries.flags - Cache flags to be enabled.destNodeId - Destination node ID.True if map contained more then one entry or if put succeeded in case of one entry,
false otherwiseGridClientConnectionResetException - In case of error.GridClientClosedException - If client was manually closed before request was sent over network.public <K,V> GridClientFutureAdapter<Map<K,V>> cacheGetAll(String cacheName, Collection<K> keys, Set<GridClientCacheFlag> flags, UUID destNodeId) throws GridClientConnectionResetException, GridClientClosedException
cacheGetAll in class GridClientConnectioncacheName - Cache name.keys - Keys.flags - Cache flags to be enabled.destNodeId - Destination node ID.GridClientConnectionResetException - In case of error.GridClientClosedException - If client was manually closed before request was sent over network.public <K> GridClientFutureAdapter<Boolean> cacheRemove(String cacheName, K key, Set<GridClientCacheFlag> flags, UUID destNodeId) throws GridClientConnectionResetException, GridClientClosedException
cacheRemove in class GridClientConnectioncacheName - Cache name.key - Key.flags - Cache flags to be enabled.destNodeId - Destination node ID.GridClientConnectionResetException - In case of error.GridClientClosedException - If client was manually closed before request was sent over network.public <K> GridClientFutureAdapter<Boolean> cacheRemoveAll(String cacheName, Collection<K> keys, Set<GridClientCacheFlag> flags, UUID destNodeId) throws GridClientConnectionResetException, GridClientClosedException
cacheRemoveAll in class GridClientConnectioncacheName - Cache name.keys - Keys.flags - Cache flags to be enabled.destNodeId - Destination node ID.GridClientConnectionResetException - In case of error.GridClientClosedException - If client was manually closed before request was sent over network.public <K,V> GridClientFutureAdapter<Boolean> cacheReplace(String cacheName, K key, V val, Set<GridClientCacheFlag> flags, UUID destNodeId) throws GridClientConnectionResetException, GridClientClosedException
cacheReplace in class GridClientConnectioncacheName - Cache name.key - Key.val - Value.flags - Cache flags to be enabled.destNodeId - Destination node ID.GridClientConnectionResetException - In case of error.GridClientClosedException - If client was manually closed before request was sent over network.public <K,V> GridClientFutureAdapter<Boolean> cacheCompareAndSet(String cacheName, K key, V newVal, V oldVal, Set<GridClientCacheFlag> flags, UUID destNodeId) throws GridClientConnectionResetException, GridClientClosedException
| New value | Actual/old value | Behaviour |
|---|---|---|
| null | null | Remove entry for key. |
| newVal | null | Put newVal into cache if such key doesn't exist. |
| null | oldVal | Remove if actual value oldVal is equals to value in cache. |
| newVal | oldVal | Replace if actual value oldVal is equals to value in cache. |
cacheCompareAndSet in class GridClientConnectioncacheName - Cache name.key - Key.newVal - Value 1.oldVal - Value 2.flags - Cache flags to be enabled.destNodeId - Destination node ID.GridClientConnectionResetException - In case of error.GridClientClosedException - If client was manually closed before request was sent over network.public <K> GridClientFutureAdapter<GridClientDataMetrics> cacheMetrics(String cacheName, UUID destNodeId) throws GridClientConnectionResetException, GridClientClosedException
cacheMetrics in class GridClientConnectioncacheName - Cache name.destNodeId - Destination node ID.GridClientConnectionResetException - In case of error.GridClientClosedException - If client was manually closed before request was sent over network.public <K,V> GridClientFutureAdapter<Boolean> cacheAppend(String cacheName, K key, V val, Set<GridClientCacheFlag> flags, UUID destNodeId) throws GridClientConnectionResetException, GridClientClosedException
cacheAppend in class GridClientConnectioncacheName - Cache name.key - Key.val - Value to append to the cached one.flags - Cache flags to be enabled.destNodeId - Destination node ID.GridClientConnectionResetException - In case of error.GridClientClosedException - If client was manually closed before request was sent over network.public <K,V> GridClientFutureAdapter<Boolean> cachePrepend(String cacheName, K key, V val, Set<GridClientCacheFlag> flags, UUID destNodeId) throws GridClientConnectionResetException, GridClientClosedException
cachePrepend in class GridClientConnectioncacheName - Cache name.key - Key.val - Value to prepend to the cached one.flags - Cache flags to be enabled.destNodeId - Destination node ID.GridClientConnectionResetException - In case of error.GridClientClosedException - If client was manually closed before request was sent over network.public <R> GridClientFutureAdapter<R> execute(String taskName, Object arg, UUID destNodeId) throws GridClientConnectionResetException, GridClientClosedException
execute in class GridClientConnectiontaskName - Task name.arg - Task argument.destNodeId - Destination node ID.GridClientConnectionResetException - In case of error.GridClientClosedException - If client was manually closed before request was sent over network.public GridClientFuture<GridClientNode> node(UUID id, boolean inclAttrs, boolean inclMetrics, UUID destNodeId) throws GridClientConnectionResetException, GridClientClosedException
node in class GridClientConnectionid - Node ID.inclAttrs - Whether to include attributes.inclMetrics - Whether to include metrics.destNodeId - Destination node ID.GridClientConnectionResetException - In case of error.GridClientClosedException - If client was manually closed before request was sent over network.public GridClientFuture<GridClientNode> node(String ipAddr, boolean inclAttrs, boolean includeMetrics, UUID destNodeId) throws GridClientConnectionResetException, GridClientClosedException
node in class GridClientConnectionipAddr - IP address.inclAttrs - Whether to include attributes.includeMetrics - Whether to include metrics.destNodeId - Destination node ID.GridClientConnectionResetException - In case of error.GridClientClosedException - If client was manually closed before request was sent over network.public GridClientFuture<List<GridClientNode>> topology(boolean inclAttrs, boolean inclMetrics, UUID destNodeId) throws GridClientConnectionResetException, GridClientClosedException
topology in class GridClientConnectioninclAttrs - Whether to include attributes.inclMetrics - Whether to include metrics.destNodeId - Destination node ID.GridClientConnectionResetException - In case of error.GridClientClosedException - If client was manually closed before request was sent over network.public GridClientFuture<List<String>> log(String path, int fromLine, int toLine, UUID destNodeId) throws GridClientConnectionResetException, GridClientClosedException
log in class GridClientConnectionpath - Log file path. If null, then default path will be used.fromLine - Index of start line that should be retrieved.toLine - Index of end line that should be retrieved.destNodeId - Destination node ID.GridClientConnectionResetException - In case of error.GridClientClosedException - If client was manually closed before request was sent over network.public GridClientFutureAdapter<GridRouterRequest> forwardMessage(Object msg) throws GridClientException
forwardMessage in class GridClientConnectionmsg - A raw message to send.GridClientException - If message forwarding failed.Copyright © 2014. All rights reserved.