org.ozoneDB.core.storage.magicStore
Class MagicCluster
java.lang.Object
org.ozoneDB.core.storage.AbstractCluster
org.ozoneDB.core.storage.wizardStore.WizardCluster
org.ozoneDB.core.wizardStore.Cluster
org.ozoneDB.core.storage.magicStore.MagicCluster
- All Implemented Interfaces:
- Cluster, java.io.Externalizable, java.io.Serializable
- public final class MagicCluster
- extends Cluster
- implements java.io.Externalizable
- Version:
- $Revision: 1.2 $Date: 2004/01/10 21:40:24 $
We need to extend Cluster in wizardStore to be compatible with wizardStore
note: if be abandon compatibility it should extend AbstractCluster
- Author:
- SMB, Medium.net, Leo Mekenkamp, Per Nyfelt
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
serialVersionUID
protected static final long serialVersionUID
- See Also:
- Constant Field Values
subSerialVersionUID
protected static final byte subSerialVersionUID
- See Also:
- Constant Field Values
lock
protected transient MROWLock lock
lastTouched
protected transient long lastTouched
bytesPerContainer
protected transient int bytesPerContainer
modTime
protected long modTime
MagicCluster
public MagicCluster()
- Constructor to be used for Externalizable object serialisation.
MagicCluster
public MagicCluster(ClusterID _clusterID,
Permissions _permissions,
MROWLock lock,
int _bpc)
addedTo
public void addedTo(Cache addedTo,
java.lang.Object key)
removedFrom
public void removedFrom(Cache removedFrom,
java.lang.Object key)
delete
public void delete()
throws java.lang.Exception
- Description copied from class:
WizardCluster
- Delete this cluster from the disk.
- Specified by:
delete
in interface Cluster
- Overrides:
delete
in class WizardCluster
- Throws:
java.lang.Exception
unregister
protected void unregister()
finalize
protected void finalize()
modTime
public long modTime()
- Specified by:
modTime
in interface Cluster
- Overrides:
modTime
in class WizardCluster
cachePriority
public DxLong cachePriority()
- Priority of this cluster to stay in the cluster cache. Low return value
means low priority.
- Specified by:
cachePriority
in interface Cluster
- Overrides:
cachePriority
in class WizardCluster
- Returns:
- Cache priority of the cluster.
setCurrentSize
public void setCurrentSize(int byteSize)
- Specified by:
setCurrentSize
in interface Cluster
- Overrides:
setCurrentSize
in class WizardCluster
size
public int size()
- Specified by:
size
in interface Cluster
- Overrides:
size
in class WizardCluster
clusterID
public ClusterID clusterID()
- Specified by:
clusterID
in interface Cluster
- Overrides:
clusterID
in class AbstractCluster
isInvoked
public boolean isInvoked()
- Overrides:
isInvoked
in class WizardCluster
- Returns:
- True if at least one container is currently invoked.
touch
public void touch()
- Specified by:
touch
in interface Cluster
- Overrides:
touch
in class WizardCluster
updateLockLevel
public void updateLockLevel(Transaction ta)
throws java.io.IOException
- Note: This method must not be synchronized.
- Specified by:
updateLockLevel
in interface Cluster
- Overrides:
updateLockLevel
in class WizardCluster
- Parameters:
ta
-
- Throws:
java.io.IOException
prepareCommit
public void prepareCommit(Transaction ta)
- Specified by:
prepareCommit
in interface Cluster
- Overrides:
prepareCommit
in class WizardCluster
commit
public void commit(Transaction ta)
throws java.io.IOException
- Specified by:
commit
in interface Cluster
- Overrides:
commit
in class WizardCluster
- Throws:
java.io.IOException
abort
public void abort(Transaction ta)
throws java.io.IOException
- Specified by:
abort
in interface Cluster
- Overrides:
abort
in class WizardCluster
- Throws:
java.io.IOException
allLockers
public DxCollection allLockers()
- Specified by:
allLockers
in interface Cluster
- Overrides:
allLockers
in class WizardCluster
toString
public java.lang.String toString()
- Overrides:
toString
in class WizardCluster
lock
public Lock lock()
- Specified by:
lock
in interface Cluster
- Overrides:
lock
in class WizardCluster
setLock
public void setLock(Lock to)
- Specified by:
setLock
in interface Cluster
- Overrides:
setLock
in class WizardCluster
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
writeExternal
in interface java.io.Externalizable
- Overrides:
writeExternal
in class WizardCluster
- Throws:
java.io.IOException
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.io.ObjectStreamException,
java.lang.ClassNotFoundException
- Specified by:
readExternal
in interface java.io.Externalizable
- Overrides:
readExternal
in class WizardCluster
- Throws:
java.io.IOException
java.io.ObjectStreamException
java.lang.ClassNotFoundException
Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.