org.metastatic.rsync
Class Configuration

java.lang.Object
  |
  +--org.metastatic.rsync.Configuration
All Implemented Interfaces:
Cloneable, Serializable

public class Configuration
extends Object
implements Cloneable, Serializable

A Configuration is a mere collection of objects and values that compose a particular configuration for the algorithm, for example the message digest that computes the strong checksum.

Usage of a Configuration involves setting the member fields of this object to thier appropriate values; thus, it is up to the programmer to specify the strongSum, weakSum, blockLength and strongSumLength to be used. The other fields are optional.

See Also:
Serialized Form

Field Summary
static int BLOCK_LENGTH
          The default block size.
 int blockLength
          The length of blocks to checksum.
 byte[] checksumSeed
          The seed for the checksum, to perturb the strong checksum and help avoid collisions in plain rsync (or in similar applicaitons).
static int CHUNK_SIZE
          The default chunk size.
 int chunkSize
          The maximum size of byte arrays to create, when they are needed.
 boolean doRunLength
          Whether or not to do run-length encoding when making Deltas.
 MessageDigest strongSum
          The message digest that computes the stronger checksum.
 int strongSumLength
          The effective length of the strong sum.
 RollingChecksum weakSum
          The rolling checksum.
 
Constructor Summary
Configuration()
           
 
Method Summary
 Object clone()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLOCK_LENGTH

public static final int BLOCK_LENGTH
The default block size.

See Also:
Constant Field Values

CHUNK_SIZE

public static final int CHUNK_SIZE
The default chunk size.

See Also:
Constant Field Values

strongSum

public transient MessageDigest strongSum
The message digest that computes the stronger checksum.


weakSum

public transient RollingChecksum weakSum
The rolling checksum.


blockLength

public int blockLength
The length of blocks to checksum.


strongSumLength

public int strongSumLength
The effective length of the strong sum.


doRunLength

public boolean doRunLength
Whether or not to do run-length encoding when making Deltas.


checksumSeed

public byte[] checksumSeed
The seed for the checksum, to perturb the strong checksum and help avoid collisions in plain rsync (or in similar applicaitons).


chunkSize

public int chunkSize
The maximum size of byte arrays to create, when they are needed. This vale defaults to 32 kilobytes.

Constructor Detail

Configuration

public Configuration()
Method Detail

clone

public Object clone()
Overrides:
clone in class Object