de.grogra.persistence
Class XAQueue

java.lang.Object
  extended by java.io.OutputStream
      extended by de.grogra.util.OutputQueue
          extended by de.grogra.util.HierarchicalQueue
              extended by de.grogra.persistence.XAQueue
All Implemented Interfaces:
PersistenceOutput, java.io.Closeable, java.io.DataOutput, java.io.Flushable, java.io.ObjectOutput
Direct Known Subclasses:
ModificationQueue, Transaction

public abstract class XAQueue
extends HierarchicalQueue
implements PersistenceOutput


Nested Class Summary
static class XAQueue.Data
           
 class XAQueue.Reader
           
 
Nested classes/interfaces inherited from class de.grogra.util.HierarchicalQueue
HierarchicalQueue.Cursor
 
Field Summary
protected  BindingsCache cache
           
protected  PersistenceManager manager
           
 
Fields inherited from class de.grogra.util.HierarchicalQueue
BEGIN_LEVEL, IS_FINISHED, ITEM_AND_BITS_MASK, ITEM_MASK, MAX_UNUSED_BIT, MIN_UNUSED_BIT, MIN_UNUSED_ITEM, NEXT_EXISTS, out
 
Constructor Summary
XAQueue(PersistenceManager manager, boolean createBackLinks)
           
 
Method Summary
 void beginArray(int length, Type type)
           
 void beginField(ManageableType.Field field)
           
 void beginFields()
           
 boolean beginManaged(ManageableType type, boolean writeType)
           
 void clear()
           
protected  XAQueue.Data createData()
           
 void endArray()
           
 void endField(ManageableType.Field field)
           
 void endFields()
           
 void endManaged(java.lang.Object object, boolean writeType)
           
 PersistenceManager getPersistenceManager()
           
 void setNested(boolean nested)
           
 void writeComponentSeparator()
           
 void writeName(java.lang.String value)
           
 void writeNullObject()
           
 void writeObject(java.lang.Object object, Type type)
           
 void writePersistentObjectReference(PersistenceCapable o)
           
 void writeSharedObjectReference(Shareable o)
           
 void writeString(java.lang.String value)
           
 void writeStringObject(java.lang.String value)
           
 
Methods inherited from class de.grogra.util.HierarchicalQueue
beginLevel, beginSkipBlock, cloneData, discardLevel, endLevel, endSkipBlock, getCursor, getData, hasItems, hasItemsInCurrentLevel, moveTo, restore, setItemSize, writeItem, writeObject, writeObjectInStream
 
Methods inherited from class de.grogra.util.OutputQueue
close, dump, flush, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeObjectInQueue, writeShort, writeUTF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.grogra.persistence.PersistenceOutput
writeBoolean, writeByte, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeShort
 
Methods inherited from interface java.io.ObjectOutput
close, flush, write, write, write
 
Methods inherited from interface java.io.DataOutput
writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 

Field Detail

cache

protected BindingsCache cache

manager

protected final PersistenceManager manager
Constructor Detail

XAQueue

public XAQueue(PersistenceManager manager,
               boolean createBackLinks)
Method Detail

beginArray

public void beginArray(int length,
                       Type type)
                throws java.io.IOException
Specified by:
beginArray in interface PersistenceOutput
Throws:
java.io.IOException

beginField

public void beginField(ManageableType.Field field)
Specified by:
beginField in interface PersistenceOutput

beginFields

public void beginFields()
Specified by:
beginFields in interface PersistenceOutput

beginManaged

public boolean beginManaged(ManageableType type,
                            boolean writeType)
Specified by:
beginManaged in interface PersistenceOutput

clear

public void clear()
Overrides:
clear in class HierarchicalQueue

createData

protected XAQueue.Data createData()
Overrides:
createData in class HierarchicalQueue

endArray

public void endArray()
Specified by:
endArray in interface PersistenceOutput

endField

public void endField(ManageableType.Field field)
Specified by:
endField in interface PersistenceOutput

endFields

public void endFields()
Specified by:
endFields in interface PersistenceOutput

endManaged

public void endManaged(java.lang.Object object,
                       boolean writeType)
Specified by:
endManaged in interface PersistenceOutput

getPersistenceManager

public final PersistenceManager getPersistenceManager()

setNested

public void setNested(boolean nested)
Specified by:
setNested in interface PersistenceOutput

writeComponentSeparator

public void writeComponentSeparator()

writeName

public void writeName(java.lang.String value)
Specified by:
writeName in interface PersistenceOutput

writeNullObject

public void writeNullObject()
Specified by:
writeNullObject in interface PersistenceOutput

writeObject

public void writeObject(java.lang.Object object,
                        Type type)
                 throws java.io.IOException
Specified by:
writeObject in interface PersistenceOutput
Throws:
java.io.IOException

writePersistentObjectReference

public final void writePersistentObjectReference(PersistenceCapable o)
Specified by:
writePersistentObjectReference in interface PersistenceOutput

writeSharedObjectReference

public final void writeSharedObjectReference(Shareable o)
Specified by:
writeSharedObjectReference in interface PersistenceOutput

writeString

public void writeString(java.lang.String value)
Specified by:
writeString in interface PersistenceOutput

writeStringObject

public void writeStringObject(java.lang.String value)
Specified by:
writeStringObject in interface PersistenceOutput