Class EncodingOptions
- java.lang.Object
-
- org.apache.accumulo.server.conf.codec.EncodingOptions
-
public class EncodingOptions extends Object
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 Modifier and Type Field Description static int
EncodingVersion_1_0
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
encode(DataOutputStream dos)
Write the values to a data stream.static EncodingOptions
fromDataStream(DataInputStream dis)
Instantiate an instance of EncodingOptions reading the values from an input stream.int
getEncodingVersion()
get the encoding version of the instance,boolean
isCompressed()
get if the compress is set.String
toString()
static EncodingOptions
V1_0(boolean compress)
Instantiate encoding options to use version 1.0 encoding settings.
-
-
-
Field Detail
-
EncodingVersion_1_0
public static final int EncodingVersion_1_0
- See Also:
- Constant Field Values
-
-
Method Detail
-
V1_0
public static EncodingOptions V1_0(boolean compress)
Instantiate encoding options to use version 1.0 encoding settings.- Parameters:
compress
- when true compress the property map.- Returns:
- the encoding options.
-
fromDataStream
public static EncodingOptions fromDataStream(DataInputStream dis) throws IOException
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
public void encode(DataOutputStream dos) throws IOException
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.
-
-