|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.electrocodeogram.cpc.core.api.hub.event.CPCEvent org.electrocodeogram.cpc.core.api.hub.event.CloneEvent org.electrocodeogram.cpc.core.api.hub.event.ClonePersistenceEvent
public class ClonePersistenceEvent
This event is generated by the IStoreProvider
whenever the clone data is
persisted to stable storage.
Typically this happens whenever the user saves a file.
This event is also generated, if the clone data for a file is purged.
The CloneEvent.getCloneFile()
value will be NULL if all clone data was purged.
IMPORTANT: This event is generated from within an exclusive write lock block inside of
the IStoreProvider
. A receiver is not allowed to make any calls
to the store provider for the duration of the event dispatching.
Furthermore, as an exclusive lock is held, all receivers are urged to return as fast as possible.
Care should be taken to ensure that a receiver does not inadvertently trigger events which might
lead to not absolutely necessary work being done during the lifetime of this event (and therefore
the exclusive write lock).
IStoreProvider.persistData(ICloneFile)
,
IStoreProvider.purgeData(ICloneFile, boolean)
Constructor Summary | |
---|---|
ClonePersistenceEvent(ICloneFile cloneFile)
Creates a new ClonePersistenceEvent for the given file. |
Method Summary | |
---|---|
java.util.List<IClone> |
getClones()
Retrieves a list with the new persisted clone data for this file. |
void |
setClones(java.util.List<IClone> clones)
Sets the list of persisted clones. |
java.lang.String |
toString()
Every event should implement a sensible toString method for use in debugging log messages. |
Methods inherited from class org.electrocodeogram.cpc.core.api.hub.event.CloneEvent |
---|
getCloneFile, subToString |
Methods inherited from class org.electrocodeogram.cpc.core.api.hub.event.CPCEvent |
---|
checkSeal, clone, compareTo, getCreationTime, isValid, seal |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ClonePersistenceEvent(ICloneFile cloneFile)
ClonePersistenceEvent
for the given file.
cloneFile
- the file for which clone data was persisted, never null.Method Detail |
---|
public java.util.List<IClone> getClones()
IMPORTANT: the IClone
instances may not me modified in any way.
IClone
instances for this file, never null.public void setClones(java.util.List<IClone> clones)
NOTE: For performance reasons IClone
instances do not need to be cloned
or sealed for use in this event. Receivers of this event are not allowed to modify the
instances in any way.
clones
- a list with the latest versions of all IClone
instances for this file, never null.public java.lang.String toString()
CPCEvent
toString
in class CPCEvent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |