|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.app.profile.ProfileDataManager
public class ProfileDataManager
This implementation of DataManager simply calls its
backing manager for each manager method.
| Constructor Summary | |
|---|---|
ProfileDataManager(DataManager backingManager)
Creates an instance of ProfileDataManager. |
|
| Method Summary | ||
|---|---|---|
|
createReference(T object)
Creates a managed reference to an object, storing the object in the data manager if it is transient. |
|
ManagedObject |
getBinding(String name)
Obtains the object bound to a name. |
|
ManagedObject |
getBindingForUpdate(String name)
Obtains the object bound to a name, and notifies the system that the object is going to be modified. |
|
BigInteger |
getObjectId(Object object)
Returns a unique identifier for the object, storing the object in the data manager if it is transient. |
|
void |
markForUpdate(Object object)
Notifies the system that an object is going to be modified, doing nothing if the object is transient. |
|
String |
nextBoundName(String name)
Returns the next name after the specified name that has a binding, or null if there are no more bound names. |
|
void |
removeBinding(String name)
Removes the binding for a name. |
|
void |
removeObject(Object object)
Removes an object from the DataManager, if the object is persistent. |
|
void |
setBinding(String name,
Object object)
Binds an object to a name, replacing any previous binding, and storing the object in the data manager if it is transient. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProfileDataManager(DataManager backingManager)
ProfileDataManager.
backingManager - the DataManager to call through to| Method Detail |
|---|
public ManagedObject getBinding(String name)
markForUpdate or ManagedReference.getForUpdate before modifying the returned object or
any of the non-managed objects it refers to.
getBinding in interface DataManagername - the name
markForUpdate,
ManagedReference.getForUpdate,
getBindingForUpdatepublic ManagedObject getBindingForUpdate(String name)
getBindingForUpdate in interface DataManagername - the name
public void setBinding(String name,
Object object)
ManagedObject, and both the object and any objects it refers to must
implement Serializable. Note that this method will throw IllegalArgumentException if object does not implement
Serializable, but is not guaranteed to check that all
referred to objects implement Serializable. Any instances
of ManagedObject that object refers to directly, or
indirectly through non-managed objects, need to be referred to through
instances of ManagedReference.
setBinding in interface DataManagername - the nameobject - the objectpublic void removeBinding(String name)
removeObject method.
removeBinding in interface DataManagername - the nameremoveObjectpublic String nextBoundName(String name)
null if there are no more bound names. If
name is null, then the search starts at the
beginning.
The order of the names corresponds to the ordering of the UTF-8 encoding
of the names. To provide flexibility to the implementation, the UTF-8
encoding used can be either standard UTF-8, as defined by the
IETF in RFC 3629, or
modified UTF-8, as used by serialization and defined by the
DataInput interface.
nextBoundName in interface DataManagername - the name to search after, or null to start at
the beginning
name, or
null if there are no more bound namespublic void removeObject(Object object)
DataManager, if the object is persistent. The system will make an effort to
flag subsequent references to the removed object through getBinding or ManagedReference by throwing ObjectNotFoundException, although this behavior is not guaranteed.
If object implements ManagedObjectRemoval, even if it is
transient, then this method first calls the
ManagedObjectRemoval.removingObject method on the object, to notify it
that it is being removed. If the call to removingObject throws
a RuntimeException, then this method will throw that exception
without removing the object. A call to removingObject that
causes removeObject to be called recursively on the same object
will result in an IllegalStateException being thrown.
removeObject in interface DataManagerobject - the objectManagedObjectRemovalpublic void markForUpdate(Object object)
markForUpdate in interface DataManagerobject - the objectManagedReference.getForUpdatepublic <T> ManagedReference<T> createReference(T object)
createReference in interface DataManagerT - the type of the objectobject - the object
public BigInteger getObjectId(Object object)
ManagedReference.getId on a
managed reference associated with the object produced by createReference.
getObjectId in interface DataManagerobject - the object
|
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 | |||||||||