ostore.archive.cauchy
Class Parameters

java.lang.Object
  |
  +--ostore.archive.cauchy.Parameters

public class Parameters
extends Object

Parameters are the parameters used to encode/decode an object.

Version:
$Id: Parameters.java,v 1.4 2003/11/17 23:52:43 emilong Exp $
Author:
Hakim Weatherspoon

Field Summary
protected  int _Elen
          Elen is the length of the encoding in words.
protected  int _Lfield
          Lfield is the log of the length of the field.
protected  int _Mfragments
          Mfragments is the number of message fragments IMPORTANT: The max of Mfragments and Rfragments is at most 2^{Lfield-1}.
protected  int _Mlen
          Mlen is the length of the message in words.
protected  int _Mseglen
          Mseglen is the message segment length.
protected  int _Nfragments
          Nfragments is the total number of fragments sent.
protected  int _Niter
          Niter is the number of messages sent.
protected  int _Nsegs
          Nsegs is the number of segments in a fragment.
protected  int _Plen
          Plen is the fragment length in words excluding the overhead for storing the index.
protected  int _Plentot
          Plentot is the fragment length in words including the overhead for storing the index.
protected  int _Rfragments
          Rfragments is the number of redundant fragments IMPORTANT: The max of Mfragments and Rfragments is at most 2^{Lfield-1}.
protected  int _SMultField
          SMultField is the size of the multiplicative field (2^{Lfield}-1) == TableLength - 1.
protected  int _TableLength
          TableLength is 2^{Lfield}
 
Constructor Summary
Parameters()
          Empty CONSTRUCTOR Initializes Parameters such that Mfragments and Rfragments are zero.
 
Method Summary
 int Elen()
          Elen is the length of the encoding in words.
 int Lfield()
          Lfield is the log of the length of the field.
 int Mfragments()
          Mfragments is the number of message fragments
 int Mlen()
          Mlen is the length of the message in words.
 int Mseglen()
          Mseglen is the message segment length.
 int Nfragments()
          Nfragments is the total number of fragments sent.
 int Niter()
          Niter is the number of messages sent.
 int Nsegs()
          Nsegs is the number of segments in a fragment.
 int Plen()
          Plen is the fragment length in words excluding the overhead for storing the index.
 int Plentot()
          Plentot is the fragment length in words including the overhead for storing the index.
 void resetParam()
           
 int Rfragments()
          Rfragments is the number of redundant fragments
 boolean setLfield(int n)
          Lfield (length of field) must be (1 <= Lfield <= 16) otherwise function returns false and Lfield stays default.
 boolean setNsegs(int n)
          Nsegs is the number of segments in each fragment in which to perform the Galois Field operations.
 int SMultField()
          SMultField is the size of the multiplicative field (2^{Lfield}-1) == TableLength - 1.
 int TableLength()
          TableLength is 2^{Lfield}
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_Niter

protected int _Niter
Niter is the number of messages sent.


_Lfield

protected int _Lfield
Lfield is the log of the length of the field.


_Nsegs

protected int _Nsegs
Nsegs is the number of segments in a fragment. Length of fragment in bytes is 4*Nsegs*Lfield.


_TableLength

protected int _TableLength
TableLength is 2^{Lfield}


_SMultField

protected int _SMultField
SMultField is the size of the multiplicative field (2^{Lfield}-1) == TableLength - 1.


_Plen

protected int _Plen
Plen is the fragment length in words excluding the overhead for storing the index.


_Plentot

protected int _Plentot
Plentot is the fragment length in words including the overhead for storing the index.


_Mfragments

protected int _Mfragments
Mfragments is the number of message fragments IMPORTANT: The max of Mfragments and Rfragments is at most 2^{Lfield-1}. Lfield must be set large enough to make this true else the encoding and decoding won't work


_Rfragments

protected int _Rfragments
Rfragments is the number of redundant fragments IMPORTANT: The max of Mfragments and Rfragments is at most 2^{Lfield-1}. Lfield must be set large enough to make this true else the encoding and decoding won't work.


_Nfragments

protected int _Nfragments
Nfragments is the total number of fragments sent.


_Mseglen

protected int _Mseglen
Mseglen is the message segment length.


_Mlen

protected int _Mlen
Mlen is the length of the message in words.


_Elen

protected int _Elen
Elen is the length of the encoding in words.

Constructor Detail

Parameters

public Parameters()
Empty CONSTRUCTOR Initializes Parameters such that Mfragments and Rfragments are zero.

Method Detail

Niter

public int Niter()
Niter is the number of messages sent.


Lfield

public int Lfield()
Lfield is the log of the length of the field.


Nsegs

public int Nsegs()
Nsegs is the number of segments in a fragment. Length of fragment in bytes is 4*Nsegs*Lfield.


TableLength

public int TableLength()
TableLength is 2^{Lfield}


SMultField

public int SMultField()
SMultField is the size of the multiplicative field (2^{Lfield}-1) == TableLength - 1.


Plen

public int Plen()
Plen is the fragment length in words excluding the overhead for storing the index.


Plentot

public int Plentot()
Plentot is the fragment length in words including the overhead for storing the index.


Mfragments

public int Mfragments()
Mfragments is the number of message fragments

Returns:
return == return the number of message fragments. IMPORTANT: The max of Mfragments and Rfragments is at most 2^{Lfield-1}. Lfield must be set large enough to make this true else the encoding and decoding won't work

Rfragments

public int Rfragments()
Rfragments is the number of redundant fragments

Returns:
return == return the number of message fragments. IMPORTANT: The max of Mfragments and Rfragments is at most 2^{Lfield-1}. Lfield must be set large enough to make this true else the encoding and decoding won't work.

Nfragments

public int Nfragments()
Nfragments is the total number of fragments sent.


Mseglen

public int Mseglen()
Mseglen is the message segment length.


Mlen

public int Mlen()
Mlen is the length of the message in words.


Elen

public int Elen()
Elen is the length of the encoding in words.


setNsegs

public boolean setNsegs(int n)
Nsegs is the number of segments in each fragment in which to perform the Galois Field operations.

Parameters:
n - == number to set Nsegs to, n > 0.
Returns:
return==false if n <= 0, otherwise returns true.

setLfield

public boolean setLfield(int n)
Lfield (length of field) must be (1 <= Lfield <= 16) otherwise function returns false and Lfield stays default.

Parameters:
n - == number to set Lfield to, 1 <= Lfield <= 16.
Returns:
return==Lfield must be (1 <= Lfield <= 16) otherwise function returns false and Lfield stays default

resetParam

public void resetParam()