|
ozone core API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ozoneDB.core.ServerComponent
org.ozoneDB.core.storage.classicStore.ClassicStore
ClassicStore acts as the mediator (director) of the classicStore module especially for ClusterSpace, ObjectSpace, PersistentSpace. Currently it serves only as container for the references but this should change in the future to decouple class implementations.
Field Summary | |
protected Env |
env
|
protected ObjectSpace |
objectSpace
|
Fields inherited from class org.ozoneDB.core.ServerComponent |
|
Constructor Summary | |
ClassicStore(Env env)
|
Method Summary | |
void |
abortTransaction(Transaction ta)
|
DxBag |
clusterOfID(ObjectID id)
Force the Store to make a guess which objects are used together with the container with the specified id. |
void |
commitTransaction(Transaction ta)
|
ObjectContainer |
containerForID(Transaction ta,
ObjectID id)
|
ObjectContainer |
containerForName(Transaction ta,
java.lang.String name)
|
Transaction |
createTransaction(Env env,
User user)
Factory method for creating a new Transaction . |
void |
init(Env _env)
Aid constructor, because a store is instantiated with 'newInstance', where we've got no arguments. |
void |
nameContainer(Transaction ta,
ObjectContainer container,
java.lang.String name)
|
ObjectContainer |
newContainerAndLock(Transaction ta,
org.ozoneDB.OzoneCompatible target,
ObjectID objID,
Permissions permissions,
int lockLevel)
Creates a new object container and initializes it with the specified target object. |
java.lang.Object |
newTransactionData()
|
DxIterator |
objectIDIterator()
|
DxSet |
objectNames(Transaction ta)
|
void |
prepareCommitTransaction(Transaction ta)
Prepare the specified transaction for commit. |
void |
reportNamedObjectsToGarbageCollector()
Tells this StoreManager to report every named object to the garbage collector. |
void |
save()
Save the internal state in the state to the server state properties. |
void |
shutdown()
|
void |
startup()
Start up and load the internal state from the server state properties. |
void |
updateLockLevel(Transaction ta,
ObjectContainer container)
Update lock level of the given container according to the level of the containers lock object. |
void |
upgradeLockLevel(Transaction ta,
ObjectContainer container,
int lockLevel)
|
Methods inherited from class org.ozoneDB.core.ServerComponent |
clearChanged, hasChanged, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Env env
protected ObjectSpace objectSpace
Constructor Detail |
public ClassicStore(Env env)
Method Detail |
public void init(Env _env)
StoreManager
init
in interface StoreManager
public void save() throws java.lang.Exception
ServerComponent
save
in class ServerComponent
java.lang.Exception
public void startup() throws java.lang.Exception
ServerComponent
startup
in interface StoreManager
startup
in class ServerComponent
java.lang.Exception
public void shutdown() throws java.lang.Exception
shutdown
in interface StoreManager
shutdown
in class ServerComponent
java.lang.Exception
public ObjectContainer newContainerAndLock(Transaction ta, org.ozoneDB.OzoneCompatible target, ObjectID objID, Permissions permissions, int lockLevel) throws java.lang.Exception
newContainerAndLock
in interface StoreManager
ta
- target
- objID
- permissions
- lockLevel
-
java.lang.Exception
public java.lang.Object newTransactionData()
public void updateLockLevel(Transaction ta, ObjectContainer container) throws java.io.IOException
updateLockLevel
in interface StoreManager
java.io.IOException
public DxSet objectNames(Transaction ta)
objectNames
in interface StoreManager
ta
- the running transaction
public ObjectContainer containerForID(Transaction ta, ObjectID id) throws org.ozoneDB.ObjectNotFoundException, java.io.IOException, java.lang.ClassNotFoundException
containerForID
in interface StoreManager
org.ozoneDB.ObjectNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public ObjectContainer containerForName(Transaction ta, java.lang.String name) throws java.lang.Exception
containerForName
in interface StoreManager
name
- The object name to search for.ta
-
java.lang.Exception
public DxBag clusterOfID(ObjectID id) throws java.lang.Exception
clusterOfID
in interface StoreManager
id
- The ObjectID if the container.
java.lang.Exception
public DxIterator objectIDIterator()
objectIDIterator
in interface StoreManager
public void reportNamedObjectsToGarbageCollector()
reportNamedObjectsToGarbageCollector
in interface StoreManager
public void nameContainer(Transaction ta, ObjectContainer container, java.lang.String name) throws org.ozoneDB.PermissionDeniedException
nameContainer
in interface StoreManager
ta
- container
- name
-
org.ozoneDB.PermissionDeniedException
public Transaction createTransaction(Env env, User user)
StoreManager
Transaction
.
createTransaction
in interface StoreManager
public void prepareCommitTransaction(Transaction ta)
StoreManager
The TransactionManager
let this method run exclusivly. However,
StoreManager.prepareCommitTransaction(org.ozoneDB.core.Transaction)
and StoreManager.commitTransaction(org.ozoneDB.core.Transaction)
are not
an atomar operation.
prepareCommitTransaction
in interface StoreManager
ta
- Transaction that will be commited.public void commitTransaction(Transaction ta)
commitTransaction
in interface StoreManager
public void abortTransaction(Transaction ta)
abortTransaction
in interface StoreManager
ta
- ID of the comitting transaction.public void upgradeLockLevel(Transaction ta, ObjectContainer container, int lockLevel) throws java.lang.Exception
java.lang.Exception
|
ozone core API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |