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(); }
/** * Construct a Builder whose default values exactly match the values on * the supplied {@code template}. */ public Builder(StoreFeatures template) { unorderedScan(template.hasUnorderedScan()); orderedScan(template.hasOrderedScan()); multiQuery(template.hasMultiQuery()); locking(template.hasLocking()); batchMutation(template.hasBatchMutation()); localKeyPartition(template.hasLocalKeyPartition()); keyOrdered(template.isKeyOrdered()); distributed(template.isDistributed()); transactional(template.hasTxIsolation()); timestamps(template.hasTimestamps()); preferredTimestamps(template.getPreferredTimestamps()); cellTTL(template.hasCellTTL()); storeTTL(template.hasStoreTTL()); visibility(template.hasVisibility()); persists(template.supportsPersistence()); if (template.isKeyConsistent()) { keyConsistent(template.getKeyConsistentTxConfig(), template.getLocalKeyConsistentTxConfig()); } scanTxConfig(template.getScanTxConfig()); supportsInterruption(template.supportsInterruption()); optimisticLocking(template.hasOptimisticLocking()); }