org.apache.hadoop.hbase.io.hfile
Interface CacheableDeserializer<T extends Cacheable>


@InterfaceAudience.Private
public interface CacheableDeserializer<T extends Cacheable>

Interface for a deserializer. Throws an IOException if the serialized data is incomplete or wrong.


Method Summary
 T deserialize(ByteBuffer b)
          Returns the deserialized object.
 T deserialize(ByteBuffer b, boolean reuse)
           
 int getDeserialiserIdentifier()
          Get the identifier of this deserialiser.
 

Method Detail

deserialize

T deserialize(ByteBuffer b)
                                throws IOException
Returns the deserialized object.

Returns:
T the deserialized object.
Throws:
IOException

deserialize

T deserialize(ByteBuffer b,
              boolean reuse)
                                throws IOException
Parameters:
b -
reuse - true if Cacheable object can use the given buffer as its content
Returns:
T the deserialized object.
Throws:
IOException

getDeserialiserIdentifier

int getDeserialiserIdentifier()
Get the identifier of this deserialiser. Identifier is unique for each deserializer and generated by CacheableDeserializerIdManager

Returns:
identifier number of this cacheable deserializer


Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.