|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.kernel.NullAccessCoordinator
public class NullAccessCoordinator
Define an AccessCoordinatorHandle that does not detect conflicts,
report accesses to the profiling system, or perform any error checking on
its arguments.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.sun.sgs.kernel.AccessReporter |
|---|
AccessReporter.AccessType |
| Constructor Summary | |
|---|---|
NullAccessCoordinator()
Creates an instance of this class. |
|
NullAccessCoordinator(Properties properties,
TransactionProxy txnProxy,
ProfileCollectorHandle profileCollectorHandle)
Creates an instance of this class, accepting the standard arguments for access coordinators, which are ignored. |
|
| Method Summary | ||
|---|---|---|
Transaction |
getConflictingTransaction(Transaction txn)
Find out what transaction, if still active, caused the given transaction to fail due to conflict. |
|
void |
notifyNewTransaction(Transaction txn,
long requestedStartTime,
int tryCount)
Notifies the coordinator that a new transaction is starting. |
|
|
registerAccessSource(String sourceName,
Class<T> objectIdType)
Register as a provider of shared objects, and therefore a possible source of conflict between transactions. |
|
void |
reportObjectAccess(Object objectId,
AccessReporter.AccessType type)
Reports to the coordinator that object access has been requested in the context of the current transaction. |
|
void |
reportObjectAccess(Object objectId,
AccessReporter.AccessType type,
Object description)
Reports to the coordinator that an object access with the provided description has been requested in the context of the current transaction. |
|
void |
reportObjectAccess(Transaction txn,
Object objectId,
AccessReporter.AccessType type)
Reports to the coordinator that object access has been requested in the context of the provided transaction. |
|
void |
reportObjectAccess(Transaction txn,
Object objectId,
AccessReporter.AccessType type,
Object description)
Reports to the coordinator that an object access with the provided description has been requested in the context of the provided transaction. |
|
void |
setObjectDescription(Object objectId,
Object description)
In the current transaction, associates the given object with some description that should have a meaningful toString
method. |
|
void |
setObjectDescription(Transaction txn,
Object objectId,
Object description)
In the provided transaction, associates the given object with some description that should have a meaningful toString
method. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NullAccessCoordinator()
public NullAccessCoordinator(Properties properties,
TransactionProxy txnProxy,
ProfileCollectorHandle profileCollectorHandle)
properties - the configuration propertiestxnProxy - the transaction proxyprofileCollectorHandle - the profile collector handle| Method Detail |
|---|
public <T> AccessReporter<T> registerAccessSource(String sourceName,
Class<T> objectIdType)
DataService which provides access to
ManagedObjects and name bindings). This ensures that
conflict is managed for access to the reported objects, and
that a report of all accesses is available through profiling.
registerAccessSource in interface AccessCoordinatorT - the type of the id object used to report accessessourceName - the name of the source of objects which may
cause conflict on accessobjectIdType - the type of the identifier that will be used
to identify accessed objects
AccessReporter used to notify the system
of access to shared objectspublic Transaction getConflictingTransaction(Transaction txn)
getConflictingTransaction in interface AccessCoordinatortxn - a Transaction that failed due to conflict
Transaction that caused the provided
Transaction to fail due to conflict, or
null if there is no such active Transaction
public void notifyNewTransaction(Transaction txn,
long requestedStartTime,
int tryCount)
notifyNewTransaction in interface AccessCoordinatorHandletxn - the transactionrequestedStartTime - the time in milliseconds that the task
associated with the transaction was originally requested to
starttryCount - the number of times that transactions have been
attempted for the task associated with txn
public void reportObjectAccess(Object objectId,
AccessReporter.AccessType type)
reportObjectAccess in interface AccessReporter<Object>objectId - an identifier for the object being accessedtype - the AccessType being requested
public void reportObjectAccess(Transaction txn,
Object objectId,
AccessReporter.AccessType type)
reportObjectAccess in interface AccessReporter<Object>txn - the transaction in which the provided objId
was accessedobjectId - an identifier for the object being accessedtype - the AccessType being requested
public void reportObjectAccess(Object objectId,
AccessReporter.AccessType type,
Object description)
setObjectDescription for more details about
description.
reportObjectAccess in interface AccessReporter<Object>objectId - an identifier for the object being accessedtype - the AccessType being requesteddescription - an arbitrary object that contains a
description of the object being accessed
public void reportObjectAccess(Transaction txn,
Object objectId,
AccessReporter.AccessType type,
Object description)
setObjectDescription for more details about
description.
reportObjectAccess in interface AccessReporter<Object>txn - the transaction in which the provided objId
was accessedobjectId - an identifier for the object being accessedtype - the AccessType being requesteddescription - an arbitrary object that contains a
description of the object being accessed
public void setObjectDescription(Object objectId,
Object description)
toString
method. This description will be available in the profiling data,
and is useful when displaying details about a given accessed
object. The intent is that an arbitrary description can be
included with an object, but that the description is not
accessed unless a ProfileListener finds it useful to do
so. At that point the description's toString method may
be called, or the object itself might be cast to some known type
to extract more detail about the accessed object.
Note that this may be called before the associated object is
actually accessed, and therefore before reportObjectAccess
is called for the given objId. Use of this method is
optional, and only used to provide additional detail for profiling
and debugging.
If a description has already been set for the identified object,
or if the provided description is null, then no change is
made to the description of the object.
setObjectDescription in interface AccessReporter<Object>objectId - the identifier for the associated objectdescription - an arbitrary Object that contains a
description of the objId being accessed
public void setObjectDescription(Transaction txn,
Object objectId,
Object description)
toString
method. This description will be available in the profiling data,
and is useful when displaying details about a given accessed
object. The intent is that an arbitrary description can be
included with an object, but that the description is not
accessed unless a ProfileListener finds it useful to do
so. At that point the description's toString method may
be called, or the object itself might be cast to some known type
to extract more detail about the accessed object.
Note that this may be called before the associated object is
actually accessed, and therefore before reportObjectAccess
is called for the given objId. Use of this method is
optional, and only used to provide additional detail for profiling
and debugging.
If a description has already been set for the identified object,
or if the provided description is null, then no change is
made to the description of the object.
setObjectDescription in interface AccessReporter<Object>txn - the transaction in which the provided objId
was accessedobjectId - the identifier for the associated objectdescription - an arbitrary Object that contains a
description of the objId being accessed
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||