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
DefaultStateTransferGenerator()
           
 
Method Summary
protected  void delimitStream(ObjectOutputStream out)
          Places a delimiter marker on the stream
protected  void generateNodeDataList(InternalNode<?,?> node, List<NodeData> list)
           
 void generateState(ObjectOutputStream out, Object rootNode, boolean generateTransient, boolean generatePersistent, boolean suppressErrors)
           
 void inject(CacheSPI cache, RPCManager rpcManager, Configuration configuration, TransactionLog txLog)
           
protected  void marshallTransientState(InternalNode 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

public DefaultStateTransferGenerator()
Method Detail

inject

public void inject(CacheSPI cache,
                   RPCManager rpcManager,
                   Configuration configuration,
                   TransactionLog txLog)

generateState

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

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(InternalNode 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(InternalNode<?,?> node,
                                    List<NodeData> list)
                             throws Exception
Throws:
Exception


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