public abstract class RRElement extends Object implements IRRElement
| Constructor and Description |
|---|
RRElement() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(boolean deleteDetails) |
void |
delete(boolean deleteDetails,
RRContext.WritePolicy policy) |
boolean |
exists()
Checks if an
RRElement exists using the default RRContext.ReadPolicy. |
boolean |
exists(RRContext.ReadPolicy policy) |
boolean |
load(boolean loadDetails)
Loads an
IRRElement using the default RRContext.ReadPolicy. |
boolean |
load(boolean loadDetails,
RRContext.ReadPolicy policy)
Loads an
IRRElement using a specific RRContext.ReadPolicy |
void |
store(boolean storeDetails)
Stores an
IRRElement using the default RRContext.WritePolicy. |
void |
store(boolean storeDetails,
RRContext.WritePolicy policy) |
public boolean exists()
throws ResourceRegistryException
RRElement exists using the default RRContext.ReadPolicy.
The read policy used is selected as follows:exists in interface IRRElementResourceRegistryExceptionpublic boolean exists(RRContext.ReadPolicy policy) throws ResourceRegistryException
exists in interface IRRElementResourceRegistryExceptionpublic boolean load(boolean loadDetails)
throws ResourceRegistryException
IRRElement using the default RRContext.ReadPolicy.
The read policy used is selected as follows:
1.The item is retrieved from the local datastore if RRContext.ReadPolicy.REFRESH_AHEAD is available.
2.If RRContext.ReadPolicy.READ_THROUGH is available, an attempt to load the item from the local datastore is made first
by using RRContext.ReadPolicy.READ_LOCAL.
If the latter fails, the item is retrieved from the remote datastore using RRContext.ReadPolicy.READ_THROUGHload in interface IRRElementloadDetails - true if the entire object graph should be loaded, false otherwiseResourceRegistryException - An error has occurredpublic boolean load(boolean loadDetails,
RRContext.ReadPolicy policy)
throws ResourceRegistryException
IRRElement using a specific RRContext.ReadPolicyload in interface IRRElementloadDetails - true if the entire object graph should be loaded, false otherwisepolicy - the RRContext.ReadPolicy to be usedResourceRegistryException - An error has occurredpublic void store(boolean storeDetails)
throws ResourceRegistryException
IRRElement using the default RRContext.WritePolicy.
The write policy used is selected as follows:
1.If RRContext.WritePolicy.WRITE_BEHIND is available, the object is stored to the local datastore.
2.If RRContext.WritePolicy.WRITE_THROUGH is available, the object is stored directly to the remote datastore, through the
local datastore.
Note that this method does not provide the option to use the local datastore explicitly as a cache instead of the remote one.
If such kind of optimization ismstore in interface IRRElementstoreDetails - true if the entire object graph should be stored, false otherwiseResourceRegistryException - if no RRContext.WritePolicy could be foundpublic void store(boolean storeDetails,
RRContext.WritePolicy policy)
throws ResourceRegistryException
store in interface IRRElementResourceRegistryExceptionpublic void delete(boolean deleteDetails)
throws ResourceRegistryException
delete in interface IRRElementResourceRegistryExceptionpublic void delete(boolean deleteDetails,
RRContext.WritePolicy policy)
throws ResourceRegistryException
delete in interface IRRElementResourceRegistryExceptionCopyright © 2014. All Rights Reserved.