org.apache.hadoop.hbase.codec.prefixtree.decode
Class ArraySearcherPool

java.lang.Object
  extended by org.apache.hadoop.hbase.codec.prefixtree.decode.ArraySearcherPool

@InterfaceAudience.Private
public class ArraySearcherPool
extends Object

Pools PrefixTreeArraySearcher objects. Each Searcher can consist of hundreds or thousands of objects and 1 is needed for each HFile during a Get operation. With tens of thousands of Gets/second, reusing these searchers may save a lot of young gen collections.

Alternative implementation would be a ByteBufferSearcherPool (not implemented yet).


Field Summary
protected  Queue<PrefixTreeArraySearcher> pool
           
 
Constructor Summary
ArraySearcherPool()
           
 
Method Summary
 void checkIn(PrefixTreeArraySearcher searcher)
           
 PrefixTreeArraySearcher checkOut(ByteBuffer buffer, boolean includesMvccVersion)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pool

protected Queue<PrefixTreeArraySearcher> pool
Constructor Detail

ArraySearcherPool

public ArraySearcherPool()
Method Detail

checkOut

public PrefixTreeArraySearcher checkOut(ByteBuffer buffer,
                                        boolean includesMvccVersion)

checkIn

public void checkIn(PrefixTreeArraySearcher searcher)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.