jgroup.relacs.types
Class ViewId

java.lang.Object
  extended by jgroup.relacs.types.ViewId

public final class ViewId
extends java.lang.Object

The ViewId class wraps a value of the relacs daemon type "group id" in an object. A group id uniquely identifies groups. An object of type ViewId contains a single field whose type is long.

Since:
Jgroup 1.2
Author:
Alberto Montresor

Field Summary
static int SIZE
          Size of this object in bytes (when marshalled)
 
Constructor Summary
ViewId(long value)
          Creates a ViewId object containing the specified value.
 
Method Summary
static long create(EndPoint host, int counter)
          Returns a new complete view identifier obtained from the host identifier and a sequence number.
static long createPartial(long cvid, int counter)
          Returns a new partial view identifier obtained by a complete view identifier and an additional sequence number.
 long getValue()
          Returned the wrapped value.
static void marshal(java.io.ObjectOutput msg, long value)
          Write the specified message id to an outgoing message.
static long unmarshal(java.io.ObjectInput msg)
          Unmarshals a view id from an incoming message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIZE

public static final int SIZE
Size of this object in bytes (when marshalled)

See Also:
Constant Field Values
Constructor Detail

ViewId

public ViewId(long value)
Creates a ViewId object containing the specified value.

Method Detail

getValue

public long getValue()
Returned the wrapped value.


marshal

public static void marshal(java.io.ObjectOutput msg,
                           long value)
                    throws java.io.IOException
Write the specified message id to an outgoing message.

Throws:
java.io.IOException

unmarshal

public static long unmarshal(java.io.ObjectInput msg)
                      throws java.io.IOException
Unmarshals a view id from an incoming message.

Throws:
java.io.IOException

create

public static long create(EndPoint host,
                          int counter)
Returns a new complete view identifier obtained from the host identifier and a sequence number.

Parameters:
host - the host idientifer.
counter - sequence number.

createPartial

public static long createPartial(long cvid,
                                 int counter)
Returns a new partial view identifier obtained by a complete view identifier and an additional sequence number.

Parameters:
cvid - the complete view identifier.
counter - the additional counter.


Copyright © 1998-2006 The Jgroup/ARM development team. All Rights Reserved.