|
Objectivity for Java Reference | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines constants that indicate the reason an object is being clustered, as well as behavior shared by all cluster reasons.
A clustering reason indicates why an object is being clustered. A clustering reason is used as a parameter to the requestCluster method of a clustering strategy or the requestCluster method of a session; another parameter to the method specifies the requesting object, that is, the object requesting that another object be clustered.
You should implement this interface in a class you define if you ever make direct calls to a requestCluster method. You should pass an object of your class as the reason parameter in every direct call to requestCluster.
When you implement this interface, the getReason method of your class should always return the constant APPLICATION to indicate an application-specific reason for clustering the object. If objects of your class will be used with an application-specific clustering strategy, your class may include whatever additional fields and methods are needed by the clustering strategy. (The default clustering strategy ignores the clustering reason.) For additional information about clustering strategies, see Implicit Clustering.
You can define as many clustering reason classes as your application needs.
Constant Types | |
Clustering reasons Specify why an object is being made persistent. |
APPLICATION BIND COLLECTION NAMEOBJ REFERENCE RELATIONSHIP |
Field Summary | |
static int |
APPLICATION
Cluster reason: An object is being made persistent for some application-specific reason, that is, by a direct call to requestCluster. |
static int |
BIND
Cluster reason: An object is being made persistent because it was given a root name in the roots dictionary of the requesting object. |
static int |
COLLECTION
Cluster reason: An object is being made persistent because it was added to a persistent collection (the requesting object). |
static int |
NAMEOBJ
Cluster reason: An object is being made persistent because it was given a scope name in the scope of the requesting object. |
static int |
REFERENCE
Cluster reason: An object is being made persistent because the requesting object references it in a persistent field and the requesting object is being written to the database. |
static int |
RELATIONSHIP
Cluster reason: An object is being made persistent because the requesting object has formed a relationship with it. |
Method Summary | |
int |
getReason()
Gets the reason for making an object persistent. |
Field Detail |
public static final int APPLICATION
public static final int REFERENCE
public static final int BIND
public static final int RELATIONSHIP
public static final int NAMEOBJ
public static final int COLLECTION
Method Detail |
public int getReason()
|
Objectivity for Java Reference | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2000 Objectivity, Inc. All rights reserved.