java.lang.Object
java.io.OutputStream
de.grogra.util.OutputQueue
de.grogra.util.HierarchicalQueue
de.grogra.persistence.XAQueue
de.grogra.persistence.Transaction
- All Implemented Interfaces:
PersistenceOutput
,Closeable
,DataOutput
,Flushable
,ObjectOutput
,AutoCloseable
- Direct Known Subclasses:
GraphTransaction
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static final class
static interface
static final class
class
Nested classes/interfaces inherited from class de.grogra.util.HierarchicalQueue
HierarchicalQueue.Cursor
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class de.grogra.util.HierarchicalQueue
BEGIN_LEVEL, IS_FINISHED, ITEM_AND_BITS_MASK, ITEM_MASK, MAX_UNUSED_BIT, MIN_UNUSED_BIT, NEXT_EXISTS, out
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
begin
(boolean readOnly) void
void
close()
void
commit()
final void
protected Transaction.Data
abstract Transaction.Reader
void
endApply()
void
void
finishSet
(XAQueue.Reader reader) void
fireSharedObjectModified
(Shareable object) int
final long
getId()
final Transaction.Key
getKey()
final long
boolean
boolean
isActive()
static boolean
protected boolean
boolean
isModified
(Object object, PersistenceField field, int[] indices) static boolean
void
logInsertBoolean
(PersistenceCapable o, PersistenceField field, int[] indices, boolean newValue) void
logInsertByte
(PersistenceCapable o, PersistenceField field, int[] indices, byte newValue) void
logInsertChar
(PersistenceCapable o, PersistenceField field, int[] indices, char newValue) void
logInsertDouble
(PersistenceCapable o, PersistenceField field, int[] indices, double newValue) void
logInsertFloat
(PersistenceCapable o, PersistenceField field, int[] indices, float newValue) void
logInsertInt
(PersistenceCapable o, PersistenceField field, int[] indices, int newValue) void
logInsertLong
(PersistenceCapable o, PersistenceField field, int[] indices, long newValue) void
logInsertObject
(PersistenceCapable o, PersistenceField field, int[] indices, Object newValue) void
logInsertShort
(PersistenceCapable o, PersistenceField field, int[] indices, short newValue) void
void
void
logReadData
(PersistenceCapable o, boolean onRollback) void
logRemoveBoolean
(PersistenceCapable o, PersistenceField field, int[] indices, boolean oldValue) void
logRemoveByte
(PersistenceCapable o, PersistenceField field, int[] indices, byte oldValue) void
logRemoveChar
(PersistenceCapable o, PersistenceField field, int[] indices, char oldValue) void
logRemoveDouble
(PersistenceCapable o, PersistenceField field, int[] indices, double oldValue) void
logRemoveFloat
(PersistenceCapable o, PersistenceField field, int[] indices, float oldValue) void
logRemoveInt
(PersistenceCapable o, PersistenceField field, int[] indices, int oldValue) void
logRemoveLong
(PersistenceCapable o, PersistenceField field, int[] indices, long oldValue) void
logRemoveObject
(PersistenceCapable o, PersistenceField field, int[] indices, Object oldValue) void
logRemoveShort
(PersistenceCapable o, PersistenceField field, int[] indices, short oldValue) void
logSetBoolean
(PersistenceCapable o, PersistenceField field, int[] indices, boolean oldValue, boolean newValue) void
logSetByte
(PersistenceCapable o, PersistenceField field, int[] indices, byte oldValue, byte newValue) void
logSetChar
(PersistenceCapable o, PersistenceField field, int[] indices, char oldValue, char newValue) void
logSetDouble
(PersistenceCapable o, PersistenceField field, int[] indices, double oldValue, double newValue) void
logSetFloat
(PersistenceCapable o, PersistenceField field, int[] indices, float oldValue, float newValue) void
logSetInt
(PersistenceCapable o, PersistenceField field, int[] indices, int oldValue, int newValue) void
logSetLong
(PersistenceCapable o, PersistenceField field, int[] indices, long oldValue, long newValue) void
logSetObject
(PersistenceCapable o, PersistenceField field, int[] indices, Object oldValue, Object newValue) void
logSetShort
(PersistenceCapable o, PersistenceField field, int[] indices, short oldValue, short newValue) void
void
markModified
(Object object, PersistenceField field, int[] indices) void
prepareLogSetBoolean
(PersistenceCapable o, PersistenceField field, int[] indices, boolean oldValue) void
prepareLogSetByte
(PersistenceCapable o, PersistenceField field, int[] indices, byte oldValue) void
prepareLogSetChar
(PersistenceCapable o, PersistenceField field, int[] indices, char oldValue) void
prepareLogSetDouble
(PersistenceCapable o, PersistenceField field, int[] indices, double oldValue) void
prepareLogSetFloat
(PersistenceCapable o, PersistenceField field, int[] indices, float oldValue) void
prepareLogSetInt
(PersistenceCapable o, PersistenceField field, int[] indices, int oldValue) void
prepareLogSetLong
(PersistenceCapable o, PersistenceField field, int[] indices, long oldValue) void
prepareLogSetObject
(PersistenceCapable o, PersistenceField field, int[] indices, Object oldValue) void
prepareLogSetShort
(PersistenceCapable o, PersistenceField field, int[] indices, short oldValue) void
prepareSetBoolean
(PersistenceCapable pc, PersistenceField field, int[] indices) void
prepareSetByte
(PersistenceCapable pc, PersistenceField field, int[] indices) void
prepareSetChar
(PersistenceCapable pc, PersistenceField field, int[] indices) void
prepareSetDouble
(PersistenceCapable pc, PersistenceField field, int[] indices) void
prepareSetFloat
(PersistenceCapable pc, PersistenceField field, int[] indices) void
prepareSetInt
(PersistenceCapable pc, PersistenceField field, int[] indices) void
prepareSetLong
(PersistenceCapable pc, PersistenceField field, int[] indices) void
prepareSetObject
(PersistenceCapable pc, PersistenceField field, int[] indices) void
prepareSetShort
(PersistenceCapable pc, PersistenceField field, int[] indices) void
void
rollback()
final void
protected void
final void
final void
setUserId
(long userId) final void
void
Methods inherited from class de.grogra.persistence.XAQueue
beginArray, beginField, beginFields, beginManaged, clear, endArray, endField, endFields, endManaged, getPersistenceManager, setNested, writeComponentSeparator, writeName, writeNullObject, writeObject, writePersistentObjectReference, writeSharedObjectReference, writeString, writeStringObject
Methods inherited from class de.grogra.util.HierarchicalQueue
beginLevel, beginSkipBlock, cloneData, discardLevel, endLevel, endSkipBlock, getCursor, getData, hasItems, hasItemsInCurrentLevel, moveTo, setItemSize, writeItem, writeObject, writeObjectInStream
Methods inherited from class de.grogra.util.OutputQueue
dump, flush, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeObjectInQueue, writeShort, writeUTF
Methods inherited from class java.io.OutputStream
nullOutputStream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.io.DataOutput
writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
Methods inherited from interface java.io.ObjectOutput
flush, write, write, write
Methods inherited from interface de.grogra.persistence.PersistenceOutput
writeBoolean, writeByte, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeShort
-
Field Details
-
SET_BOOLEAN
public static final int SET_BOOLEAN- See Also:
-
INSERT_BOOLEAN
public static final int INSERT_BOOLEAN- See Also:
-
REMOVE_BOOLEAN
public static final int REMOVE_BOOLEAN- See Also:
-
SET_BYTE
public static final int SET_BYTE- See Also:
-
INSERT_BYTE
public static final int INSERT_BYTE- See Also:
-
REMOVE_BYTE
public static final int REMOVE_BYTE- See Also:
-
SET_SHORT
public static final int SET_SHORT- See Also:
-
INSERT_SHORT
public static final int INSERT_SHORT- See Also:
-
REMOVE_SHORT
public static final int REMOVE_SHORT- See Also:
-
SET_CHAR
public static final int SET_CHAR- See Also:
-
INSERT_CHAR
public static final int INSERT_CHAR- See Also:
-
REMOVE_CHAR
public static final int REMOVE_CHAR- See Also:
-
SET_INT
public static final int SET_INT- See Also:
-
INSERT_INT
public static final int INSERT_INT- See Also:
-
REMOVE_INT
public static final int REMOVE_INT- See Also:
-
SET_LONG
public static final int SET_LONG- See Also:
-
INSERT_LONG
public static final int INSERT_LONG- See Also:
-
REMOVE_LONG
public static final int REMOVE_LONG- See Also:
-
SET_FLOAT
public static final int SET_FLOAT- See Also:
-
INSERT_FLOAT
public static final int INSERT_FLOAT- See Also:
-
REMOVE_FLOAT
public static final int REMOVE_FLOAT- See Also:
-
SET_DOUBLE
public static final int SET_DOUBLE- See Also:
-
INSERT_DOUBLE
public static final int INSERT_DOUBLE- See Also:
-
REMOVE_DOUBLE
public static final int REMOVE_DOUBLE- See Also:
-
SET_OBJECT
public static final int SET_OBJECT- See Also:
-
INSERT_OBJECT
public static final int INSERT_OBJECT- See Also:
-
REMOVE_OBJECT
public static final int REMOVE_OBJECT- See Also:
-
UNDO_TRANSACTION
public static final int UNDO_TRANSACTION- See Also:
-
MAKE_PERSISTENT
public static final int MAKE_PERSISTENT- See Also:
-
MAKE_TRANSIENT
public static final int MAKE_TRANSIENT- See Also:
-
READ_DATA
public static final int READ_DATA- See Also:
-
MIN_UNUSED_ITEM
public static final int MIN_UNUSED_ITEM- See Also:
-
-
Constructor Details
-
Transaction
-
-
Method Details
-
createData
- Overrides:
createData
in classXAQueue
-
isLoggingSuppressed
protected boolean isLoggingSuppressed() -
logSetBoolean
public void logSetBoolean(PersistenceCapable o, PersistenceField field, int[] indices, boolean oldValue, boolean newValue) -
prepareLogSetBoolean
public void prepareLogSetBoolean(PersistenceCapable o, PersistenceField field, int[] indices, boolean oldValue) -
logInsertBoolean
public void logInsertBoolean(PersistenceCapable o, PersistenceField field, int[] indices, boolean newValue) -
logRemoveBoolean
public void logRemoveBoolean(PersistenceCapable o, PersistenceField field, int[] indices, boolean oldValue) -
logSetByte
public void logSetByte(PersistenceCapable o, PersistenceField field, int[] indices, byte oldValue, byte newValue) -
prepareLogSetByte
public void prepareLogSetByte(PersistenceCapable o, PersistenceField field, int[] indices, byte oldValue) -
logInsertByte
public void logInsertByte(PersistenceCapable o, PersistenceField field, int[] indices, byte newValue) -
logRemoveByte
public void logRemoveByte(PersistenceCapable o, PersistenceField field, int[] indices, byte oldValue) -
logSetShort
public void logSetShort(PersistenceCapable o, PersistenceField field, int[] indices, short oldValue, short newValue) -
prepareLogSetShort
public void prepareLogSetShort(PersistenceCapable o, PersistenceField field, int[] indices, short oldValue) -
logInsertShort
public void logInsertShort(PersistenceCapable o, PersistenceField field, int[] indices, short newValue) -
logRemoveShort
public void logRemoveShort(PersistenceCapable o, PersistenceField field, int[] indices, short oldValue) -
logSetChar
public void logSetChar(PersistenceCapable o, PersistenceField field, int[] indices, char oldValue, char newValue) -
prepareLogSetChar
public void prepareLogSetChar(PersistenceCapable o, PersistenceField field, int[] indices, char oldValue) -
logInsertChar
public void logInsertChar(PersistenceCapable o, PersistenceField field, int[] indices, char newValue) -
logRemoveChar
public void logRemoveChar(PersistenceCapable o, PersistenceField field, int[] indices, char oldValue) -
logSetInt
public void logSetInt(PersistenceCapable o, PersistenceField field, int[] indices, int oldValue, int newValue) -
prepareLogSetInt
public void prepareLogSetInt(PersistenceCapable o, PersistenceField field, int[] indices, int oldValue) -
logInsertInt
-
logRemoveInt
-
logSetLong
public void logSetLong(PersistenceCapable o, PersistenceField field, int[] indices, long oldValue, long newValue) -
prepareLogSetLong
public void prepareLogSetLong(PersistenceCapable o, PersistenceField field, int[] indices, long oldValue) -
logInsertLong
public void logInsertLong(PersistenceCapable o, PersistenceField field, int[] indices, long newValue) -
logRemoveLong
public void logRemoveLong(PersistenceCapable o, PersistenceField field, int[] indices, long oldValue) -
logSetFloat
public void logSetFloat(PersistenceCapable o, PersistenceField field, int[] indices, float oldValue, float newValue) -
prepareLogSetFloat
public void prepareLogSetFloat(PersistenceCapable o, PersistenceField field, int[] indices, float oldValue) -
logInsertFloat
public void logInsertFloat(PersistenceCapable o, PersistenceField field, int[] indices, float newValue) -
logRemoveFloat
public void logRemoveFloat(PersistenceCapable o, PersistenceField field, int[] indices, float oldValue) -
logSetDouble
public void logSetDouble(PersistenceCapable o, PersistenceField field, int[] indices, double oldValue, double newValue) -
prepareLogSetDouble
public void prepareLogSetDouble(PersistenceCapable o, PersistenceField field, int[] indices, double oldValue) -
logInsertDouble
public void logInsertDouble(PersistenceCapable o, PersistenceField field, int[] indices, double newValue) -
logRemoveDouble
public void logRemoveDouble(PersistenceCapable o, PersistenceField field, int[] indices, double oldValue) -
logSetObject
public void logSetObject(PersistenceCapable o, PersistenceField field, int[] indices, Object oldValue, Object newValue) -
prepareLogSetObject
public void prepareLogSetObject(PersistenceCapable o, PersistenceField field, int[] indices, Object oldValue) -
logInsertObject
public void logInsertObject(PersistenceCapable o, PersistenceField field, int[] indices, Object newValue) -
logRemoveObject
public void logRemoveObject(PersistenceCapable o, PersistenceField field, int[] indices, Object oldValue) -
logUndo
-
logMakePersistent
-
logMakeTransient
-
logReadData
-
setReadOnly
public final void setReadOnly() -
getUserId
public final long getUserId() -
setUserId
public final void setUserId(long userId) -
createReader
-
setModified
protected void setModified() -
hasModified
public boolean hasModified() -
begin
public void begin(boolean readOnly) -
commit
public void commit() -
rollback
public void rollback() -
commitAll
public final void commitAll() -
rollbackAll
public final void rollbackAll() -
undo
- Throws:
IOException
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceObjectOutput
- Overrides:
close
in classOutputQueue
-
isActive
public boolean isActive() -
getActiveCount
public int getActiveCount() -
getId
public final long getId() -
getKey
-
isApplying
-
isNotApplying
-
beginApply
public void beginApply() -
endApply
public void endApply() -
restore
- Overrides:
restore
in classHierarchicalQueue
-
prepareSetBoolean
-
prepareSetByte
-
prepareSetShort
-
prepareSetChar
-
prepareSetInt
-
prepareSetLong
-
prepareSetFloat
-
prepareSetDouble
-
prepareSetObject
-
finishSet
public void finishSet() -
finishSet
-
makeActive
-
markModified
-
unmarkModified
public void unmarkModified() -
isModified
-