org.jboss.cache.statetransfer
Class DefaultStateTransferGenerator

java.lang.Object
  extended by org.jboss.cache.statetransfer.DefaultStateTransferGenerator
All Implemented Interfaces:
StateTransferGenerator

public class DefaultStateTransferGenerator
extends Object
implements StateTransferGenerator


Field Summary
static short STATE_TRANSFER_VERSION
           
 
Constructor Summary
protected DefaultStateTransferGenerator(CacheSPI cache)
           
 
Method Summary
protected  void delimitStream(ObjectOutputStream out)
          Places a delimiter marker on the stream
protected  void generateNodeDataList(NodeSPI<?,?> node, List<NodeData> list)
           
 void generateState(ObjectOutputStream out, Node rootNode, boolean generateTransient, boolean generatePersistent, boolean suppressErrors)
           
protected  void marshallAssociatedState(Fqn fqn, ObjectOutputStream baos)
          Does nothing in this base class; can be overridden in a subclass.
protected  void marshallTransientState(NodeSPI node, ObjectOutputStream out)
          Do a preorder traversal: visit the node first, then the node's children
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE_TRANSFER_VERSION

public static final short STATE_TRANSFER_VERSION
Constructor Detail

DefaultStateTransferGenerator

protected DefaultStateTransferGenerator(CacheSPI cache)
Method Detail

generateState

public void generateState(ObjectOutputStream out,
                          Node rootNode,
                          boolean generateTransient,
                          boolean generatePersistent,
                          boolean suppressErrors)
                   throws Throwable
Specified by:
generateState in interface StateTransferGenerator
Throws:
Throwable

delimitStream

protected void delimitStream(ObjectOutputStream out)
                      throws Exception
Places a delimiter marker on the stream

Parameters:
out - stream
Throws:
IOException - if there are errs
Exception

marshallTransientState

protected void marshallTransientState(NodeSPI node,
                                      ObjectOutputStream out)
                               throws Exception
Do a preorder traversal: visit the node first, then the node's children

Parameters:
out -
Throws:
Exception

generateNodeDataList

protected void generateNodeDataList(NodeSPI<?,?> node,
                                    List<NodeData> list)
                             throws Exception
Throws:
Exception

marshallAssociatedState

protected void marshallAssociatedState(Fqn fqn,
                                       ObjectOutputStream baos)
                                throws Exception
Does nothing in this base class; can be overridden in a subclass.

Throws:
Exception


Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.