public DBImpl(StoreSerializer serializer, StoreConfig storeConfig) { this.storeConfig = storeConfig; this.dataCache = new LRUDataCache<K, V>(storeConfig.getMaxDataCacheSize()); this.storeTxLogEngine = new StoreTxLogEngine<K, V>(serializer, storeConfig); this.dataBlockEngine = new DataBlockEngine<K, V>(serializer, storeConfig); if (IndexType.MEM == storeConfig.getIndexType()) { this.index = new MemIndex<K, V>(storeConfig, dataBlockEngine, dataCache); this.txLogReplay = new TxLogReplay<K, V>(storeTxLogEngine, dataBlockEngine, index, dataCache); this.indexSnapshot = new MemIndexSnapshot<K, V>(txLogReplay, index, storeConfig, serializer); ((MemIndex<K, V>) this.index).setIndexSnapshot(this.indexSnapshot); } else { throw new IllegalArgumentException("Illegal IndexEngine " + storeConfig.getIndexType()); } }
public DBImpl(StoreSerializer serializer, StoreConfig storeConfig) { this.storeConfig = storeConfig; this.dataCache = new LRUDataCache<K, V>(storeConfig.getMaxDataCacheSize()); this.storeTxLogEngine = new StoreTxLogEngine<K, V>(serializer, storeConfig); this.dataBlockEngine = new DataBlockEngine<K, V>(serializer, storeConfig); if (IndexType.MEM == storeConfig.getIndexType()) { this.index = new MemIndex<K, V>(storeConfig, dataBlockEngine, dataCache); this.txLogReplay = new TxLogReplay<K, V>(storeTxLogEngine, dataBlockEngine, index, dataCache); this.indexSnapshot = new MemIndexSnapshot<K, V>(txLogReplay, index, storeConfig, serializer); ((MemIndex<K, V>) this.index).setIndexSnapshot(this.indexSnapshot); } else { throw new IllegalArgumentException("Illegal IndexEngine " + storeConfig.getIndexType()); } }
public DBImpl(StoreSerializer serializer, StoreConfig storeConfig) { this.storeConfig = storeConfig; this.dataCache = new LRUDataCache<K, V>(storeConfig.getMaxDataCacheSize()); this.storeTxLogEngine = new StoreTxLogEngine<K, V>(serializer, storeConfig); this.dataBlockEngine = new DataBlockEngine<K, V>(serializer, storeConfig); if (IndexType.MEM == storeConfig.getIndexType()) { this.index = new MemIndex<K, V>(storeConfig, dataBlockEngine, dataCache); this.txLogReplay = new TxLogReplay<K, V>(storeTxLogEngine, dataBlockEngine, index, dataCache); this.indexSnapshot = new MemIndexSnapshot<K, V>(txLogReplay, index, storeConfig, serializer); ((MemIndex<K, V>) this.index).setIndexSnapshot(this.indexSnapshot); } else { throw new IllegalArgumentException("Illegal IndexEngine " + storeConfig.getIndexType()); } }