public final class RSync extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RSync.RollingChecksum
Variation of Adler as used in Rsync.
|
| Constructor and Description |
|---|
RSync() |
| Modifier and Type | Method and Description |
|---|---|
static List<Checksum> |
checksums(byte[] value,
int blockSize)
It returns an array of weak and strong checksums for the value.
|
static List<Instruction> |
instructions(byte[] array,
List<Checksum> checksums,
int blockSize)
It returns the sequence of instructions each of which contains either
reference to a block or literal data.
|
static DataBuffer |
reconstruct(byte[] value,
List<Instruction> instructions,
int blockSize)
It reconstructs the copy of responsible peer's value using instructions
and the replica's value.
|
public static List<Checksum> checksums(byte[] value, int blockSize)
value - The valuesize - The offset sizeNoSuchAlgorithmExceptionpublic static List<Instruction> instructions(byte[] array, List<Checksum> checksums, int blockSize)
array - The value at responsible peerchecksums - The array of checksumsblockSize - The block sizepublic static DataBuffer reconstruct(byte[] value, List<Instruction> instructions, int blockSize)
value - The value at replicainstructions - The sequence of instructionsblockSize - The offset sizeCopyright © 2015. All rights reserved.