|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.speedo.mim.lib.AbstractStateImpl
org.objectweb.speedo.genclass.GenClassAccessor
public abstract class GenClassAccessor
This class represents an accessor of a genclass structure. This accessor is used in case of the generic class is persistent.
Field Summary | |
---|---|
java.util.List |
deltaForMerge
|
java.util.List |
elements
The ArrayList used to store the indexed elements of the genclass. |
SpeedoGenClassPO |
gcpo
The PersistentObjectItf attached to this state representation. |
protected org.objectweb.util.monolog.api.Logger |
logger
|
boolean |
supportDelta
Indicates if this accessor support the dela mode |
protected GenClassElement |
tmpelem
A temporary variable which is used to search an element into the "elements" list. |
Fields inherited from class org.objectweb.speedo.mim.lib.AbstractStateImpl |
---|
detachedStatus, hasBeenFlush, isToMerge, jdoStatus, speedoPO |
Constructor Summary | |
---|---|
GenClassAccessor(SpeedoGenClassPO thepo)
|
Method Summary | |
---|---|
abstract void |
attachCopy(POManagerItf pm,
java.util.Map map,
StateItf fieldsClone)
This method is used during the attach operation. |
org.objectweb.jorm.api.PIndexedElem |
createPIndexedElem()
|
abstract org.objectweb.jorm.api.PIndexedElem |
createPIndexedElem(GenClassAccessor gca)
|
abstract void |
deletePersistent(POManagerItf pm)
Deletes persistent all inner elements of the persistent instance. |
abstract void |
detachCopy(POManagerItf pm,
java.util.Map map,
StateItf fieldsClone,
java.util.Collection fgHints)
This method is used during the detach operation. |
org.objectweb.util.monolog.api.Logger |
getLogger()
|
java.lang.Object |
getMemoryInstance()
|
void |
loadFields(POManagerItf pm,
long[] fields)
Askes the loading of the some fields identified by the long array. |
abstract void |
loadFieldsFromAccessor(StateItf sa)
|
abstract void |
makePersistent(POManagerItf pm)
Makes persistent all inner elements of the persistent instance. |
abstract void |
makePersistentOnAttach(POManagerItf pm,
java.util.Map map)
makes persistent on attach, taking into account the map representing the attch context. |
void |
makeToMerge(java.lang.Object thinLock)
Mark the current state with the flag 'toMerge'. |
State |
merge(State oldState)
This action updates the old state with the change (delta) done in the transaction on this state. |
void |
paAdd(org.objectweb.jorm.api.PIndexedElem elem,
java.lang.Object conn)
|
boolean |
paDeltaSupported()
|
int |
paGetNbElem()
|
java.util.Iterator |
paIterator()
|
void |
paSetNbElem(int nbelem)
|
abstract void |
refresh(POManagerItf pm,
java.util.Map map,
java.util.Collection fgHints)
This method is used during the refresh operation. |
abstract void |
retrieve(POManagerItf pm,
java.util.Map map,
java.util.Collection fgHints)
This method is used during the retrieve operation. |
abstract void |
setElements(java.lang.Object o)
|
void |
setFlushed(boolean val)
When the gen class is flushed to the data support (parameter = true), the internal structure is clean: - really remove the deleted element - mark the genclass as supporting the delta |
abstract boolean |
speedoAdd(java.lang.Object elemToAdd,
java.lang.Object hints)
Askes the adding of an element into a generic class. |
abstract boolean |
speedoRemove(java.lang.Object elemToRemove,
java.lang.Object hints)
Askes the removing of an element from a generic class. |
void |
unSwizzle()
|
void |
workingSetClosed()
At the end of the working set, the writing mode is initialized (deltaSupported), and the reference to the persistent are unswilled |
Methods inherited from class org.objectweb.speedo.mim.lib.AbstractStateImpl |
---|
checkVersion, getCacheEntry, getDetachedStatus, getSpeedoPO, getUserKey, getVersion, hasBeenFlush, indexFieldModified, isToMerge, prepareWrite, setCacheEntry, setDetachedStatus, setSpeedoPO, speedoChangeStatus, speedoChangeVersion, speedoGetStatus, speedoSetStatus |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.speedo.mim.api.StateItf |
---|
forceDetachedDirty, restoreDetachedNone |
Field Detail |
---|
public SpeedoGenClassPO gcpo
public boolean supportDelta
protected GenClassElement tmpelem
protected transient org.objectweb.util.monolog.api.Logger logger
public java.util.List elements
public java.util.List deltaForMerge
Constructor Detail |
---|
public GenClassAccessor(SpeedoGenClassPO thepo)
Method Detail |
---|
public abstract void loadFieldsFromAccessor(StateItf sa)
public abstract org.objectweb.jorm.api.PIndexedElem createPIndexedElem(GenClassAccessor gca)
public abstract void setElements(java.lang.Object o)
public org.objectweb.util.monolog.api.Logger getLogger()
public void setFlushed(boolean val)
setFlushed
in interface StateItf
setFlushed
in class AbstractStateImpl
val
- is the boolean which must be assigned.public void workingSetClosed()
workingSetClosed
in interface StateItf
workingSetClosed
in class AbstractStateImpl
public void unSwizzle()
unSwizzle
in interface StateItf
public State merge(State oldState)
StateItf
merge
in interface StateItf
merge
in class AbstractStateImpl
oldState
- is the state which has to be updated
public void makeToMerge(java.lang.Object thinLock)
StateItf
makeToMerge
in interface StateItf
makeToMerge
in class AbstractStateImpl
thinLock
- is an object representing the thin lockpublic void loadFields(POManagerItf pm, long[] fields)
StateItf
loadFields
in interface StateItf
pm
- is the po manager to use to load referencesfields
- is an array of long. Each long is a bit mask indicating
fields to load. As a long is stored over 64 bits, each long of the array
can represent only 64 persistent fields. If the class has 70 persistent
field, the parameter could be a long array size is 2. This parameter
can be null if no field loading is required.public abstract void deletePersistent(POManagerItf pm)
StateItf
deletePersistent
in interface StateItf
pm
- is the po manager for making persistent inner element.public abstract void makePersistent(POManagerItf pm)
StateItf
makePersistent
in interface StateItf
pm
- is the po manager for making persistent inner element.public abstract void makePersistentOnAttach(POManagerItf pm, java.util.Map map)
StateItf
makePersistentOnAttach
in interface StateItf
pm
- is the po manager for making persistent inner element.map
- is the context of the attachment process.public abstract void detachCopy(POManagerItf pm, java.util.Map map, StateItf fieldsClone, java.util.Collection fgHints)
StateItf
detachCopy
in interface StateItf
pm
- is the po manager used during the detach operationmap
- is the map of the detached object. The use of this map permits
to support cycle in the object graph.fieldsClone
- is a clone of the current statefgHints
- represents the fetch plan.public abstract void attachCopy(POManagerItf pm, java.util.Map map, StateItf fieldsClone)
StateItf
attachCopy
in interface StateItf
pm
- is the po manager used during the attach operationmap
- is the map of the atttached object. The use of this map permits
to support cycle in the object graph.fieldsClone
- is the detached state used to update the current statepublic abstract void refresh(POManagerItf pm, java.util.Map map, java.util.Collection fgHints)
StateItf
refresh
in interface StateItf
pm
- is the po manager used during the refresh operationmap
- is the map of the refreshed object. The use of this map permits
to support cycle in the object graph.fgHints
- represents the fetch plan.public abstract void retrieve(POManagerItf pm, java.util.Map map, java.util.Collection fgHints)
StateItf
retrieve
in interface StateItf
pm
- is the po manager used during the retrieve operationmap
- is the map of the retrieved object. The use of this map permits
to support cycle in the object graph.fgHints
- represents the fetch plan.public abstract boolean speedoAdd(java.lang.Object elemToAdd, java.lang.Object hints)
SpeedoGenClassCoherence
speedoAdd
in interface SpeedoGenClassCoherence
elemToAdd
- is the element to addpublic abstract boolean speedoRemove(java.lang.Object elemToRemove, java.lang.Object hints)
SpeedoGenClassCoherence
speedoRemove
in interface SpeedoGenClassCoherence
elemToRemove
- is the element to removepublic org.objectweb.jorm.api.PIndexedElem createPIndexedElem()
createPIndexedElem
in interface org.objectweb.jorm.api.PIndexedElemFactory
public java.lang.Object getMemoryInstance()
getMemoryInstance
in interface org.objectweb.jorm.api.PAccessor
getMemoryInstance
in class AbstractStateImpl
public void paAdd(org.objectweb.jorm.api.PIndexedElem elem, java.lang.Object conn) throws org.objectweb.jorm.api.PExceptionIO
paAdd
in interface org.objectweb.jorm.api.PGenClassAccessor
org.objectweb.jorm.api.PExceptionIO
public int paGetNbElem()
paGetNbElem
in interface org.objectweb.jorm.api.PGenClassAccessor
public java.util.Iterator paIterator()
paIterator
in interface org.objectweb.jorm.api.PGenClassAccessor
public boolean paDeltaSupported()
paDeltaSupported
in interface org.objectweb.jorm.api.PGenClassAccessor
public void paSetNbElem(int nbelem)
paSetNbElem
in interface org.objectweb.jorm.api.PGenClassAccessor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |