public interface ClientMessageTemplate
| Modifier and Type | Method and Description |
|---|---|
Object |
addDistributedObjectListener(boolean localOnly) |
Object |
addMembershipListener(boolean localOnly) |
void |
addPartitionListener()
Adds partition listener to send server.
|
Object |
addPartitionLostListener(boolean localOnly) |
Object |
authentication(String username,
String password,
String uuid,
String ownerUuid,
boolean isOwnerConnection,
String clientType,
byte serializationVersion,
String clientHazelcastVersion) |
Object |
authenticationCustom(Data credentials,
String uuid,
String ownerUuid,
boolean isOwnerConnection,
String clientType,
byte serializationVersion,
String clientHazelcastVersion) |
void |
createProxy(String name,
String serviceName,
Address target) |
void |
deployClasses(List<Map.Entry<String,byte[]>> classDefinitions)
Deploys the list of classes to cluster
Each item is a Map.Entry
|
void |
destroyProxy(String name,
String serviceName) |
Object |
getDistributedObjects() |
Object |
getPartitions() |
void |
ping() |
void |
removeAllListeners() |
Object |
removeDistributedObjectListener(String registrationId) |
Object |
removePartitionLostListener(String registrationId) |
void |
statistics(String stats)
The statistics is a String that is composed of key=value pairs separated by ',' .
|
Object authentication(String username, String password, @Nullable String uuid, @Nullable String ownerUuid, boolean isOwnerConnection, String clientType, byte serializationVersion, @Since(value="1.3") String clientHazelcastVersion)
username - Name of the user for authentication.password - Password for the user.uuid - Unique string identifying the connected client uniquely. This string is generated by the owner member server
on initial connection. When the client connects to a non-owner member it sets this field on the request.ownerUuid - Unique string identifying the server member uniquely.isOwnerConnection - You must set this field to true while connecting to the owner member, otherwise set to false.clientType - The type of the client. E.g. JAVA, CPP, CSHARP, etc.serializationVersion - client side supported version to inform server sideclientHazelcastVersion - The Hazelcast version of the client. (e.g. 3.7.2)Object authenticationCustom(Data credentials, @Nullable String uuid, @Nullable String ownerUuid, boolean isOwnerConnection, String clientType, byte serializationVersion, @Since(value="1.3") String clientHazelcastVersion)
credentials - Secret byte array for authentication.uuid - Unique string identifying the connected client uniquely. This string is generated by the owner member server
on initial connection. When the client connects to a non-owner member it sets this field on the request.ownerUuid - Unique string identifying the server member uniquely.isOwnerConnection - You must set this field to true while connecting to the owner member, otherwise set to false.clientType - The type of the client. E.g. JAVA, CPP, CSHARP, etc.serializationVersion - client side supported version to inform server sideclientHazelcastVersion - The Hazelcast version of the client. (e.g. 3.7.2)Object addMembershipListener(boolean localOnly)
localOnly - if true only master node sends events, otherwise all registered nodes send all membership
changes.void createProxy(String name, String serviceName, Address target)
name - The distributed object name for which the proxy is being created for.serviceName - The name of the service. Possible service names are:
"hz:impl:listService"
"hz:impl:queueService"
"hz:impl:setService"
"hz:impl:atomicLongService"
"hz:impl:atomicReferenceService"
"hz:impl:countDownLatchService"
"hz:impl:idGeneratorService"
"hz:impl:semaphoreService"
"hz:impl:executorService"
"hz:impl:mapService"
"hz:impl:mapReduceService"
"hz:impl:multiMapService"
"hz:impl:quorumService"
"hz:impl:replicatedMapService"
"hz:impl:ringbufferService"
"hz:core:proxyService"
"hz:impl:reliableTopicService"
"hz:impl:topicService"
"hz:core:txManagerService"
"hz:impl:xaService"void destroyProxy(String name, String serviceName)
name - The distributed object name for which the proxy is being destroyed for.serviceName - The name of the service. Possible service names are:
"hz:impl:listService"
"hz:impl:queueService"
"hz:impl:setService"
"hz:impl:atomicLongService"
"hz:impl:atomicReferenceService"
"hz:impl:countDownLatchService"
"hz:impl:idGeneratorService"
"hz:impl:semaphoreService"
"hz:impl:executorService"
"hz:impl:mapService"
"hz:impl:mapReduceService"
"hz:impl:multiMapService"
"hz:impl:quorumService"
"hz:impl:replicatedMapService"
"hz:impl:ringbufferService"
"hz:core:proxyService"
"hz:impl:reliableTopicService"
"hz:impl:topicService"
"hz:core:txManagerService"
"hz:impl:xaService"Object getPartitions()
void removeAllListeners()
Object addPartitionLostListener(boolean localOnly)
localOnly - if true only node that has the partition sends the request, if false
sends all partition lost events.Object removePartitionLostListener(String registrationId)
registrationId - The id assigned during the listener registration.Object getDistributedObjects()
Object addDistributedObjectListener(boolean localOnly)
localOnly - If set to true, the server adds the listener only to itself, otherwise the listener is is added for all
members in the cluster.Object removeDistributedObjectListener(String registrationId)
registrationId - The id assigned during the registration.void ping()
@Since(value="1.5") void statistics(String stats)
ClientType
clusterConnectionTimestamp: The time that the client connected to the cluster (milliseconds since epoch). It is reset on
each reconnection.
credentials.principal: The principal of the client if it exists. For
UsernamePasswordCredentials, this is the username, for custom authentication it is set by
the Credentials implementer.
clientAddress: The address of the client. It is formatted as "NearCacheStats):
nc.OperatingSystemMetricSet,
sun.management.OperatingSystemImpl) and com.sun.management.UnixOperatingSystemMXBean:
os.committedVirtualMemorySize: The amount of virtual memory that is guaranteed to be available to the running process in
bytes, or -1 if this operation is not supported.
os.freePhysicalMemorySize: The amount of free physical memory in bytes.
os.freeSwapSpaceSize: The amount of free swap space in bytes.
os.maxFileDescriptorCount: The maximum number of file descriptors.
os.openFileDescriptorCount: The number of open file descriptors.
os.processCpuTime: The CPU time used by the process in nanoseconds.
os.systemLoadAverage: The system load average for the last minute. (See
OperatingSystemMXBean.getSystemLoadAverage())
The system load average is the sum of the number of runnable entities
queued to the OperatingSystemMXBean.getAvailableProcessors() available processors
and the number of runnable entities running on the available processors
averaged over a period of time.
The way in which the load average is calculated is operating system
specific but is typically a damped time-dependent average.
If the load average is not available, a negative value is returned.
os.totalPhysicalMemorySize: The total amount of physical memory in bytes.
os.totalSwapSpaceSize: The total amount of swap space in bytes.
Runtime statistics (See Runtime:
runtime.availableProcessors: The number of processors available to the process.
runtime.freeMemory: an approximation to the total amount of memory currently available for future allocated objects,
measured in bytes.
runtime.maxMemory: The maximum amount of memory that the process will attempt to use, measured in bytes
runtime.totalMemory: The total amount of memory currently available for current and future objects, measured in bytes.
runtime.uptime: The uptime of the process in milliseconds.
runtime.usedMemory: The difference of total memory and used memory in bytes.
userExecutor.queueSize: The number of waiting tasks in the client user executor (See ClientExecutionService#getUserExecutor)
Not: Please observe that the name for the ICache appears to be the hazelcast instance name "hz" followed by "/" and
followed by the cache name provided which is StatICacheName.
An example stats string (IMap name: StatIMapName and ICache name: StatICacheName with near-cache enabled):
lastStatisticsCollectionTime=1496137027173,enterprise=false,clientType=JAVA,clusterConnectionTimestamp=1496137018114,
clientAddress=127.0.0.1:5001,clientName=hz.client_0,executionService.userExecutorQueueSize=0,runtime.maxMemory=1065025536,
os.freePhysicalMemorySize=32067584,os.totalPhysicalMemorySize=17179869184,os.systemLoadAverage=249,
runtime.usedMemory=16235040,runtime.freeMemory=115820000,os.totalSwapSpaceSize=5368709120,runtime.availableProcessors=4,
runtime.uptime=13616,os.committedVirtualMemorySize=4081422336,os.maxFileDescriptorCount=10240,
runtime.totalMemory=132055040,os.processCpuTime=6270000000,os.openFileDescriptorCount=67,os.freeSwapSpaceSize=888406016,
nc.StatIMapName.creationTime=1496137021761,nc.StatIMapName.evictions=0,nc.StatIMapName.hits=1,
nc.StatIMapName.lastPersistenceDuration=0,nc.StatIMapName.lastPersistenceKeyCount=0,nc.StatIMapName.lastPersistenceTime=0,
nc.StatIMapName.lastPersistenceWrittenBytes=0,nc.StatIMapName.misses=1,nc.StatIMapName.ownedEntryCount=1,
nc.StatIMapName.expirations=0,nc.StatIMapName.ownedEntryMemoryCost=140,nc.hz/StatICacheName.creationTime=1496137025201,
nc.hz/StatICacheName.evictions=0,nc.hz/StatICacheName.hits=1,nc.hz/StatICacheName.lastPersistenceDuration=0,
nc.hz/StatICacheName.lastPersistenceKeyCount=0,nc.hz/StatICacheName.lastPersistenceTime=0,
nc.hz/StatICacheName.lastPersistenceWrittenBytes=0,nc.hz/StatICacheName.misses=1,nc.hz/StatICacheName.ownedEntryCount=1,
nc.hz/StatICacheName.expirations=0,nc.hz/StatICacheName.ownedEntryMemoryCost=140
stats - The key=value pairs separated by the ',' character@Since(value="1.5") void deployClasses(List<Map.Entry<String,byte[]>> classDefinitions)
classDefinitions - list of class definitionsCopyright © 2018. All Rights Reserved.