Search in sources :

Example 1 with CacheLeaveCommand

use of org.infinispan.commands.topology.CacheLeaveCommand in project infinispan by infinispan.

the class LocalCacheStatus method leave.

@Override
public void leave(String cacheName, long timeout) {
    log.debugf("Node %s leaving cache %s", transport.getAddress(), cacheName);
    runningCaches.remove(cacheName);
    ReplicableCommand command = new CacheLeaveCommand(cacheName, transport.getAddress(), transport.getViewId());
    try {
        CompletionStages.join(helper.executeOnCoordinator(transport, command, timeout));
    } catch (Exception e) {
        log.debugf(e, "Error sending the leave request for cache %s to coordinator", cacheName);
    }
}
Also used : ReplicableCommand(org.infinispan.commands.ReplicableCommand) CacheLeaveCommand(org.infinispan.commands.topology.CacheLeaveCommand) TimeoutException(org.infinispan.util.concurrent.TimeoutException) IllegalLifecycleStateException(org.infinispan.commons.IllegalLifecycleStateException) SuspectException(org.infinispan.remoting.transport.jgroups.SuspectException)

Aggregations

ReplicableCommand (org.infinispan.commands.ReplicableCommand)1 CacheLeaveCommand (org.infinispan.commands.topology.CacheLeaveCommand)1 IllegalLifecycleStateException (org.infinispan.commons.IllegalLifecycleStateException)1 SuspectException (org.infinispan.remoting.transport.jgroups.SuspectException)1 TimeoutException (org.infinispan.util.concurrent.TimeoutException)1