com.hazelcast.concurrent.countdownlatch
Class CountDownLatchService

java.lang.Object
  extended by com.hazelcast.concurrent.countdownlatch.CountDownLatchService
All Implemented Interfaces:
ManagedService, MigrationAwareService, RemoteService

public class CountDownLatchService
extends Object
implements ManagedService, RemoteService, MigrationAwareService


Field Summary
static String SERVICE_NAME
          The service name of this CountDownLatchService.
 
Constructor Summary
CountDownLatchService()
           
 
Method Summary
 void add(CountDownLatchInfo latch)
           
 void beforeMigration(PartitionMigrationEvent partitionMigrationEvent)
           
 void clearPartitionReplica(int partitionId)
           
 void commitMigration(PartitionMigrationEvent event)
           
 boolean containsLatch(String name)
           
 void countDown(String name)
           
 CountDownLatchProxy createDistributedObject(String name)
           
 void destroyDistributedObject(String name)
           
 int getCount(String name)
           
 CountDownLatchInfo getLatch(String name)
           
 void init(NodeEngine nodeEngine, Properties properties)
          Initializes this ManagedService
 Operation prepareReplicationOperation(PartitionReplicationEvent event)
           
 void reset()
          reset this ManagedService back to initial state.
 void rollbackMigration(PartitionMigrationEvent event)
           
 boolean setCount(String name, int count)
           
 void setCountDirect(String name, int count)
           
 boolean shouldWait(String name)
           
 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
The service name of this CountDownLatchService.

See Also:
Constant Field Values
Constructor Detail

CountDownLatchService

public CountDownLatchService()
Method Detail

getCount

public int getCount(String name)

setCount

public boolean setCount(String name,
                        int count)

setCountDirect

public void setCountDirect(String name,
                           int count)

countDown

public void countDown(String name)

shouldWait

public boolean shouldWait(String name)

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

createDistributedObject

public CountDownLatchProxy createDistributedObject(String name)
Specified by:
createDistributedObject in interface RemoteService

destroyDistributedObject

public void destroyDistributedObject(String name)
Specified by:
destroyDistributedObject in interface RemoteService

beforeMigration

public void beforeMigration(PartitionMigrationEvent partitionMigrationEvent)
Specified by:
beforeMigration in interface MigrationAwareService

prepareReplicationOperation

public Operation prepareReplicationOperation(PartitionReplicationEvent event)
Specified by:
prepareReplicationOperation in interface MigrationAwareService

commitMigration

public void commitMigration(PartitionMigrationEvent event)
Specified by:
commitMigration in interface MigrationAwareService

rollbackMigration

public void rollbackMigration(PartitionMigrationEvent event)
Specified by:
rollbackMigration in interface MigrationAwareService

clearPartitionReplica

public void clearPartitionReplica(int partitionId)
Specified by:
clearPartitionReplica in interface MigrationAwareService

getLatch

public CountDownLatchInfo getLatch(String name)

containsLatch

public boolean containsLatch(String name)

add

public void add(CountDownLatchInfo latch)


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