com.hazelcast.concurrent.lock
Class LockServiceImpl

java.lang.Object
  extended by com.hazelcast.concurrent.lock.LockServiceImpl
All Implemented Interfaces:
LockService, ClientAwareService, ManagedService, MembershipAwareService, MigrationAwareService, RemoteService, SharedService

public final class LockServiceImpl
extends Object
implements LockService, ManagedService, RemoteService, MembershipAwareService, MigrationAwareService, ClientAwareService


Field Summary
 
Fields inherited from interface com.hazelcast.concurrent.lock.LockService
SERVICE_NAME
 
Constructor Summary
LockServiceImpl(NodeEngine nodeEngine)
           
 
Method Summary
 void beforeMigration(PartitionMigrationEvent partitionMigrationEvent)
           
 void cancelEviction(ObjectNamespace namespace, Data key)
           
 void clearLockStore(int partitionId, ObjectNamespace namespace)
           
 void clearPartitionReplica(int partitionId)
           
 void clientDisconnected(String clientUuid)
          Invoked when a client disconnected from a member.
 void commitMigration(PartitionMigrationEvent event)
           
 DistributedObject createDistributedObject(String objectId)
           
 LockStore createLockStore(int partitionId, ObjectNamespace namespace)
           
 void destroyDistributedObject(String objectId)
           
 Collection<LockResource> getAllLocks()
           
 LockStoreContainer getLockContainer(int partitionId)
           
 LockStoreImpl getLockStore(int partitionId, ObjectNamespace namespace)
           
 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.
 Operation prepareReplicationOperation(PartitionReplicationEvent event)
           
 void registerLockStoreConstructor(String serviceName, ConstructorFunction<ObjectNamespace,LockStoreInfo> constructorFunction)
           
 void reset()
          reset this ManagedService back to initial state.
 void rollbackMigration(PartitionMigrationEvent event)
           
 void scheduleEviction(ObjectNamespace namespace, Data key, int version, long delay)
           
 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
 

Constructor Detail

LockServiceImpl

public LockServiceImpl(NodeEngine nodeEngine)
Method Detail

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

registerLockStoreConstructor

public void registerLockStoreConstructor(String serviceName,
                                         ConstructorFunction<ObjectNamespace,LockStoreInfo> constructorFunction)
Specified by:
registerLockStoreConstructor in interface LockService

createLockStore

public LockStore createLockStore(int partitionId,
                                 ObjectNamespace namespace)
Specified by:
createLockStore in interface LockService

clearLockStore

public void clearLockStore(int partitionId,
                           ObjectNamespace namespace)
Specified by:
clearLockStore in interface LockService

scheduleEviction

public void scheduleEviction(ObjectNamespace namespace,
                             Data key,
                             int version,
                             long delay)

cancelEviction

public void cancelEviction(ObjectNamespace namespace,
                           Data key)

getLockContainer

public LockStoreContainer getLockContainer(int partitionId)

getLockStore

public LockStoreImpl getLockStore(int partitionId,
                                  ObjectNamespace namespace)

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

getAllLocks

public Collection<LockResource> getAllLocks()
Specified by:
getAllLocks in interface LockService

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

createDistributedObject

public DistributedObject createDistributedObject(String objectId)
Specified by:
createDistributedObject in interface RemoteService

destroyDistributedObject

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

clientDisconnected

public void clientDisconnected(String clientUuid)
Description copied from interface: ClientAwareService
Invoked when a client disconnected from a member.

Specified by:
clientDisconnected in interface ClientAwareService


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