org.objectweb.perseus.concurrency.api
Interface ConcurrencyManager.ResourceProvider
- Enclosing interface:
- ConcurrencyManager
- public static interface ConcurrencyManager.ResourceProvider
This interfaces is the callback used by the concurrency manager to obtain
a resource from its identifier on readIntention or writeIntention calls.
- Author:
- S.Chassande-Barrioz
Method Summary |
java.lang.Object |
getResource(java.lang.Object ws,
java.lang.Object resourceId,
java.lang.Object resourceHints,
java.lang.Object lockHints,
boolean resourceCopyRequired,
java.lang.Object suggestedResource,
java.lang.Object synchronizer)
Retrieves the resource corresponding to an identifier. |
getResource
public java.lang.Object getResource(java.lang.Object ws,
java.lang.Object resourceId,
java.lang.Object resourceHints,
java.lang.Object lockHints,
boolean resourceCopyRequired,
java.lang.Object suggestedResource,
java.lang.Object synchronizer)
throws ConcurrencyException
- Retrieves the resource corresponding to an identifier.
- Parameters:
resourceId
- is the identifier of the expected resource. It must be
non null.resourceHints
- is a hints helping the ResourceProvider to provide
the resource corresponding to the identierlockHints
- is a hint reducing conflict. It can be null.resourceCopyRequired
- indicates if the concurrency policy requires
a new copy of the resource (ex: copy on write)suggestedResource
- is a resource instance suggested by the
concurrency manager it self. Indeed when the concurrency manager has
obtained the right for the resource, maybe the resource has been fetched
too. This parameter can be null if the concurrency manager has no
resource instance to propose.synchronizer
- is a java object to synchronize in order to avoid
concurrent loading between threads.
- Returns:
- a resource or a null value. This value will be returned by the
ConcurrencyManager
- Throws:
ConcurrencyException
- if there is not resource corresponding to
the identifier.
Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.