Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


com.tangosol.io
Interface DeltaCompressor

All Known Implementing Classes:
BinaryDeltaCompressor, DecoratedBinaryDeltaCompressor, DecorationOnlyDeltaCompressor, NullImplementation.NullDeltaCompressor, PofDeltaCompressor

public interface DeltaCompressor

The DeltaCompressor interface provides the capability of comparing two in-memory buffers containing an old and a new value, and producing a result (called a "delta") that can be applied to the old value to create the new value.

Author:
cp 2009.01.06

Method Summary
 ReadBuffer applyDelta(ReadBuffer bufOld, ReadBuffer bufDelta)
          Apply a delta to an old value in order to create a new value.
 ReadBuffer extractDelta(ReadBuffer bufOld, ReadBuffer bufNew)
          Compare an old value to a new value and generate a delta that represents the changes that must be made to the old value in order to transform it into the new value.

 

Method Detail

extractDelta

ReadBuffer extractDelta(ReadBuffer bufOld,
                        ReadBuffer bufNew)
Compare an old value to a new value and generate a delta that represents the changes that must be made to the old value in order to transform it into the new value. The generated delta must be a ReadBuffer of non-zero length.

If the old value is null, the generated delta must be a "replace", meaning that applying it to any value must produce the specified new value.

Parameters:
bufOld - the old value
bufNew - the new value; must not be null
Returns:
the changes that must be made to the old value in order to transform it into the new value, or null to indicate no change

applyDelta

ReadBuffer applyDelta(ReadBuffer bufOld,
                      ReadBuffer bufDelta)
Apply a delta to an old value in order to create a new value.
Parameters:
bufOld - the old value
bufDelta - the delta information returned from extractDelta(com.tangosol.io.ReadBuffer, com.tangosol.io.ReadBuffer) to apply to the old value
Returns:
the new value

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.1.0

E22843-01


Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.