org.objectweb.perseus.concurrency.distributed.globallock.lib
Class GlobalLockCoordinator
java.lang.Object
org.objectweb.perseus.concurrency.distributed.globallock.lib.GlobalLockCoordinator
- All Implemented Interfaces:
- java.io.Serializable
- public class GlobalLockCoordinator
- extends java.lang.Object
- implements java.io.Serializable
This class is the server side of the global lock management and is not
intended to be used directly. Coordinators will be dynamically created by
the distributed respurce management through the GlobalLockCoordinatorFactory.
Coordinators communicate with users using the DistResCoordinatorService
interface. As global locks are cached by users, they must be called back
when necessary. The coordinator ensure that a lock is never granted to
different users with incompatible levels. Incompatibility is defined by the
lockValue when initializing the GlobalLockCoordinatorFactory instance. When
a user request cannot be satisfied because it is not compatible with other
users, a downgrade lock authoritative request (that is, a call back) is sent
users with a level compatible with the requested one. On reception, users
must adjust their grantable lock level so that new
local reuqest will be blocked, and notify the coordinator of the effective
downgrading when the local granted level is less or equal to the call back
level. Note that new coordinator instance is created by the
GlobalLockMasterFactory for each shared resource. Hence the instance itself
is sent when coordination migration or replication.
- See Also:
GlobalLockUser
,
GlobalLockCoordinatorFactory
,
LockValue
,
org.objectweb.perseus.distribution.api.DistResCoordinator
,
org.objectweb.perseus.distribution.api.DistResCoordinatorService
,
Serialized Form
Method Summary |
java.io.Serializable |
freeze(java.lang.Object resId)
|
boolean |
joinUsersRequest(java.lang.Object resId,
java.io.Serializable node)
|
void |
nodeFailed(java.lang.Object resId,
java.io.Serializable nodeId)
|
void |
receive(java.lang.Object objId,
java.io.Serializable user,
java.io.Serializable msg)
|
void |
recover(java.lang.Object resId,
java.util.Map userStates)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GlobalLockCoordinator
public GlobalLockCoordinator(java.lang.Object resId,
DistResCoordinatorService drcs,
LockValue lockValue)
- Create a new coordinator using a LockValue
- Parameters:
lockValue
- - See Also:
GlobalLockCoordinator
,
LockValue
GlobalLockCoordinator
public GlobalLockCoordinator(GlobalLockCoordinator glc)
receive
public void receive(java.lang.Object objId,
java.io.Serializable user,
java.io.Serializable msg)
freeze
public java.io.Serializable freeze(java.lang.Object resId)
joinUsersRequest
public boolean joinUsersRequest(java.lang.Object resId,
java.io.Serializable node)
recover
public void recover(java.lang.Object resId,
java.util.Map userStates)
nodeFailed
public void nodeFailed(java.lang.Object resId,
java.io.Serializable nodeId)
toString
public java.lang.String toString()
Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.