|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.odi.Placement
com.odi.Cluster
PSE/PSE Pro uses the Cluster class to represent a cluster in a segment. Every cluster has a number that is unique in the segment. PSE/PSE Pro assigns this number and uses it as a Cluster ID, which identifies the cluster.
When you are using PSE or PSE Pro, a segment can have only one cluster.
Field Summary |
Fields inherited from interface com.odi.ObjectStoreConstants |
ALL_EXECUTE, ALL_READ, ALL_WRITE, DEFAULT, DISABLE_AUTO_OPEN, GROUP_EXECUTE, GROUP_READ, GROUP_WRITE, INSTALL_SCHEMA_BATCH, INSTALL_SCHEMA_INCREMENTAL, MULTI_DB_MVCC, MVCC, OBJECTSTORE, OTHER_EXECUTE, OTHER_READ, OTHER_WRITE, OWNER_EXECUTE, OWNER_READ, OWNER_WRITE, PSE, PSE_PRO, READONLY, READONLY_NON_BLOCKING, RETAIN_HOLLOW, RETAIN_READONLY, RETAIN_STALE, RETAIN_TRANSIENT, RETAIN_UPDATE, UPDATE, UPDATE_NON_BLOCKING, WAIT_FOREVER, XA_TRANSACTION |
Method Summary | |
abstract void |
acquireLock(int lockType,
int timeoutMillis)
Attempts to acquire a lock on a cluster |
abstract void |
destroy()
Destroys a cluster (not available in PSE or PSE Pro) |
abstract int |
getClusterId()
Obtains the Cluster ID of a cluster. |
abstract Iterator |
getObjects()
Returns an iterator over the objects in the cluster. |
abstract Iterator |
getObjects(Class ofType)
Returns an iterator over the objects that can be converted to the specified type in the cluster. |
abstract Segment |
getSegment()
Obtains the Segment object associated with the segment that contains the cluster. |
abstract long |
getSizeInBytes()
Obtains the number of bytes of storage occupied by the cluster. |
abstract boolean |
isDestroyed()
Determines whether or not the cluster has been destroyed. |
static Cluster |
of(Object object)
Obtains the cluster that contains the object. |
Methods inherited from class com.odi.Placement |
getCluster, getDatabase, getSession |
Method Detail |
public abstract void destroy()
ClusterException
- If the application is using PSE or PSE Pro.
public abstract boolean isDestroyed()
DatabaseNotOpenException
- If the database is not open.
NoTransactionInProgressException
- If there is no
transaction in progress.
ObjectStoreException
- If the session implied by the cluster
has been terminated or if the current thread is associated with a
session other than the session implied by the cluster.public abstract int getClusterId()
public abstract Segment getSegment()
getSegment
in class Placement
DatabaseNotOpenException
- If the database is not open.
ObjectStoreException
- If the session implied by the cluster
has been terminated or if the current thread is associated with a
session other than the session implied by the cluster.public abstract long getSizeInBytes()
DatabaseNotOpenException
- If the database is not open.
NoTransactionInProgressException
- If there is no
transaction in progress.
ObjectStoreException
- If the session implied by the cluster
has been terminated or if the current thread is associated with a
session other than the session implied by the cluster.
ClusterNotFoundException
- If the cluster is not found.public static Cluster of(Object object)
object
- A persistent object in the cluster you want
to obtain.
IllegalArgumentException
- If the object argument is null.
NoTransactionInProgressException
- If there is no
transaction in progress.
ObjectException
- If the object is stale.
ObjectNotPersistentException
- If the object is not
persistent.
ObjectStoreException
- If the session implied by the cluster
has been terminated or if the current thread is associated with a
session other than the session implied by the cluster.
ClusterNotFoundException
- If the cluster is not found.public abstract Iterator getObjects()
DatabaseNotOpenException
- If the database is not open.
NoTransactionInProgressException
- If a transaction is not in
progress.
ObjectStoreException
- If the session implied by the cluster
has been terminated or if the current thread is associated with a
session other than the session implied by the cluster.
ClusterNotFoundException
- If the cluster is not found.public abstract Iterator getObjects(Class ofType)
The class type argument can be any class type, interface type, or array type. Because primitive types are stored using wrapper types, the type argument should not be a primitive type. For array types, the objects in the iteration are all arrays of the element type (or types that can be converted to this type) regardless of the dimension of the array.
DatabaseNotOpenException
- If the database is not open.
NoTransactionInProgressException
- If a transaction is not in
progress.
ObjectStoreException
- If the session implied by the cluster
has been terminated or if the current thread is associated with a
session other than the session implied by the cluster.
ClusterNotFoundException
- If the cluster is not found.
IllegalArgumentException
- If ofType is null.public abstract void acquireLock(int lockType, int timeoutMillis)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |