ozone core API

org.ozoneDB.core.admin
Class AdminObjectContainer

java.lang.Object
  |
  +--org.ozoneDB.core.AbstractObjectContainer
        |
        +--org.ozoneDB.core.admin.AdminObjectContainer
All Implemented Interfaces:
Lockable, ObjectContainer

public class AdminObjectContainer
extends AbstractObjectContainer

Version:
$Revision: 1.2 $Date: 2002/06/08 00:49:39 $
Author:
SMB

Field Summary
protected  Env env
           
protected  Lock lock
           
protected  java.lang.String name
           
protected  ObjectID objID
           
protected  Permissions permissions
           
protected static long serialVersionUID
           
protected  org.ozoneDB.OzoneCompatible target
           
 
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
AdminObjectContainer()
           
AdminObjectContainer(Env _env, org.ozoneDB.OzoneCompatible _target, 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)
           
 int getGarbageCollectionLevel()
          Returns the garbageCollectionLevel this ObjectContainer has reached due to (not) calling ensureGarbageCollectionLevel(int).
 ObjectID id()
           
 java.lang.Object invokeTarget(Env env, java.lang.String methodName, java.lang.String sig, java.lang.Object[] args)
           
 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)
           
 Permissions permissions()
           
 void pin()
          Pins this ObjectContainer.
 void setName(java.lang.String _name)
           
 void setTarget(org.ozoneDB.OzoneCompatible _target)
           
 org.ozoneDB.OzoneCompatible target()
           
 java.lang.Class targetClass()
           
 void touch()
           
 void unpin()
          Unpins this ObjectContainer.
 void updateLockLevel(Transaction ta)
           
 
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, toString, wait, wait, wait
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
See Also:
Constant Field Values

env

protected Env env

target

protected org.ozoneDB.OzoneCompatible target

objID

protected ObjectID objID

name

protected java.lang.String name

lock

protected Lock lock

permissions

protected Permissions permissions
Constructor Detail

AdminObjectContainer

public AdminObjectContainer()

AdminObjectContainer

public AdminObjectContainer(Env _env,
                            org.ozoneDB.OzoneCompatible _target,
                            ObjectID _objID)
Method Detail

modTime

public long modTime()
Description copied from interface: ObjectContainer
Returns the time when the container was last commited with lock level greater than LEVEL_READ. The value returned by this method should only be compared against return values of this method.


targetClass

public java.lang.Class targetClass()

setTarget

public void setTarget(org.ozoneDB.OzoneCompatible _target)

target

public org.ozoneDB.OzoneCompatible target()

touch

public void touch()

lock

public Lock lock()

updateLockLevel

public void updateLockLevel(Transaction ta)
                     throws java.lang.Exception
java.lang.Exception

permissions

public Permissions permissions()

lockLevel

public int lockLevel(Transaction ta)

invokeTarget

public java.lang.Object invokeTarget(Env env,
                                     java.lang.String methodName,
                                     java.lang.String sig,
                                     java.lang.Object[] args)
                              throws java.lang.Exception
Specified by:
invokeTarget in interface ObjectContainer
Overrides:
invokeTarget in class AbstractObjectContainer
java.lang.Exception

deleteTarget

public void deleteTarget()

nameTarget

public void nameTarget(java.lang.String _name)

allLockers

public DxCollection allLockers()
Description copied from interface: Lockable
Returns a collection of Locker objects that currently lock this Lockable object.


equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface ObjectContainer
Overrides:
equals in class java.lang.Object
Returns:
True if obj and receiver point to the same target object.

id

public ObjectID id()

name

public java.lang.String name()

setName

public void setName(java.lang.String _name)

pin

public void pin()
Pins this ObjectContainer. Every caller of this method must pair this call with a call to unpin(). An ObjectContainer remains in main memory at least as long as it is pinned.


unpin

public void unpin()
Unpins this ObjectContainer. This method must be called exactly once for every call to pin().


isPinned

public boolean isPinned()
Returns wether this ObjectContainer is pinned.


ensureGarbageCollectionLevel

public int ensureGarbageCollectionLevel(int newGarbageCollectionLevel)
Ensures that the garbageCollectionLevel is at least the given currentGarbageCollectionLevel. The return value is meaningful if the supplied newGarbageCollectionLevel is the currentGarbageCollectionLevel

Returns:
<=0 if this object still has to be processed. This is the case if it belongs to the surelyReachable set but not to the processedReachable set > otherwise <0 if this object has been updated =0 if this object has not been updated, it is surelyReachable >0 if this object has not been updated, it is processedReachable

getGarbageCollectionLevel

public int getGarbageCollectionLevel()
Returns the garbageCollectionLevel this ObjectContainer has reached due to (not) calling ensureGarbageCollectionLevel(int).


ozone core API

Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.