|
ozone core API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.ozoneDB.core.AbstractObjectContainer | +--org.ozoneDB.core.wizardStore.WizardObjectContainer
The "Wizard" implementation of the ObjectContainer interface. Much of the lock functionality is implemented in the Cluster class. Note: only the join/commit/abort methods are synchronized. All other methods are guaranteed to run exclusively through the explicite locks
Field Summary | |
protected Cluster |
cluster
|
protected int |
garbageCollectionLevel
The garbage collection level of this ObjectContainer. |
protected int |
invokeCount
|
protected long |
modTime
|
protected java.lang.String |
name
|
protected ObjectID |
objID
|
protected static long |
serialVersionUID
|
protected static byte |
subSerialVersionUID
|
protected org.ozoneDB.OzoneCompatible |
target
The currently commited target object of the container. |
Fields inherited from class org.ozoneDB.core.AbstractObjectContainer |
state |
Fields inherited from interface org.ozoneDB.core.ObjectContainer |
IMPLNAME_POSTFIX, PROXYNAME_POSTFIX, STATE_CLEAN, STATE_CREATED, STATE_DELETED, STATE_MODIFIED, STATE_READ |
Constructor Summary | |
WizardObjectContainer()
Constructor for object serialization via Externalizable. |
|
WizardObjectContainer(ObjectID _objID)
|
Method Summary | |
DxCollection |
allLockers()
Returns a collection of Locker objects that currently lock this Lockable object. |
void |
deleteTarget()
|
int |
ensureGarbageCollectionLevel(int newGarbageCollectionLevel)
Ensures that the garbageCollectionLevel is at least the given currentGarbageCollectionLevel. |
boolean |
equals(java.lang.Object obj)
|
Cluster |
getCluster()
|
int |
getGarbageCollectionLevel()
Returns the garbageCollectionLevel this ObjectContainer has reached due to (not) calling ensureGarbageCollectionLevel(int) . |
boolean |
hasSameClusterAs(WizardObjectContainer container)
|
ObjectID |
id()
|
java.lang.Object |
invokeTarget(Env env,
java.lang.String methodName,
java.lang.String sig,
java.lang.Object[] args)
|
protected boolean |
isCreated()
|
protected boolean |
isDeleted()
|
boolean |
isInvoked()
|
boolean |
isPinned()
Returns wether this ObjectContainer is pinned. |
Lock |
lock()
|
int |
lockLevel(Transaction ta)
|
long |
modTime()
Returns the time when the container was last commited with lock level greater than LEVEL_READ . |
java.lang.String |
name()
|
void |
nameTarget(java.lang.String _name)
|
void |
notifyAllTAs(Transaction ta)
|
Permissions |
permissions()
|
void |
pin()
Pins this ObjectContainer. |
void |
readExternal(java.io.ObjectInput in)
|
protected void |
setCluster(Cluster cluster)
|
void |
setName(java.lang.String _name)
|
void |
setTarget(org.ozoneDB.OzoneCompatible _target)
|
org.ozoneDB.OzoneCompatible |
target()
|
java.lang.Class |
targetClass()
Returns the Class for the target object. |
java.lang.String |
toString()
|
void |
touch()
|
void |
unpin()
Unpins this ObjectContainer. |
void |
updateLockLevel(Transaction ta)
|
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class org.ozoneDB.core.AbstractObjectContainer |
clearState, constructorFor, createTarget, database, flushMethodCache, invokeTarget, methodFor, ozoneProxy, raiseState, state, targetClone |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final long serialVersionUID
protected static final byte subSerialVersionUID
protected Cluster cluster
protected org.ozoneDB.OzoneCompatible target
protected ObjectID objID
protected java.lang.String name
protected transient int invokeCount
protected long modTime
protected int garbageCollectionLevel
Constructor Detail |
public WizardObjectContainer()
public WizardObjectContainer(ObjectID _objID)
Method Detail |
protected void setCluster(Cluster cluster)
public Cluster getCluster()
public long modTime()
ObjectContainer
LEVEL_READ
. The value returned by this method should
only be compared against return values of this method.
modTime
in interface ObjectContainer
protected boolean isDeleted()
protected boolean isCreated()
public java.lang.Class targetClass()
targetClass
in interface ObjectContainer
public void setTarget(org.ozoneDB.OzoneCompatible _target)
setTarget
in interface ObjectContainer
public org.ozoneDB.OzoneCompatible target()
target
in interface ObjectContainer
public void touch()
touch
in interface ObjectContainer
public Lock lock()
lock
in interface ObjectContainer
public void updateLockLevel(Transaction ta) throws java.lang.Exception
java.lang.Exception
public void notifyAllTAs(Transaction ta)
public Permissions permissions()
permissions
in interface ObjectContainer
public int lockLevel(Transaction ta)
public boolean isInvoked()
public java.lang.Object invokeTarget(Env env, java.lang.String methodName, java.lang.String sig, java.lang.Object[] args) throws java.lang.Exception
invokeTarget
in interface ObjectContainer
invokeTarget
in class AbstractObjectContainer
java.lang.Exception
public void deleteTarget()
deleteTarget
in interface ObjectContainer
public void nameTarget(java.lang.String _name)
nameTarget
in interface ObjectContainer
public DxCollection allLockers()
Lockable
allLockers
in interface Lockable
public boolean equals(java.lang.Object obj)
equals
in interface ObjectContainer
equals
in class java.lang.Object
public ObjectID id()
id
in interface ObjectContainer
public java.lang.String name()
name
in interface ObjectContainer
public void setName(java.lang.String _name)
setName
in interface ObjectContainer
public final void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public final void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public int ensureGarbageCollectionLevel(int newGarbageCollectionLevel)
ensureGarbageCollectionLevel
in interface ObjectContainer
public int getGarbageCollectionLevel()
ensureGarbageCollectionLevel(int)
.
getGarbageCollectionLevel
in interface ObjectContainer
public void pin()
unpin()
.
An ObjectContainer remains in main memory at least as long as it is pinned.
pin
in interface ObjectContainer
public void unpin()
pin()
.
unpin
in interface ObjectContainer
public boolean isPinned()
isPinned
in interface ObjectContainer
public boolean hasSameClusterAs(WizardObjectContainer container)
public java.lang.String toString()
toString
in class java.lang.Object
|
ozone core API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |