com.hazelcast.client.impl
Class ClientEngineImpl

java.lang.Object
  extended by com.hazelcast.client.impl.ClientEngineImpl
All Implemented Interfaces:
ClientEngine, CoreService, EventPublishingService<ClientEndpointImpl,ClientListener>, ManagedService, MembershipAwareService, PostJoinAwareService

public class ClientEngineImpl
extends Object
implements ClientEngine, CoreService, PostJoinAwareService, ManagedService, MembershipAwareService, EventPublishingService<ClientEndpointImpl,ClientListener>

Class that requests, listeners from client handled in node side.


Field Summary
static String SERVICE_NAME
          Service Name of clientEngine to be used in requests
 
Constructor Summary
ClientEngineImpl(Node node)
           
 
Method Summary
 void addOwnershipMapping(String clientUuid, String ownerUuid)
           
 void bind(ClientEndpoint endpoint)
           
 void dispatchEvent(ClientEndpointImpl event, ClientListener listener)
           
 int getClientEndpointCount()
           
 Collection<Client> getClients()
           
 ClusterService getClusterService()
           
 Config getConfig()
           
 ConnectionListener getConnectionListener()
           
 ClientEndpointManager getEndpointManager()
           
 EventService getEventService()
           
 MemberImpl getLocalMember()
           
 ILogger getLogger(Class clazz)
           
 Address getMasterAddress()
           
 InternalPartitionService getPartitionService()
           
 Operation getPostJoinOperation()
          Post join operations must be lock free; means no locks at all; no partition locks, no key-based locks, no service level locks or no database interaction!
 ProxyService getProxyService()
           
 SecurityContext getSecurityContext()
           
 Address getThisAddress()
           
 TransactionManagerService getTransactionManagerService()
           
 void handlePacket(Packet packet)
           
 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.
 void removeOwnershipMapping(String clientUuid)
           
 void reset()
          reset this ManagedService back to initial state.
 void sendResponse(ClientEndpoint endpoint, Data key, Object response, int callId, boolean isError, boolean isEvent)
           
 void shutdown(boolean terminate)
          Shuts down this ManagedService.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_NAME

public static final String SERVICE_NAME
Service Name of clientEngine to be used in requests

See Also:
Constant Field Values
Constructor Detail

ClientEngineImpl

public ClientEngineImpl(Node node)
Method Detail

getConnectionListener

public ConnectionListener getConnectionListener()

getClientEndpointCount

public int getClientEndpointCount()
Specified by:
getClientEndpointCount in interface ClientEngine

handlePacket

public void handlePacket(Packet packet)

getPartitionService

public InternalPartitionService getPartitionService()
Specified by:
getPartitionService in interface ClientEngine

getClusterService

public ClusterService getClusterService()
Specified by:
getClusterService in interface ClientEngine

getEventService

public EventService getEventService()
Specified by:
getEventService in interface ClientEngine

getProxyService

public ProxyService getProxyService()
Specified by:
getProxyService in interface ClientEngine

sendResponse

public void sendResponse(ClientEndpoint endpoint,
                         Data key,
                         Object response,
                         int callId,
                         boolean isError,
                         boolean isEvent)

getMasterAddress

public Address getMasterAddress()
Specified by:
getMasterAddress in interface ClientEngine

getThisAddress

public Address getThisAddress()
Specified by:
getThisAddress in interface ClientEngine

getLocalMember

public MemberImpl getLocalMember()
Specified by:
getLocalMember in interface ClientEngine

getConfig

public Config getConfig()
Specified by:
getConfig in interface ClientEngine

getLogger

public ILogger getLogger(Class clazz)
Specified by:
getLogger in interface ClientEngine

getEndpointManager

public ClientEndpointManager getEndpointManager()

getSecurityContext

public SecurityContext getSecurityContext()
Specified by:
getSecurityContext in interface ClientEngine

bind

public void bind(ClientEndpoint endpoint)

dispatchEvent

public void dispatchEvent(ClientEndpointImpl event,
                          ClientListener listener)
Specified by:
dispatchEvent in interface EventPublishingService<ClientEndpointImpl,ClientListener>

memberAdded

public void memberAdded(MembershipServiceEvent event)
Description copied from interface: MembershipAwareService
Invoked when a new member is added to the cluster.

Specified by:
memberAdded in interface MembershipAwareService

memberRemoved

public void memberRemoved(MembershipServiceEvent event)
Description copied from interface: MembershipAwareService
Invoked when an existing member leaves the cluster.

Specified by:
memberRemoved in interface MembershipAwareService

memberAttributeChanged

public void memberAttributeChanged(MemberAttributeServiceEvent event)
Description copied from interface: MembershipAwareService
Invoked when a member attribute is changed.

Specified by:
memberAttributeChanged in interface MembershipAwareService

getClients

public Collection<Client> getClients()

init

public void init(NodeEngine nodeEngine,
                 Properties properties)
Description copied from interface: ManagedService
Initializes this ManagedService

Specified by:
init in interface ManagedService
Parameters:
nodeEngine - the NodeEngine this ManagedService belongs to.
properties - the Properties. Can be used to pass settings to the service.

reset

public void reset()
Description copied from interface: ManagedService
reset this ManagedService back to initial state. todo: what is the purpose of reset

Specified by:
reset in interface ManagedService

shutdown

public void shutdown(boolean terminate)
Description copied from interface: ManagedService
Shuts down this ManagedService. todo: what is the purpose of the terminate variable.

Specified by:
shutdown in interface ManagedService

addOwnershipMapping

public void addOwnershipMapping(String clientUuid,
                                String ownerUuid)

removeOwnershipMapping

public void removeOwnershipMapping(String clientUuid)

getTransactionManagerService

public TransactionManagerService getTransactionManagerService()

getPostJoinOperation

public Operation getPostJoinOperation()
Description copied from interface: PostJoinAwareService
Post join operations must be lock free; means no locks at all; no partition locks, no key-based locks, no service level locks or no database interaction!

Post join operations should return response, at least a null response.

Specified by:
getPostJoinOperation in interface PostJoinAwareService


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.