Search in sources :

Example 21 with ClientEndpoint

use of com.hazelcast.client.ClientEndpoint in project hazelcast by hazelcast.

the class ClientEngineImpl method shutdown.

@Override
public void shutdown(boolean terminate) {
    for (ClientEndpoint ce : endpointManager.getEndpoints()) {
        ClientEndpointImpl endpoint = (ClientEndpointImpl) ce;
        try {
            endpoint.destroy();
        } catch (LoginException e) {
            logger.finest(e.getMessage());
        }
        try {
            final Connection conn = endpoint.getConnection();
            if (conn.isAlive()) {
                conn.close("Shutdown of ClientEngine", null);
            }
        } catch (Exception e) {
            logger.finest(e);
        }
    }
    endpointManager.clear();
    ownershipMappings.clear();
}
Also used : Connection(com.hazelcast.nio.Connection) TcpIpConnection(com.hazelcast.nio.tcp.TcpIpConnection) LoginException(javax.security.auth.login.LoginException) ClientEndpoint(com.hazelcast.client.ClientEndpoint) LoginException(javax.security.auth.login.LoginException) RejectedExecutionException(java.util.concurrent.RejectedExecutionException)

Aggregations

ClientEndpoint (com.hazelcast.client.ClientEndpoint)21 CacheService (com.hazelcast.cache.impl.CacheService)4 Data (com.hazelcast.nio.serialization.Data)4 ClientMessage (com.hazelcast.client.impl.protocol.ClientMessage)3 ItemListener (com.hazelcast.core.ItemListener)3 EventRegistration (com.hazelcast.spi.EventRegistration)3 EventService (com.hazelcast.spi.EventService)3 InternalOperationService (com.hazelcast.spi.impl.operationservice.InternalOperationService)3 CacheContext (com.hazelcast.cache.impl.CacheContext)2 ClientEngineImpl (com.hazelcast.client.impl.ClientEngineImpl)2 OperationFactoryWrapper (com.hazelcast.client.impl.operations.OperationFactoryWrapper)2 CollectionEventFilter (com.hazelcast.collection.impl.collection.CollectionEventFilter)2 MapService (com.hazelcast.map.impl.MapService)2 MapServiceContext (com.hazelcast.map.impl.MapServiceContext)2 EventFilter (com.hazelcast.spi.EventFilter)2 InvocationBuilder (com.hazelcast.spi.InvocationBuilder)2 OperationFactory (com.hazelcast.spi.OperationFactory)2 ICacheService (com.hazelcast.cache.impl.ICacheService)1 CachePartitionLostEvent (com.hazelcast.cache.impl.event.CachePartitionLostEvent)1 CachePartitionLostEventFilter (com.hazelcast.cache.impl.event.CachePartitionLostEventFilter)1