org.objectweb.perseus.concurrency.optimistic
Class OptimisticConcurrencyManager
java.lang.Object
org.objectweb.perseus.concurrency.optimistic.OptimisticConcurrencyManager
- BindingController, ConcurrencyManager
public abstract class OptimisticConcurrencyManager
extends java.lang.Object
- E. Bruneton
void | abort(Object ctx) - This method allows to release the resources allocated in a given context.
|
void | begin(Object ctx) - This method records the start of an execution context.
|
void | bindFc(String s, Object o)
|
void | finalize(Object ctx) - This method marks the end of accesses made by the execution context.
|
protected Object | getState(Object ctx, Object resourceId, TimeStamp timeStamp, Object hints, boolean isDirtyBefore, boolean isWrite)
|
String[] | listFc()
|
Object | lookupFc(String s)
|
Object | readIntention(Object ctx, Object resourceId, Object hints)
|
void | unbindFc(String s)
|
boolean | validate(Object ctx) - This method requests the validation os accesses made by the context.
|
Object | writeIntention(Object ctx, Object resourceId, Object hints)
|
DEPENDENCY_GRAPH_BINDING
public static final String DEPENDENCY_GRAPH_BINDING
logger
protected Logger logger
timeStamps
protected Map timeStamps
A map associating time stamps to all oids in all active contexts.
OptimisticConcurrencyManager
public OptimisticConcurrencyManager()
abort
public void abort(Object ctx)
This method allows to release the resources allocated in a given context.
This method should be called when the validate method has returned false.
- abort in interface ConcurrencyManager
begin
public void begin(Object ctx)
This method records the start of an execution context. It can be a
transaction starting.
- begin in interface ConcurrencyManager
ctx
- is the context
bindFc
public void bindFc(String s,
Object o)
finalize
public void finalize(Object ctx)
This method marks the end of accesses made by the execution context. This
method should be called when the validate method has returned true.
- finalize in interface ConcurrencyManager
getState
protected Object getState(Object ctx,
Object resourceId,
TimeStamp timeStamp,
Object hints,
boolean isDirtyBefore,
boolean isWrite)
throws ConcurrencyException
ctx
- is the context using the resourceresourceId
- is the resource identifiertimeStamp
- is the TimeStamp instance matching the resourcehints
- uses to give information on accessisDirtyBefore
- indicates if the object was already dirty before
the access.isWrite
- indicates if the access is a write access
- the resource state to use
ConcurrencyException
- it is not possible to create a State for
this resource identifier. One reason can the unavailibity of the
resource.
listFc
public String[] listFc()
lookupFc
public Object lookupFc(String s)
unbindFc
public void unbindFc(String s)
validate
public boolean validate(Object ctx)
This method requests the validation os accesses made by the context. It
retrieves a boolean value to indicate if the accesses are validate or
not.
- validate in interface ConcurrencyManager
Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.