public class ClientEngineImpl extends Object implements ClientEngine, CoreService, PreJoinAwareService, 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) |
public static final String SERVICE_NAME
public ClientEngineImpl(Node node)
public ExecutorService getClientManagementExecutor()
public ConnectionListener getConnectionListener()
public SerializationService getSerializationService()
ClientEngine
getSerializationService
in interface ClientEngine
public int getClientEndpointCount()
getClientEndpointCount
in interface ClientEngine
public void handle(ClientMessage clientMessage, Connection connection)
ClientMessageHandler
handle
in interface ClientMessageHandler
clientMessage
- the ClientMessage the processconnection
- the connection responsible for creating the messagepublic IPartitionService getPartitionService()
getPartitionService
in interface ClientEngine
public ClusterService getClusterService()
getClusterService
in interface ClientEngine
public EventService getEventService()
getEventService
in interface ClientEngine
public ProxyService getProxyService()
getProxyService
in interface ClientEngine
public Address getMasterAddress()
getMasterAddress
in interface ClientEngine
public Address getThisAddress()
getThisAddress
in interface ClientEngine
public String getThisUuid()
getThisUuid
in interface ClientEngine
public MemberImpl getLocalMember()
getLocalMember
in interface ClientEngine
public Config getConfig()
getConfig
in interface ClientEngine
public ILogger getLogger(Class clazz)
getLogger
in interface ClientEngine
public ClientEndpointManager getEndpointManager()
public ClientExceptionFactory getClientExceptionFactory()
public SecurityContext getSecurityContext()
getSecurityContext
in interface ClientEngine
public void bind(ClientEndpoint endpoint)
public void dispatchEvent(ClientEvent event, ClientListener listener)
EventPublishingService
dispatchEvent
in interface EventPublishingService<ClientEvent,ClientListener>
event
- the published eventlistener
- the listener registered for this eventpublic void memberAdded(MembershipServiceEvent event)
MembershipAwareService
memberAdded
in interface MembershipAwareService
event
- the event for a new member added to the clusterpublic void memberRemoved(MembershipServiceEvent event)
MembershipAwareService
memberRemoved
in interface MembershipAwareService
event
- the event for an existing member leaving the clusterpublic void memberAttributeChanged(MemberAttributeServiceEvent event)
MembershipAwareService
memberAttributeChanged
in interface MembershipAwareService
event
- the event for a member attribute being changedpublic Collection<Client> getClients()
public void init(NodeEngine nodeEngine, Properties properties)
ManagedService
init
in interface ManagedService
nodeEngine
- the NodeEngine that this service belongs toproperties
- the Properties (can be used to pass settings to the service)public void reset()
ManagedService
TODO: what is the purpose of reset
reset
in interface ManagedService
public void shutdown(boolean terminate)
ManagedService
TODO: what is the purpose of the terminate variable
shutdown
in interface ManagedService
terminate
- true
to shut down this servicepublic boolean trySetLastAuthenticationCorrelationId(String clientUuid, long newCorrelationId)
public String getOwnerUuid(String clientUuid)
getOwnerUuid
in interface ClientEngine
public TransactionManagerService getTransactionManagerService()
public ClientPartitionListenerService getPartitionListenerService()
public Operation getPreJoinOperation()
PreJoinAwareService
PostJoinAwareService.getPostJoinOperation()
s, no partition locks, no key-based locks, no service level
locks, no database interaction are allowed. Additionally, a pre-join operation is executed while the cluster
lock is being held on the joining member, so it is important that the operation finishes quickly and does not
interact with other locks.
The Operation.getPartitionId()
method should return a negative value.
This means that the operations should not implement PartitionAwareOperation
.
Pre join operations should return response, which may also be a null
response.
getPreJoinOperation
in interface PreJoinAwareService
null
.public Map<ClientType,Integer> getConnectedClientStats()
ClientEngine
getConnectedClientStats
in interface ClientEngine
public Map<String,String> getClientStatistics()
ClientEngine
getClientStatistics
in interface ClientEngine
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.