Package org.apache.openjpa.slice
Class SliceInfo
- java.lang.Object
-
- org.apache.openjpa.slice.SliceInfo
-
- All Implemented Interfaces:
java.io.Serializable
public class SliceInfo extends java.lang.Object implements java.io.Serializable
Holder of slice names where a persistent instance is stored. This structure is held in StateManagers to track the origin of a persistent instance.- Author:
- Pinaki Poddar
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SliceInfo(boolean replicated, java.lang.String[] slices)
Generic constructor given one or more slice names.SliceInfo(boolean replicated, java.util.List<java.lang.String> slices)
Generic constructor given one or more slice names.SliceInfo(java.lang.String slice)
Constructor for non-replicated instance that is stored in a single slice.SliceInfo(java.lang.String[] slices)
Constructor for replicated instance that is stored in one or more slices.SliceInfo(java.util.List<java.lang.String> slices)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
getSlices()
Gets the name of the slice(s) held by this receiver.boolean
isReplicated()
Affirms if this receiver designates replicated instances.SliceInfo
setInto(OpenJPAStateManager sm)
Sets this receiver as the given StateManager's internal instance-level data.
-
-
-
Constructor Detail
-
SliceInfo
public SliceInfo(boolean replicated, java.lang.String[] slices)
Generic constructor given one or more slice names. The replicated flag is set independently.
-
SliceInfo
public SliceInfo(boolean replicated, java.util.List<java.lang.String> slices)
Generic constructor given one or more slice names. The replicated flag is set independently.
-
SliceInfo
public SliceInfo(java.lang.String slice)
Constructor for non-replicated instance that is stored in a single slice.
-
SliceInfo
public SliceInfo(java.lang.String[] slices)
Constructor for replicated instance that is stored in one or more slices.
-
SliceInfo
public SliceInfo(java.util.List<java.lang.String> slices)
-
-
Method Detail
-
isReplicated
public boolean isReplicated()
Affirms if this receiver designates replicated instances.
-
getSlices
public java.lang.String[] getSlices()
Gets the name of the slice(s) held by this receiver.
-
setInto
public SliceInfo setInto(OpenJPAStateManager sm)
Sets this receiver as the given StateManager's internal instance-level data. If the given StateManager had existing instance-level data that is not a SliceInfo then raise an exception.
-
-