org.objectweb.perseus.concurrency.distributed
Class DistributedConcurrencyManager

java.lang.Object
  extended byorg.objectweb.perseus.concurrency.pessimistic.PessimisticConcurrencyManager
      extended byorg.objectweb.perseus.concurrency.distributed.DistributedConcurrencyManager
All Implemented Interfaces:
ConcurrencyManager, PessimisticConcurrencyManagerAC

public abstract class DistributedConcurrencyManager
extends PessimisticConcurrencyManager


Nested Class Summary
 
Nested classes inherited from class org.objectweb.perseus.concurrency.pessimistic.PessimisticConcurrencyManager
PessimisticConcurrencyManager.ContextInfo
 
Field Summary
static java.lang.String GLOBAL_LOCK_MANAGER_BINDING
           
 
Fields inherited from class org.objectweb.perseus.concurrency.pessimistic.PessimisticConcurrencyManager
contextInfos, DEPENDENCY_GRAPH_BINDING, dg, locks, logger, POLICY_MUTEX, POLICY_RW_FIFO, POLICY_RW_PRIORITY2READERS, POLICY_UNDEFINED, policyStringVal, thinLockAllowed
 
Constructor Summary
DistributedConcurrencyManager()
           
 
Method Summary
 void abort(java.lang.Object ctx)
          This method allows to release the resources allocated in a given context.
 void begin(java.lang.Object ctx)
          This method records the start of an execution context.
 void bindFc(java.lang.String s, java.lang.Object o)
           
 void finalize(java.lang.Object ctx)
          This method marks the end of accesses made by the execution context.
protected  GlobalLock getDistLock(java.lang.Object resourceId, java.lang.Object hints, boolean doInvalidate)
           
 long getTimeout()
           
protected abstract  void invalidateState(java.lang.Object resourceId, java.lang.Object hints)
          Invalidate the reference state of the resource
 boolean isDistGrantable(java.lang.Object resId, byte lck, java.lang.Object hints)
           
 java.lang.String[] listFc()
           
 java.lang.Object lookupFc(java.lang.String s)
           
 java.lang.Object readIntention(java.lang.Object ctx, java.lang.Object resourceId, java.lang.Object hints)
          This method records an access intention to a data object in read mode.
 void setTimeout(long timeout)
           
 void setTimeOut(long timeout)
           
 void unbindFc(java.lang.String s)
           
 void uncacheGlobal(java.lang.Object oid)
           
 java.lang.Object writeIntention(java.lang.Object ctx, java.lang.Object resourceId, java.lang.Object hints)
          This method records an access intention to a data object in write mode.
 
Methods inherited from class org.objectweb.perseus.concurrency.pessimistic.PessimisticConcurrencyManager
closeLock, getContextInfo, getFcState, getLock, getPolicy, getResourceId, getState, getThinkLockAllowed, setPolicy, setThinkLockAllowed, startFc, stopFc, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GLOBAL_LOCK_MANAGER_BINDING

public static final java.lang.String GLOBAL_LOCK_MANAGER_BINDING
See Also:
Constant Field Values
Constructor Detail

DistributedConcurrencyManager

public DistributedConcurrencyManager()
                              throws ConcurrencyException
Method Detail

setTimeOut

public void setTimeOut(long timeout)

listFc

public java.lang.String[] listFc()
Overrides:
listFc in class PessimisticConcurrencyManager

lookupFc

public java.lang.Object lookupFc(java.lang.String s)
                          throws NoSuchInterfaceException
Overrides:
lookupFc in class PessimisticConcurrencyManager
Throws:
NoSuchInterfaceException

bindFc

public void bindFc(java.lang.String s,
                   java.lang.Object o)
            throws IllegalBindingException,
                   NoSuchInterfaceException
Overrides:
bindFc in class PessimisticConcurrencyManager
Throws:
IllegalBindingException
NoSuchInterfaceException

unbindFc

public void unbindFc(java.lang.String s)
              throws NoSuchInterfaceException
Overrides:
unbindFc in class PessimisticConcurrencyManager
Throws:
NoSuchInterfaceException

begin

public void begin(java.lang.Object ctx)
Description copied from interface: ConcurrencyManager
This method records the start of an execution context. It can be a transaction starting.

Specified by:
begin in interface ConcurrencyManager
Overrides:
begin in class PessimisticConcurrencyManager

finalize

public void finalize(java.lang.Object ctx)
Description copied from interface: ConcurrencyManager
This method marks the end of accesses made by the execution context. This method should be called when the validate method has returned true.

Specified by:
finalize in interface ConcurrencyManager
Overrides:
finalize in class PessimisticConcurrencyManager

abort

public void abort(java.lang.Object ctx)
Description copied from interface: ConcurrencyManager
This method allows to release the resources allocated in a given context. This method should be called when the validate method has returned false.

Specified by:
abort in interface ConcurrencyManager
Overrides:
abort in class PessimisticConcurrencyManager

readIntention

public java.lang.Object readIntention(java.lang.Object ctx,
                                      java.lang.Object resourceId,
                                      java.lang.Object hints)
                               throws ConcurrencyException
Description copied from interface: ConcurrencyManager
This method records an access intention to a data object in read mode.

Specified by:
readIntention in interface ConcurrencyManager
Overrides:
readIntention in class PessimisticConcurrencyManager
Throws:
ConcurrencyException

writeIntention

public java.lang.Object writeIntention(java.lang.Object ctx,
                                       java.lang.Object resourceId,
                                       java.lang.Object hints)
                                throws ConcurrencyException
Description copied from interface: ConcurrencyManager
This method records an access intention to a data object in write mode. A call to the readIntention is necessary before a call to this method.

Specified by:
writeIntention in interface ConcurrencyManager
Overrides:
writeIntention in class PessimisticConcurrencyManager
Throws:
ConcurrencyException

uncacheGlobal

public void uncacheGlobal(java.lang.Object oid)

isDistGrantable

public boolean isDistGrantable(java.lang.Object resId,
                               byte lck,
                               java.lang.Object hints)
                        throws ConcurrencyException
Throws:
ConcurrencyException

getTimeout

public long getTimeout()

setTimeout

public void setTimeout(long timeout)

getDistLock

protected GlobalLock getDistLock(java.lang.Object resourceId,
                                 java.lang.Object hints,
                                 boolean doInvalidate)
                          throws ConcurrencyException
Throws:
ConcurrencyException

invalidateState

protected abstract void invalidateState(java.lang.Object resourceId,
                                        java.lang.Object hints)
Invalidate the reference state of the resource

Parameters:
resourceId -
hints -


Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.