org.apache.zookeeper.server.upgrade
Class UpgradeSnapShotV1

java.lang.Object
  extended by org.apache.zookeeper.server.upgrade.UpgradeSnapShotV1
All Implemented Interfaces:
UpgradeSnapShot

public class UpgradeSnapShotV1
extends java.lang.Object
implements UpgradeSnapShot

This class gets the old snapshot and the old dataDir and creates an brand new snapshot that is then converted to the new snapshot for upgrading.


Constructor Summary
UpgradeSnapShotV1(java.io.File dataDir, java.io.File snapShotDir)
          upgrade from version 1 to version 2
 
Method Summary
 DataTree getNewDataTree()
           
 java.util.concurrent.ConcurrentHashMap<java.lang.Long,java.lang.Integer> getSessionWithTimeOuts()
           
 long playLog(org.apache.jute.InputArchive logStream)
          play the log from this logstream into the datatree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpgradeSnapShotV1

public UpgradeSnapShotV1(java.io.File dataDir,
                         java.io.File snapShotDir)
upgrade from version 1 to version 2

Parameters:
dataDir -
snapShotDir -
Method Detail

playLog

public long playLog(org.apache.jute.InputArchive logStream)
             throws java.io.IOException
play the log from this logstream into the datatree

Parameters:
logStream -
Returns:
Throws:
java.io.IOException

getNewDataTree

public DataTree getNewDataTree()
                        throws java.io.IOException
Specified by:
getNewDataTree in interface UpgradeSnapShot
Throws:
java.io.IOException

getSessionWithTimeOuts

public java.util.concurrent.ConcurrentHashMap<java.lang.Long,java.lang.Integer> getSessionWithTimeOuts()
Specified by:
getSessionWithTimeOuts in interface UpgradeSnapShot


Copyright © 2010 The Apache Software Foundation