public class ClientEngineImpl extends Object implements ClientEngine, CoreService, PostJoinAwareService, ManagedService, MembershipAwareService, EventPublishingService<ClientEvent,ClientListener>
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_NAME
Service name to be used in requests.
|
| Constructor and Description |
|---|
ClientEngineImpl(Node node) |
| Modifier and Type | Method and Description |
|---|---|
String |
addOwnershipMapping(String clientUuid,
String ownerUuid) |
void |
bind(ClientEndpoint endpoint) |
void |
dispatchEvent(ClientEvent event,
ClientListener listener)
Notifies the service of a published event.
|
int |
getClientEndpointCount() |
ClientExceptionFactory |
getClientExceptionFactory() |
Collection<Client> |
getClients() |
Map<String,String> |
getClientStatistics()
The statistics is a String that is composed of key=value pairs separated by ',' .
|
ClusterService |
getClusterService() |
Config |
getConfig() |
Map<ClientType,Integer> |
getConnectedClientStats()
Returns Map which contains number of connected clients to the cluster.
|
ConnectionListener |
getConnectionListener() |
ClientEndpointManager |
getEndpointManager() |
EventService |
getEventService() |
MemberImpl |
getLocalMember() |
ILogger |
getLogger(Class clazz) |
Address |
getMasterAddress() |
String |
getOwnerUuid(String clientUuid) |
ClientPartitionListenerService |
getPartitionListenerService() |
IPartitionService |
getPartitionService() |
Operation |
getPostJoinOperation()
Post join operations must be lock free, meaning no locks at all:
no partition locks, no key-based locks, no service level locks, no database interaction!
The
Operation.getPartitionId() method should return a negative value. |
ProxyService |
getProxyService() |
SecurityContext |
getSecurityContext() |
SerializationService |
getSerializationService()
Returns the SerializationService.
|
Address |
getThisAddress() |
String |
getThisUuid() |
TransactionManagerService |
getTransactionManagerService() |
void |
handle(ClientMessage clientMessage,
Connection connection)
Received message to be processed
|
void |
init(NodeEngine nodeEngine,
Properties properties)
Initializes this ManagedService
|
void |
memberAdded(MembershipServiceEvent event)
Invoked when a new member is added to the cluster.
|
void |
memberAttributeChanged(MemberAttributeServiceEvent event)
Invoked when a member attribute is changed.
|
void |
memberRemoved(MembershipServiceEvent event)
Invoked when an existing member leaves the cluster.
|
boolean |
removeOwnershipMapping(String clientUuid,
String memberUuid) |
void |
reset()
reset this ManagedService back to initial state.
|
void |
shutdown(boolean terminate)
Shuts down this ManagedService.
|
boolean |
trySetLastAuthenticationCorrelationId(String clientUuid,
long newCorrelationId) |
public static final String SERVICE_NAME
public ClientEngineImpl(Node node)
public ConnectionListener getConnectionListener()
public SerializationService getSerializationService()
ClientEnginegetSerializationService in interface ClientEnginepublic int getClientEndpointCount()
getClientEndpointCount in interface ClientEnginepublic void handle(ClientMessage clientMessage, Connection connection)
ClientMessageHandlerhandle in interface ClientMessageHandlerclientMessage - the ClientMessage the processconnection - the connection responsible for creating the messagepublic IPartitionService getPartitionService()
getPartitionService in interface ClientEnginepublic ClusterService getClusterService()
getClusterService in interface ClientEnginepublic EventService getEventService()
getEventService in interface ClientEnginepublic ProxyService getProxyService()
getProxyService in interface ClientEnginepublic Address getMasterAddress()
getMasterAddress in interface ClientEnginepublic Address getThisAddress()
getThisAddress in interface ClientEnginepublic String getThisUuid()
getThisUuid in interface ClientEnginepublic MemberImpl getLocalMember()
getLocalMember in interface ClientEnginepublic Config getConfig()
getConfig in interface ClientEnginepublic ILogger getLogger(Class clazz)
getLogger in interface ClientEnginepublic ClientEndpointManager getEndpointManager()
public ClientExceptionFactory getClientExceptionFactory()
public SecurityContext getSecurityContext()
getSecurityContext in interface ClientEnginepublic void bind(ClientEndpoint endpoint)
public void dispatchEvent(ClientEvent event, ClientListener listener)
EventPublishingServicedispatchEvent in interface EventPublishingService<ClientEvent,ClientListener>event - the published eventlistener - the listener registered for this eventpublic void memberAdded(MembershipServiceEvent event)
MembershipAwareServicememberAdded in interface MembershipAwareServiceevent - the event for a new member added to the clusterpublic void memberRemoved(MembershipServiceEvent event)
MembershipAwareServicememberRemoved in interface MembershipAwareServiceevent - the event for an existing member leaving the clusterpublic void memberAttributeChanged(MemberAttributeServiceEvent event)
MembershipAwareServicememberAttributeChanged in interface MembershipAwareServiceevent - the event for a member attribute being changedpublic Collection<Client> getClients()
public void init(NodeEngine nodeEngine, Properties properties)
ManagedServiceinit in interface ManagedServicenodeEngine - the NodeEngine that this ManagedService belongs to.properties - the Properties. Can be used to pass settings to the service.public void reset()
ManagedServicereset in interface ManagedServicepublic void shutdown(boolean terminate)
ManagedServiceshutdown in interface ManagedServiceterminate - true to shut down the ManagedServicepublic boolean trySetLastAuthenticationCorrelationId(String clientUuid, long newCorrelationId)
public String getOwnerUuid(String clientUuid)
getOwnerUuid in interface ClientEnginepublic TransactionManagerService getTransactionManagerService()
public ClientPartitionListenerService getPartitionListenerService()
public Operation getPostJoinOperation()
PostJoinAwareServiceOperation.getPartitionId() method should return a negative value.
This means that the operations should not implement PartitionAwareOperation.
Post join operations should return response, at least a null response.
getPostJoinOperation in interface PostJoinAwareServicenull.public Map<ClientType,Integer> getConnectedClientStats()
ClientEnginegetConnectedClientStats in interface ClientEnginepublic Map<String,String> getClientStatistics()
ClientEnginegetClientStatistics in interface ClientEngineCopyright © 2018 Hazelcast, Inc.. All Rights Reserved.