/** * BlobStore which are created by builder might get wrapped. * So here we perform any configuration and also access any * service exposed by the store * * @param blobStore store to config */ private void configureBlobStore(BlobStore blobStore) { if (blobStore instanceof AbstractBlobStore){ this.blobStoreStats = new BlobStoreStats(statisticsProvider); ((AbstractBlobStore) blobStore).setStatsCollector(blobStoreStats); } if (blobStore instanceof CachingBlobStore){ blobStoreCacheStats = ((CachingBlobStore) blobStore).getCacheStats(); } } }
/** * BlobStore which are created by builder might get wrapped. * So here we perform any configuration and also access any * service exposed by the store * * @param blobStore store to config */ private void configureBlobStore(BlobStore blobStore) { if (blobStore instanceof AbstractBlobStore){ this.blobStoreStats = new BlobStoreStats(statisticsProvider); ((AbstractBlobStore) blobStore).setStatsCollector(blobStoreStats); } if (blobStore instanceof CachingBlobStore){ blobStoreCacheStats = ((CachingBlobStore) blobStore).getCacheStats(); } } }
@Override public BlobStore setUp() { fds = new FileDataStore(); fds.setMinRecordLength(4092); storeDir = new File(basedir, unique); fds.init(storeDir.getAbsolutePath()); configure(fds); DataStoreBlobStore bs = new DataStoreBlobStore(fds, true, fdsCacheInMB); bs.setBlobStatsCollector(new BlobStoreStats(statisticsProvider)); configure(bs); return bs; }
@Override public BlobStore setUp() { fds = new FileDataStore(); fds.setMinRecordLength(4092); storeDir = new File(basedir, unique); fds.init(storeDir.getAbsolutePath()); configure(fds); DataStoreBlobStore bs = new DataStoreBlobStore(fds, true, fdsCacheInMB); bs.setBlobStatsCollector(new BlobStoreStats(statisticsProvider)); configure(bs); return bs; }
ds.init(homeDir); BlobStoreStats stats = new BlobStoreStats(getStatisticsProvider()); this.dataStore = new DataStoreBlobStore(ds, encodeLengthInId, cacheSizeInMB); this.dataStore.setBlobStatsCollector(stats);
ds.init(homeDir); BlobStoreStats stats = new BlobStoreStats(getStatisticsProvider()); this.dataStore = new DataStoreBlobStore(ds, encodeLengthInId, cacheSizeInMB); this.dataStore.setBlobStatsCollector(stats);
ds.init(homeDir); BlobStoreStats stats = new BlobStoreStats(getStatisticsProvider()); this.dataStore = new DataStoreBlobStore(ds, encodeLengthInId, cacheSizeInMB); this.dataStore.setBlobStatsCollector(stats);
private BlobStore createBlobStore() { FileDataStore fds = new OakFileDataStore(); fdsDir = "target/fds-" + codec + copyOnRW + minRecordLength + mergePolicy; fds.setPath(fdsDir); if (minRecordLength > 0) { fds.setMinRecordLength(minRecordLength); } fds.init(null); dataStoreBlobStore = new DataStoreBlobStore(fds); StatisticsProvider sp = new DefaultStatisticsProvider(scheduledExecutorService); BlobStatsCollector collector = new BlobStoreStats(sp); dataStoreBlobStore.setBlobStatsCollector(collector); return dataStoreBlobStore; }