public final class ObjectServices extends java.lang.Object
Object services
Provides access to object level services. A transaction is required access this class.
| Modifier and Type | Method and Description |
|---|---|
static boolean |
createdInTransaction(java.lang.Object object)
Determine if object was created in
the current transaction.
|
static boolean |
deletedInTransaction(java.lang.Object object)
Determine if object was deleted in
the current transaction.
|
static void |
flush(java.lang.Object object)
Flush an object from shared memory
|
static boolean |
flushObject(InOutParameter<java.lang.Object> object)
Deprecated.
This method is deprecated, please use
ObjectServices.flush().
|
static boolean |
modifiedInTransaction(java.lang.Object object)
Determine if object was modified in
the current transaction.
|
static java.lang.String |
objectToString(java.lang.Object object)
Stringify an object reference
|
static void |
runObjectNotifier(ObjectNotifier objectNotifier)
Run an object notifier
|
static java.lang.Object |
stringToObject(java.lang.String refStr)
Convert a stringified object reference
to an Object
|
public static final boolean createdInTransaction(java.lang.Object object)
Determine if object was created in the current transaction.
object - Object to checkExceptionInvalidHandle - Invalid object
handle
This operation can be used to determine if the specified object was created in the current transaction.
public static final boolean deletedInTransaction(java.lang.Object object)
Determine if object was deleted in the current transaction.
object - Object to checkExceptionInvalidHandle - Invalid object
handle
This operation can be used to determine if the specified object was deleted in the current transaction.
Warnings:
If an instance has been deleted in a transaction, any attempt to cast the instance to a subtype will return an empty handle.
public static final boolean modifiedInTransaction(java.lang.Object object)
Determine if object was modified in the current transaction.
object - Object to checkExceptionInvalidHandle - Invalid object
handle
This operation can be used to determine if the specified object was modified in the current transaction.
public static final void flush(java.lang.Object object)
Flush an object from shared memory
object - Object to flush
Flush the specified object from shared memory, leaving only its index values so that it may later be found either by key or object reference and automatically be refreshed.
If the object was created in the same transaction, or if modifications were made to the object in the same transaction, they will be written to the backing store before the object is flushed.
DataError - The flush will fail and a DataError exception will be thrown if the object is not a DataGrid type, or is not a local copy of a distributed non-replicated type.
@Deprecated public static final boolean flushObject(InOutParameter<java.lang.Object> object)
Flush an object from shared memory
object - Object to flushpublic static final java.lang.String objectToString(java.lang.Object object)
Stringify an object reference
object - Object to get reference forGet a stringified object reference for the specified object.
If the object is invalid, an empty string is returned to the caller.
public static final java.lang.Object stringToObject(java.lang.String refStr)
Convert a stringified object reference to an Object
refStr - Object reference stringConvert a stringified object reference to an object.
If the string reference is invalid an empty object is returned to the caller.
public static final void runObjectNotifier(ObjectNotifier objectNotifier)
Run an object notifier
When called, the inTransaction method in the ObjectNotifier is called for each locked object in the current transaction.