com.bigdata.service
Class IndexCache

java.lang.Object
  extended by com.bigdata.service.AbstractIndexCache<IScaleOutClientIndex>
      extended by com.bigdata.service.IndexCache
Type Parameters:
T -

public class IndexCache
extends AbstractIndexCache<IScaleOutClientIndex>

Concrete implementation for IClientIndex views.

Version:
$Id: IndexCache.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Field Summary
 
Fields inherited from class com.bigdata.service.AbstractIndexCache
INFO, log
 
Constructor Summary
IndexCache(AbstractScaleOutFederation fed, int capacity, long timeout)
           
 
Method Summary
protected  void dropIndexFromCache(String name)
          Drop the ITx.UNISOLATED and ITx.READ_COMMITTED entries for the named index from the cache.
protected  ClientIndexView newView(String name, long timestamp)
          Method is invoked on a cache miss and returns a view of the described index.
 
Methods inherited from class com.bigdata.service.AbstractIndexCache
getIndex, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexCache

public IndexCache(AbstractScaleOutFederation fed,
                  int capacity,
                  long timeout)
Method Detail

newView

protected ClientIndexView newView(String name,
                                  long timestamp)
Description copied from class: AbstractIndexCache
Method is invoked on a cache miss and returns a view of the described index.

Specified by:
newView in class AbstractIndexCache<IScaleOutClientIndex>
Returns:
The index view -or- null if the described index does not exist.

dropIndexFromCache

protected void dropIndexFromCache(String name)
Description copied from class: AbstractIndexCache
Drop the ITx.UNISOLATED and ITx.READ_COMMITTED entries for the named index from the cache.

Historical and transactional reads are still allowed, but we remove the read-committed or unisolated views from the cache once the index has been dropped. If a client wants them, it needs to re-request. If they have been re-registered on the metadata service then they will become available again.

Note: Operations against unisolated or read-committed indices will throw exceptions if they execute after the index was dropped.

Overrides:
dropIndexFromCache in class AbstractIndexCache<IScaleOutClientIndex>


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.