com.sleepycat.je.rep.impl.node
Class NameIdPair

java.lang.Object
  extended by com.sleepycat.je.rep.impl.node.NameIdPair

public class NameIdPair
extends Object

The public name and internal id pair used to uniquely identify a node within a replication group.


Field Summary
static NameIdPair NOCHECK
           
static int NOCHECK_NODE_ID
           
static NameIdPair NULL
           
static int NULL_NODE_ID
           
 
Constructor Summary
NameIdPair(String name)
          Constructor for a pair where the node id is as yet unknown.
NameIdPair(String name, int id)
           
 
Method Summary
static NameIdPair deserialize(ByteBuffer buffer)
           
static NameIdPair deserialize(TupleInput buffer)
           
 boolean equals(Object obj)
           
 int getId()
          Returns the internally generated compact id.
 String getName()
          Returns the application assigned name
 int hashCode()
           
 boolean hasNullId()
           
 void revertToNull()
           
 void serialize(ByteBuffer buffer)
           
 void serialize(TupleOutput buffer)
           
 void setId(int id)
           
 String toString()
           
 void update(NameIdPair other)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_NODE_ID

public static final int NULL_NODE_ID
See Also:
Constant Field Values

NOCHECK_NODE_ID

public static final int NOCHECK_NODE_ID
See Also:
Constant Field Values

NULL

public static final NameIdPair NULL

NOCHECK

public static final NameIdPair NOCHECK
Constructor Detail

NameIdPair

public NameIdPair(String name,
                  int id)

NameIdPair

public NameIdPair(String name)
Constructor for a pair where the node id is as yet unknown.

Method Detail

deserialize

public static NameIdPair deserialize(ByteBuffer buffer)

deserialize

public static NameIdPair deserialize(TupleInput buffer)

serialize

public void serialize(ByteBuffer buffer)

serialize

public void serialize(TupleOutput buffer)

getName

public String getName()
Returns the application assigned name


toString

public String toString()
Overrides:
toString in class Object

getId

public int getId()
Returns the internally generated compact id.


hasNullId

public boolean hasNullId()

setId

public void setId(int id)

revertToNull

public void revertToNull()

update

public void update(NameIdPair other)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


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