Package org.apache.hadoop.hbase.io.hfile
Class CacheableDeserializerIdManager
java.lang.Object
org.apache.hadoop.hbase.io.hfile.CacheableDeserializerIdManager
This class is used to manage the identifiers for
CacheableDeserializer
. All deserializers
are registered with this Manager via the registerDeserializer(CacheableDeserializer)
}.
On registration, we return an int *identifier* for this deserializer. The int identifier is
passed to getDeserializer(int)
} to obtain the registered deserializer instance.-
Field Summary
Modifier and TypeFieldDescriptionprivate static final AtomicInteger
private static final Map<Integer,
CacheableDeserializer<Cacheable>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CacheableDeserializer<Cacheable>
getDeserializer
(int id) Get the cacheable deserializer registered at the given identifier Id.static int
Register the givenCacheable
-- usually an hfileblock instance, these implement the Cacheable Interface -- deserializer and generate a unique identifier id for it and return this as our result.save()
Snapshot a map of the current identifiers to class names for reconstruction on reading out of a file.
-
Field Details
-
registeredDeserializers
-
identifier
-
-
Constructor Details
-
CacheableDeserializerIdManager
public CacheableDeserializerIdManager()
-
-
Method Details
-
registerDeserializer
Register the givenCacheable
-- usually an hfileblock instance, these implement the Cacheable Interface -- deserializer and generate a unique identifier id for it and return this as our result.- Returns:
- the identifier of given cacheable deserializer
- See Also:
-
getDeserializer
Get the cacheable deserializer registered at the given identifier Id. -
save
Snapshot a map of the current identifiers to class names for reconstruction on reading out of a file.
-