org.apache.hadoop.hive.serde2.avro
Class InstanceCache<SeedObject,Instance>
java.lang.Object
org.apache.hadoop.hive.serde2.avro.InstanceCache<SeedObject,Instance>
- Type Parameters:
SeedObject
- Object that determines the instanceInstance
- Instance that will be created from SeedObject.
public abstract class InstanceCache<SeedObject,Instance>
- extends Object
Cache for objects whose creation only depends on some other set of objects
and therefore can be used against other equivalent versions of those
objects. Essentially memoizes instance creation.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InstanceCache
public InstanceCache()
retrieve
public Instance retrieve(SeedObject hv)
throws AvroSerdeException
- Retrieve (or create if it doesn't exist) the correct Instance for this
SeedObject
- Throws:
AvroSerdeException
makeInstance
protected abstract Instance makeInstance(SeedObject hv)
throws AvroSerdeException
- Throws:
AvroSerdeException
Copyright © 2011 The Apache Software Foundation