|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.arjuna.ats.arjuna.objectstore.ObjectStoreImple
This is the base class from which all object store types are derived. Note that because object store instances are stateless, to improve efficiency we try to only create one instance of each type per process. Therefore, the create and destroy methods are used instead of new and delete. If an object store is accessed via create it *must* be deleted using destroy. Of course it is still possible to make use of new directly.
Field Summary | |
protected int |
shareStatus
|
Constructor Summary | |
protected |
ObjectStoreImple()
|
protected |
ObjectStoreImple(int ss)
|
protected |
ObjectStoreImple(ObjectName objName)
|
Method Summary | |
abstract boolean |
allObjUids(java.lang.String s,
InputObjectState buff,
int m)
Obtain all of the Uids for a specified type. |
abstract boolean |
allTypes(InputObjectState buff)
Obtain all types of objects stored in the object store. |
ClassName |
className()
|
abstract boolean |
commit_state(Uid u,
java.lang.String tn)
Commit the object's state in the object store. |
abstract int |
currentState(Uid u,
java.lang.String tn)
|
boolean |
fullCommitNeeded()
Does this store need to do the full write_uncommitted/commit protocol? |
abstract java.lang.String |
getStoreName()
|
abstract boolean |
hide_state(Uid u,
java.lang.String tn)
Hide the object's state in the object store. |
void |
initialise(Uid u,
java.lang.String tn)
Initialise the object store. |
boolean |
isType(Uid u,
java.lang.String tn,
int st)
Is the current state of the object the same as that provided as the last parameter? |
java.lang.String |
locateStore(java.lang.String localOSRoot)
|
static ClassName |
name()
|
void |
pack(OutputBuffer buff)
Pack up the object store state. |
abstract InputObjectState |
read_committed(Uid u,
java.lang.String tn)
Read the object's committed state. |
abstract InputObjectState |
read_uncommitted(Uid u,
java.lang.String tn)
Read the object's shadowed state. |
abstract boolean |
remove_committed(Uid u,
java.lang.String tn)
Remove the object's committed state. |
abstract boolean |
remove_uncommitted(Uid u,
java.lang.String tn)
Remove the object's uncommitted state. |
abstract boolean |
reveal_state(Uid u,
java.lang.String tn)
Reveal a hidden object's state. |
protected java.lang.String |
revealedId(java.lang.String name)
Given a type id which is possibly hidden (e.g., has a ! at the end), make it a valid Uid so we can return it. |
int |
shareState()
|
java.lang.String |
storeDir()
|
java.lang.String |
storeRoot()
|
protected abstract boolean |
supressEntry(java.lang.String name)
Suppress directories of the specified type from allTypes etc? |
void |
sync()
Some object store implementations may be running with automatic sync disabled. |
abstract int |
typeIs()
The type of the object store. |
void |
unpack(InputBuffer buff)
Unpack an object store. |
abstract boolean |
write_committed(Uid u,
java.lang.String tn,
OutputObjectState buff)
Write a new copy of the object's committed state. |
abstract boolean |
write_uncommitted(Uid u,
java.lang.String tn,
OutputObjectState buff)
Write a copy of the object's uncommitted state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int shareStatus
Constructor Detail |
protected ObjectStoreImple()
protected ObjectStoreImple(int ss)
protected ObjectStoreImple(ObjectName objName)
Method Detail |
public abstract int typeIs()
RecordType
public abstract boolean allObjUids(java.lang.String s, InputObjectState buff, int m) throws ObjectStoreException
true
if no errors occurred, false
otherwise.
ObjectStoreException
public abstract boolean allTypes(InputObjectState buff) throws ObjectStoreException
true
if no errors occurred, false
otherwise.
ObjectStoreException
public abstract int currentState(Uid u, java.lang.String tn) throws ObjectStoreException
ObjectStoreException
public abstract java.lang.String getStoreName()
public abstract boolean commit_state(Uid u, java.lang.String tn) throws ObjectStoreException
true
if no errors occurred, false
otherwise.
ObjectStoreException
public abstract boolean hide_state(Uid u, java.lang.String tn) throws ObjectStoreException
true
if no errors occurred, false
otherwise.
ObjectStoreException
public abstract boolean reveal_state(Uid u, java.lang.String tn) throws ObjectStoreException
true
if no errors occurred, false
otherwise.
ObjectStoreException
public abstract InputObjectState read_committed(Uid u, java.lang.String tn) throws ObjectStoreException
ObjectStoreException
public abstract InputObjectState read_uncommitted(Uid u, java.lang.String tn) throws ObjectStoreException
ObjectStoreException
public abstract boolean remove_committed(Uid u, java.lang.String tn) throws ObjectStoreException
true
if no errors occurred, false
otherwise.
ObjectStoreException
public abstract boolean remove_uncommitted(Uid u, java.lang.String tn) throws ObjectStoreException
true
if no errors occurred, false
otherwise.
ObjectStoreException
public abstract boolean write_committed(Uid u, java.lang.String tn, OutputObjectState buff) throws ObjectStoreException
true
if no errors occurred, false
otherwise.
ObjectStoreException
public abstract boolean write_uncommitted(Uid u, java.lang.String tn, OutputObjectState buff) throws ObjectStoreException
true
if no errors occurred, false
otherwise.
ObjectStoreException
public void sync() throws java.io.SyncFailedException, ObjectStoreException
java.io.SyncFailedException
ObjectStoreException
public java.lang.String locateStore(java.lang.String localOSRoot) throws ObjectStoreException
ObjectStoreException
public boolean fullCommitNeeded()
true
if full commit is needed, false
otherwise.public boolean isType(Uid u, java.lang.String tn, int st) throws ObjectStoreException
true
if the current state is as expected,
false
otherwise.
ObjectStoreException
public void initialise(Uid u, java.lang.String tn)
public void pack(OutputBuffer buff) throws java.io.IOException
java.io.IOException
public void unpack(InputBuffer buff) throws java.io.IOException
java.io.IOException
public ClassName className()
public final int shareState()
public final java.lang.String storeDir()
public final java.lang.String storeRoot()
public static ClassName name()
protected abstract boolean supressEntry(java.lang.String name)
protected java.lang.String revealedId(java.lang.String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |