1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. 2 // This source code is licensed under both the GPLv2 (found in the 3 // COPYING file in the root directory) and Apache 2.0 License 4 // (found in the LICENSE.Apache file in the root directory). 5 6 package org.rocksdb; 7 8 9 interface TransactionalOptions<T extends TransactionalOptions<T>> 10 extends AutoCloseable { 11 12 /** 13 * True indicates snapshots will be set, just like if 14 * {@link Transaction#setSnapshot()} had been called 15 * 16 * @return whether a snapshot will be set 17 */ isSetSnapshot()18 boolean isSetSnapshot(); 19 20 /** 21 * Setting the setSnapshot to true is the same as calling 22 * {@link Transaction#setSnapshot()}. 23 * 24 * Default: false 25 * 26 * @param setSnapshot Whether to set a snapshot 27 * 28 * @return this TransactionalOptions instance 29 */ setSetSnapshot(final boolean setSnapshot)30 T setSetSnapshot(final boolean setSnapshot); 31 } 32