jgroup.relacs.types
Class Checksum

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

public final class Checksum
extends java.lang.Object

The Checksum class wraps a value of the relacs daemon type "checksum" in an object. A checksum is used to quickly verify if two proposals are equal or not. If the checksum is different, the proposal are different. Otherwise, we have to check their content.

Since:
Jgroup 1.2
Author:
Alberto Montresor

Field Summary
static int SIZE
          Size of this object in bytes
 
Constructor Summary
Checksum(int value)
          Creates a Checksum object containing the specified value.
 
Method Summary
 int getValue()
          Returned the wrapped value.
static void marshal(java.io.ObjectOutput msg, int value)
          Marshals the specified checksum to an outgoing message.
static int unmarshal(java.io.ObjectInput msg)
          Unmarshals a checksum 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

See Also:
Constant Field Values
Constructor Detail

Checksum

public Checksum(int value)
Creates a Checksum object containing the specified value.

Method Detail

getValue

public int getValue()
Returned the wrapped value.


marshal

public static void marshal(java.io.ObjectOutput msg,
                           int value)
                    throws java.io.IOException
Marshals the specified checksum to an outgoing message.

Throws:
java.io.IOException

unmarshal

public static int unmarshal(java.io.ObjectInput msg)
                     throws java.io.IOException
Unmarshals a checksum from an incoming message.

Throws:
java.io.IOException


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