com.sleepycat.je.dbi
Class NodeSequence

java.lang.Object
  extended by com.sleepycat.je.dbi.NodeSequence

public class NodeSequence
extends Object

NodeSequence encapsulates the generation and maintenance of a sequence for generating node IDs and transient LSNs.


Field Summary
 EnvironmentImpl envImpl
           
static int FIRST_LOCAL_NODE_ID
           
static int FIRST_REPLICATED_NODE_ID
           
 
Constructor Summary
NodeSequence(EnvironmentImpl envImpl)
           
 
Method Summary
 long getLastLocalNodeId()
          The last allocated local and replicated node IDs are used for ckpts.
 long getLastReplicatedNodeId()
           
 long getNextLocalNodeId()
          We get a new node ID of the appropriate kind when creating a new node.
 long getNextTransientLsn()
          Assign the next available transient LSN.
(package private)  void initRealNodeId()
          Initialize the counters in these methods rather than a constructor so we can control the initialization more precisely.
 void setLastNodeId(long lastReplicatedNodeId, long lastLocalNodeId)
          Initialize the node IDs, from recovery.
 void updateFromReplay(long replayNodeId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIRST_LOCAL_NODE_ID

public static final int FIRST_LOCAL_NODE_ID
See Also:
Constant Field Values

FIRST_REPLICATED_NODE_ID

public static final int FIRST_REPLICATED_NODE_ID
See Also:
Constant Field Values

envImpl

public final EnvironmentImpl envImpl
Constructor Detail

NodeSequence

public NodeSequence(EnvironmentImpl envImpl)
Method Detail

initRealNodeId

void initRealNodeId()
Initialize the counters in these methods rather than a constructor so we can control the initialization more precisely.


getLastLocalNodeId

public long getLastLocalNodeId()
The last allocated local and replicated node IDs are used for ckpts.


getLastReplicatedNodeId

public long getLastReplicatedNodeId()

getNextLocalNodeId

public long getNextLocalNodeId()
We get a new node ID of the appropriate kind when creating a new node.


setLastNodeId

public void setLastNodeId(long lastReplicatedNodeId,
                          long lastLocalNodeId)
Initialize the node IDs, from recovery.


updateFromReplay

public void updateFromReplay(long replayNodeId)

getNextTransientLsn

public long getNextTransientLsn()
Assign the next available transient LSN.



Copyright (c) 2004-2012 Oracle. All rights reserved.