Examples of CachingHTableFactory


Examples of com.salesforce.hbase.index.table.CachingHTableFactory

   * <p>
   * Exposed for TESTING
   */
  void setup(HTableFactory factory, ExecutorService pool, Abortable abortable, Stoppable stop,
      int cacheSize) {
    this.factory = new CachingHTableFactory(factory, cacheSize);
    this.pool = new QuickFailingTaskRunner(pool);
    this.stopped = stop;
  }
View Full Code Here

Examples of com.salesforce.hbase.index.table.CachingHTableFactory

   * Exposed for TESTING
   */
  void setup(HTableFactory factory, ExecutorService pool, Abortable abortable, Stoppable stop,
      int cacheSize) {
    this.pool = new WaitForCompletionTaskRunner(pool);
    this.factory = new CachingHTableFactory(factory, cacheSize);
    this.abortable = new CapturingAbortable(abortable);
    this.stopped = stop;
  }
View Full Code Here

Examples of com.salesforce.hbase.index.table.CachingHTableFactory

    Mockito.when(delegate.getTable(t1)).thenReturn(table1);
    Mockito.when(delegate.getTable(t2)).thenReturn(table2);
    Mockito.when(delegate.getTable(t3)).thenReturn(table3);
   
    // setup our factory with a cache size of 2
    CachingHTableFactory factory = new CachingHTableFactory(delegate, 2);
    factory.getTable(t1);
    factory.getTable(t2);
    factory.getTable(t3);
    // get the same table a second time, after it has gone out of cache
    factory.getTable(t1);
   
    Mockito.verify(delegate, Mockito.times(2)).getTable(t1);
    Mockito.verify(delegate, Mockito.times(1)).getTable(t2);
    Mockito.verify(delegate, Mockito.times(1)).getTable(t3);
    Mockito.verify(table1).close();
View Full Code Here

Examples of org.apache.hbase.index.table.CachingHTableFactory

   * Exposed for TESTING
   */
  void setup(HTableFactory factory, ExecutorService pool, Abortable abortable, Stoppable stop,
      int cacheSize) {
    this.pool = new WaitForCompletionTaskRunner(pool);
    this.factory = new CachingHTableFactory(factory, cacheSize);
    this.abortable = new CapturingAbortable(abortable);
    this.stopped = stop;
  }
View Full Code Here

Examples of org.apache.hbase.index.table.CachingHTableFactory

   * <p>
   * Exposed for TESTING
   */
  void setup(HTableFactory factory, ExecutorService pool, Abortable abortable, Stoppable stop,
      int cacheSize) {
    this.factory = new CachingHTableFactory(factory, cacheSize);
    this.pool = new QuickFailingTaskRunner(pool);
    this.stopped = stop;
  }
View Full Code Here

Examples of org.apache.hbase.index.table.CachingHTableFactory

    Mockito.when(delegate.getTable(t1)).thenReturn(table1);
    Mockito.when(delegate.getTable(t2)).thenReturn(table2);
    Mockito.when(delegate.getTable(t3)).thenReturn(table3);
   
    // setup our factory with a cache size of 2
    CachingHTableFactory factory = new CachingHTableFactory(delegate, 2);
    factory.getTable(t1);
    factory.getTable(t2);
    factory.getTable(t3);
    // get the same table a second time, after it has gone out of cache
    factory.getTable(t1);
   
    Mockito.verify(delegate, Mockito.times(2)).getTable(t1);
    Mockito.verify(delegate, Mockito.times(1)).getTable(t2);
    Mockito.verify(delegate, Mockito.times(1)).getTable(t3);
    Mockito.verify(table1).close();
View Full Code Here

Examples of org.apache.phoenix.hbase.index.table.CachingHTableFactory

   * <p>
   * Exposed for TESTING
   */
  void setup(HTableFactory factory, ExecutorService pool, Abortable abortable, Stoppable stop,
      int cacheSize) {
    this.factory = new CachingHTableFactory(factory, cacheSize);
    this.pool = new QuickFailingTaskRunner(pool);
    this.stopped = stop;
  }
View Full Code Here

Examples of org.apache.phoenix.hbase.index.table.CachingHTableFactory

   * Exposed for TESTING
   */
  void setup(HTableFactory factory, ExecutorService pool, Abortable abortable, Stoppable stop,
      int cacheSize) {
    this.pool = new WaitForCompletionTaskRunner(pool);
    this.factory = new CachingHTableFactory(factory, cacheSize);
    this.abortable = new CapturingAbortable(abortable);
    this.stopped = stop;
  }
View Full Code Here

Examples of org.apache.phoenix.hbase.index.table.CachingHTableFactory

    Mockito.when(delegate.getTable(t1)).thenReturn(table1);
    Mockito.when(delegate.getTable(t2)).thenReturn(table2);
    Mockito.when(delegate.getTable(t3)).thenReturn(table3);
   
    // setup our factory with a cache size of 2
    CachingHTableFactory factory = new CachingHTableFactory(delegate, 2);
    factory.getTable(t1);
    factory.getTable(t2);
    factory.getTable(t3);
    // get the same table a second time, after it has gone out of cache
    factory.getTable(t1);
   
    Mockito.verify(delegate, Mockito.times(2)).getTable(t1);
    Mockito.verify(delegate, Mockito.times(1)).getTable(t2);
    Mockito.verify(delegate, Mockito.times(1)).getTable(t3);
    Mockito.verify(table1).close();
View Full Code Here

Examples of org.apache.phoenix.hbase.index.table.CachingHTableFactory

     * Setup <tt>this</tt>.
     * <p>
     * Exposed for TESTING
     */
    void setup(HTableFactory factory, ExecutorService pool, Abortable abortable, Stoppable stop, int cacheSize) {
        this.factory = new CachingHTableFactory(factory, cacheSize);
        this.pool = new QuickFailingTaskRunner(pool);
        this.stopped = stop;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.