Class EncodingOptions
java.lang.Object
org.apache.accumulo.server.conf.codec.EncodingOptions
Serialization metadata to allow for evolution of the encoding used for property storage. This
info is expected to be stored first in the serialization and uncompressed so that the handling of
subsequent fields and data can be processed correctly and without additional processing.
Instances of this class are immutable.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(DataOutputStream dos) Write the values to a data stream.static EncodingOptions
Instantiate an instance of EncodingOptions reading the values from an input stream.int
get the encoding version of the instance,boolean
get if the compress is set.toString()
static EncodingOptions
V1_0
(boolean compress) Instantiate encoding options to use version 1.0 encoding settings.
-
Field Details
-
EncodingVersion_1_0
public static final int EncodingVersion_1_0- See Also:
-
-
Method Details
-
V1_0
Instantiate encoding options to use version 1.0 encoding settings.- Parameters:
compress
- when true compress the property map.- Returns:
- the encoding options.
-
fromDataStream
Instantiate an instance of EncodingOptions reading the values from an input stream. Typically, the stream will be obtained from reading a byte array from a data store and then creating a stream that reads from that array,- Parameters:
dis
- a data input stream- Throws:
IOException
- if an exception occurs reading from the input stream.
-
encode
Write the values to a data stream.- Parameters:
dos
- a data output stream- Throws:
IOException
- if an exception occurs writing the data stream.
-
getEncodingVersion
public int getEncodingVersion()get the encoding version of the instance,- Returns:
- the encoding version
-
isCompressed
public boolean isCompressed()get if the compress is set.- Returns:
- true if the payload is compressed, false if not.
-
toString
-