org.objectweb.perseus.concurrency.api
Interface ConcurrencyManager
- DistributedConcurrencyManager, OptimisticConcurrencyManager, PessimisticConcurrencyManager
public interface ConcurrencyManager
This is the interface for Concurrency Control service.
- Luciano Garcia-Banuelos (Luciano.Garcia@imag.fr)
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 | finalize(Object ctx) - This method marks the end of accesses made by the execution context.
|
Object | readIntention(Object ctx, Object resourceId, Object hints) - This method records an access intention to a data object in read mode.
|
boolean | validate(Object ctx) - This method requests the validation os accesses made by the context.
|
Object | writeIntention(Object ctx, Object resourceId, Object hints) - This method records an access intention to a data object in write mode.
|
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.
begin
public void begin(Object ctx)
This method records the start of an execution context. It can be a
transaction starting.
ctx
- is the context
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.
readIntention
public Object readIntention(Object ctx,
Object resourceId,
Object hints)
throws ConcurrencyException
This method records an access intention to a data object in read mode.
ctx
- is an identifier of the execution context. It can be a
transaction handle.resourceId
- is the resource identifierhints
- is an object parameter permiting to some implementation to
do some action at "readIntention time".
- null or an object depending on the ConcurrencyManager type
ConcurrencyException
- if the no resource are available for
this resource identifer or if there is a concurrency problem. In this
last case that means the context should be cancelled.
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.
writeIntention
public Object writeIntention(Object ctx,
Object resourceId,
Object hints)
throws ConcurrencyException
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.
ctx
- is an identifier of the execution context. It can be a
transaction handle.resourceId
- is the resource identifierhints
- is an object parameter permiting to some implementation to
do some action at "readIntention time".
- null or an object depending on the ConcurrencyManager type
ConcurrencyException
- if the no resource are available for
this resource identifer or if there is a concurrency problem. In this
last case that means the context should be cancelled.
Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.