Package com.tangosol.util
Class ExternalizableHelper.FormatAwareCompressor
java.lang.Object
com.tangosol.util.ExternalizableHelper.FormatAwareCompressor
- All Implemented Interfaces:
 DeltaCompressor
- Enclosing class:
 ExternalizableHelper
public static class ExternalizableHelper.FormatAwareCompressor
extends Object
implements DeltaCompressor
A DeltaCompressor wrapper implementation that removes/replaces the
 serialization format byte (FMT_EXT) before/after delegating to the
 underlying compressor.
- 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionFormatAwareCompressor(DeltaCompressor compressor) Construct a FormatAwareCompressor. - 
Method Summary
Modifier and TypeMethodDescriptionapplyDelta(ReadBuffer bufOld, ReadBuffer bufDelta) Apply a delta to an old value in order to create a new value.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.toString()Returns a string representation of the object. 
- 
Field Details
- 
m_compressor
The wrapped DeltaCompressor. 
 - 
 - 
Constructor Details
- 
FormatAwareCompressor
Construct a FormatAwareCompressor.- Parameters:
 compressor- the underlying compressor
 
 - 
 - 
Method Details
- 
extractDelta
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.
- Specified by:
 extractDeltain interfaceDeltaCompressor- Parameters:
 bufOld- the old valuebufNew- 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
Apply a delta to an old value in order to create a new value.- Specified by:
 applyDeltain interfaceDeltaCompressor- Parameters:
 bufOld- the old valuebufDelta- the delta information returned fromextractDelta(com.tangosol.io.ReadBuffer, com.tangosol.io.ReadBuffer)to apply to the old value- Returns:
 - the new value
 
 - 
toString
Returns a string representation of the object. 
 -