@NotStorableClass @NoStorableAccess public class DataAccessSession extends AbstractDataAccessSession implements IDASFilePersistenceCallBack, IDataAccessSession
CLOSE_ERROR, filePersistence, logger, mutex, OPEN_ERROR, opened, opening
Modifier and Type | Method and Description |
---|---|
void |
addListener(IFilePersistenceCloseActionListener listener)
add a close action execution end listener
|
EnumFilePersistenceCloseAction |
close(EnumFilePersistenceCloseAction action)
close data access session with a save action
possible save actions EnumFilePersistenceCloseAction.SAVE ask for save modification, can be canceled by not save action by other data access session close. |
EnumFilePersistenceCloseAction |
closeAndWait(EnumFilePersistenceCloseAction action)
as
IDataAccessSession.close(EnumFilePersistenceCloseAction) , but wait for effective
execution of action |
void |
fireActionDone(EnumFilePersistenceCloseAction action)
fire close action done notification
|
void |
open()
open this data access session, not synchronized with other session
|
void |
openSynchronized()
open this data access session, synchronized with other session: will wait
for other session closed ( blocking )
|
void |
removeListener(IFilePersistenceCloseActionListener listener)
remove a close action execution end listener
|
assertClosed, assertOpened, assertPersistenceOpenned, getClassIdentifier, getMutex, getObject, getObject, getObjects, isClosed, isOpened, objectKeySet, removeAllObject, removeObject, setCloserTrace, setEnumState, setObject, setOpenerTrace, storedEnum, storedImmutableEnum, storedImmutableEnum, storedMutableEnum, storedMutableEnum
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getClassIdentifier, getMutex, getObject, getObject, getObjects, isClosed, isOpened, objectKeySet, removeAllObject, removeObject, setEnumState, setObject, storedEnum, storedImmutableEnum, storedImmutableEnum, storedMutableEnum, storedMutableEnum
public void open() throws FilePersistenceException, FilePersistenceClassNotFoundException, FilePersistenceInvalidClassException, FilePersistenceDataCorruptedException, FilePersistenceNotSerializableException
IDataAccessSessionCommon
open
in interface IDataAccessSessionCommon
FilePersistenceException
- failed read root object, session close pending can not reopenFilePersistenceClassNotFoundException
- Class of a serialized object cannot be found.FilePersistenceInvalidClassException
- something is wrong with a class used by serializationFilePersistenceDataCorruptedException
- data is inconsistent.FilePersistenceNotSerializableException
- Some object to be serialized does not follow joafip
persistence rules or does not implement the
java.io.Serializable interface.public void openSynchronized() throws FilePersistenceException, FilePersistenceClassNotFoundException, FilePersistenceInvalidClassException, FilePersistenceDataCorruptedException, FilePersistenceNotSerializableException
IDataAccessSession
openSynchronized
in interface IDataAccessSession
FilePersistenceException
- failed read root object, session close pending can not reopenFilePersistenceClassNotFoundException
- Class of a serialized object cannot be found.FilePersistenceInvalidClassException
- something is wrong with a class used by serializationFilePersistenceDataCorruptedException
- data is inconsistent.FilePersistenceNotSerializableException
- Some object to be serialized does not follow joafip
persistence rules or does not implement the
java.io.Serializable interface.public EnumFilePersistenceCloseAction close(EnumFilePersistenceCloseAction action) throws FilePersistenceException, FilePersistenceInvalidClassException, FilePersistenceNotSerializableException, FilePersistenceClassNotFoundException, FilePersistenceDataCorruptedException, FilePersistenceTooBigForSerializationException
IDataAccessSession
EnumFilePersistenceCloseAction.SAVE
EnumFilePersistenceCloseAction.DO_NOT_SAVE
close
in interface IDataAccessSession
action
- close actionFilePersistenceException
- session not registered as opened session, no file in stable
state, file state restored to stable, file persistence is not
openedFilePersistenceInvalidClassException
- something is wrong with a class used by serializationFilePersistenceNotSerializableException
- Some object to be serialized does not follow joafip
persistence rules or does not implement the
java.io.Serializable interface.FilePersistenceClassNotFoundException
- Class of a serialized object cannot be found.FilePersistenceDataCorruptedException
- data is inconsistentFilePersistenceTooBigForSerializationException
public EnumFilePersistenceCloseAction closeAndWait(EnumFilePersistenceCloseAction action) throws FilePersistenceException, FilePersistenceInvalidClassException, FilePersistenceNotSerializableException, FilePersistenceClassNotFoundException, FilePersistenceDataCorruptedException, FilePersistenceTooBigForSerializationException
IDataAccessSession
IDataAccessSession.close(EnumFilePersistenceCloseAction)
, but wait for effective
execution of actioncloseAndWait
in interface IDataAccessSession
action
- close actionFilePersistenceException
- session not registered as opened session, no file in stable
state, file state restored to stable, file persistence is not
opened, close wait interruptedFilePersistenceInvalidClassException
- something is wrong with a class used by serializationFilePersistenceNotSerializableException
- Some object to be serialized does not follow joafip
persistence rules or does not implement the
java.io.Serializable interface.FilePersistenceClassNotFoundException
- Class of a serialized object cannot be found.FilePersistenceDataCorruptedException
- data is inconsistentFilePersistenceTooBigForSerializationException
public void addListener(IFilePersistenceCloseActionListener listener)
IDataAccessSession
addListener
in interface IDataAccessSession
listener
- close action execution end listenerpublic void removeListener(IFilePersistenceCloseActionListener listener)
IDataAccessSession
removeListener
in interface IDataAccessSession
listener
- close action execution end listenerpublic void fireActionDone(EnumFilePersistenceCloseAction action)
IDASFilePersistenceCallBack
fireActionDone
in interface IDASFilePersistenceCallBack
action
- the action executedCopyright © 2007-2012 Luc Peuvrier. All Rights Reserved.