public ExpectedValueCheckingStoreManager(KeyColumnValueStoreManager storeManager, String lockStoreSuffix, LockerProvider lockerProvider, Duration maxReadTime) { super(storeManager); this.lockStoreSuffix = lockStoreSuffix; this.lockerProvider = lockerProvider; this.maxReadTime = maxReadTime; this.storeFeatures = new StandardStoreFeatures.Builder(storeManager.getFeatures()).locking(true).build(); this.stores = new HashMap<>(6); }
public TTLKCVSManager(KeyColumnValueStoreManager manager) { super(manager); Preconditions.checkArgument(manager.getFeatures().hasCellTTL()); Preconditions.checkArgument(!manager.getFeatures().hasStoreTTL(), "Using TTLKCVSManager with %s is redundant: underlying implementation already supports store-level ttl", manager); this.features = new StandardStoreFeatures.Builder(manager.getFeatures()).storeTTL(true).build(); }
defaultConfig.set(GraphDatabaseConfiguration.UNIQUE_INSTANCE_ID, "default"); BaseTransactionConfig defaultTxConfig = new StandardBaseTransactionConfig.Builder().customOptions(defaultConfig).timestampProvider(TimestampProviders.MICRO).build(); StoreFeatures backingFeatures = new StandardStoreFeatures.Builder().keyConsistent(globalConfig, localConfig).build();
final StandardStoreFeatures.Builder fb = new StandardStoreFeatures.Builder();
private StandardStoreFeatures initializeFeatures(final Configuration config) { final Builder builder = new StandardStoreFeatures.Builder(); return builder.batchMutation(true) .cellTTL(false) .distributed(true) .keyConsistent(config) .keyOrdered(false) .localKeyPartition(false) .locking(config.get(Constants.DYNAMODB_USE_NATIVE_LOCKING)) .multiQuery(true) .orderedScan(false) .preferredTimestamps(TimestampProviders.MILLI) //ignored because timestamps is false .storeTTL(false) .timestamps(false) .transactional(false) .supportsInterruption(false) .optimisticLocking(true) .unorderedScan(true) .visibility(false).build(); }
@Override public StoreFeatures getFeatures() { Configuration c = GraphDatabaseConfiguration.buildGraphConfiguration(); StandardStoreFeatures.Builder fb = new StandardStoreFeatures.Builder() .orderedScan(true).unorderedScan(true).batchMutation(true) .multiQuery(true).distributed(true).keyOrdered(true).storeTTL(true) .cellTTL(true).timestamps(true).preferredTimestamps(PREFERRED_TIMESTAMPS) .optimisticLocking(true).keyConsistent(c); try { fb.localKeyPartition(getDeployment() == Deployment.LOCAL); } catch (Exception e) { logger.warn("Unexpected exception during getDeployment()", e); } return fb.build(); }
public InMemoryStoreManager(final Configuration configuration) { stores = new ConcurrentHashMap<>(); features = new StandardStoreFeatures.Builder() .orderedScan(true) .unorderedScan(true) .keyOrdered(true) .persists(false) .optimisticLocking(true) .keyConsistent(GraphDatabaseConfiguration.buildGraphConfiguration()) .build(); // features = new StoreFeatures(); // features.supportsOrderedScan = true; // features.supportsUnorderedScan = true; // features.supportsBatchMutation = false; // features.supportsTxIsolation = false; // features.supportsConsistentKeyOperations = true; // features.supportsLocking = false; // features.isDistributed = false; // features.supportsMultiQuery = false; // features.isKeyOrdered = true; // features.hasLocalKeyPartition = false; }