org.jboss.cache.statetransfer
Class LegacyStateTransferManager

java.lang.Object
  extended by org.jboss.cache.statetransfer.DefaultStateTransferManager
      extended by org.jboss.cache.statetransfer.LegacyStateTransferManager
All Implemented Interfaces:
StateTransferManager

Deprecated.

@Deprecated
public class LegacyStateTransferManager
extends DefaultStateTransferManager

This is to support legacy locking schemes such as Pessimistic and Optimistic locking.

Since:
3.0
Author:
Manik Surtani (manik AT jboss DOT org)

Field Summary
protected  LockManager lockManager
          Deprecated.  
 
Fields inherited from class org.jboss.cache.statetransfer.DefaultStateTransferManager
cache, configuration, generator, integrator, log, marshaller, PARTIAL_STATE_DELIMITER, regionManager, stateRetrievalTimeout, STREAMING_DELIMITER_NODE, trace
 
Constructor Summary
LegacyStateTransferManager()
          Deprecated.  
 
Method Summary
protected  void acquireLocksForStateTransfer(NodeSPI root, long timeout, boolean force)
          Deprecated.  
 void checkLoaders()
          Deprecated.  
 void getState(ObjectOutputStream out, Fqn fqn, long timeout, boolean force, boolean suppressErrors)
          Deprecated. Writes the state for the portion of the tree named by fqn to the provided OutputStream.
 void injectLockManager(LockManager lockManager)
          Deprecated.  
protected  void releaseStateTransferLocks(NodeSPI root)
          Deprecated.  
protected  void setState(ObjectInputStream state, NodeSPI targetRoot)
          Deprecated. Set the portion of the cache rooted in targetRoot to match the given state.
 
Methods inherited from class org.jboss.cache.statetransfer.DefaultStateTransferManager
injectDependencies, setState, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lockManager

protected LockManager lockManager
Deprecated. 
Constructor Detail

LegacyStateTransferManager

public LegacyStateTransferManager()
Deprecated. 
Method Detail

injectLockManager

public void injectLockManager(LockManager lockManager)
Deprecated. 

checkLoaders

public void checkLoaders()
Deprecated. 

getState

public void getState(ObjectOutputStream out,
                     Fqn fqn,
                     long timeout,
                     boolean force,
                     boolean suppressErrors)
              throws Exception
Deprecated. 
Description copied from interface: StateTransferManager
Writes the state for the portion of the tree named by fqn to the provided OutputStream.

Specified by:
getState in interface StateTransferManager
Overrides:
getState in class DefaultStateTransferManager
Parameters:
out - stream to write state to
fqn - Fqn indicating the uppermost node in the portion of the tree whose state should be returned.
timeout - max number of millis this method should wait to acquire any locks, if necessary, on the nodes being transferred
force - if locks are needed and cannot be acquired after timeout millis, should the lock acquisition be forced, and any existing transactions holding locks on the nodes be rolled back?
suppressErrors - if true, all exceptions are logged but not propagated.
Throws:
Exception - in event of error

setState

protected void setState(ObjectInputStream state,
                        NodeSPI targetRoot)
                 throws Exception
Deprecated. 
Set the portion of the cache rooted in targetRoot to match the given state. Updates the contents of targetRoot to reflect those in new_state.

NOTE: This method performs no locking of nodes; it is up to the caller to lock targetRoot before calling this method.

Overrides:
setState in class DefaultStateTransferManager
Parameters:
state - a serialized byte[][] array where element 0 is the transient state (or null) , and element 1 is the persistent state (or null)
targetRoot - node into which the state should be integrated
Throws:
Exception

acquireLocksForStateTransfer

protected void acquireLocksForStateTransfer(NodeSPI root,
                                            long timeout,
                                            boolean force)
                                     throws InterruptedException
Deprecated. 
Throws:
InterruptedException

releaseStateTransferLocks

protected void releaseStateTransferLocks(NodeSPI root)
Deprecated. 


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