@LimitedPrivate @Evolving public interface LedgerOffloaderFactory<T extends LedgerOffloader> {
/** * Builder-style interface to create new ledgers. * * @since 4.6 * @see BookKeeper#newCreateLedgerOp() */ @Public @Unstable public interface CreateAdvBuilder extends OpBuilder<WriteAdvHandle> { /** * Set a fixed ledgerId for the newly created ledger. If no explicit ledgerId is passed a new ledger id will be * assigned automatically. * * @param ledgerId * * @return the builder itself */ CreateAdvBuilder withLedgerId(long ledgerId); }
/** * Async Callback for recovering ledgers. * * @since 4.0 */ @InterfaceAudience.Public @InterfaceStability.Stable interface RecoverCallback { /** * Callback definition for bookie recover operations. * * @param rc * return code * @param ctx * context object */ void recoverComplete(int rc, Object ctx); }
/** * BookieShell command. */ @Private public interface Command { int runCmd(String[] args) throws Exception; String description(); void printUsage(); }
/** * Base interface for builders. * * @since 4.6 */ @Public @Unstable public interface OpBuilder<T> { /** * Start the operation and return an handle to the result. * * @return an handle to access the result of the operation * * @see FutureUtils#result(java.util.concurrent.CompletableFuture) to have a simple method to access the result */ CompletableFuture<T> execute(); }
/** * The read view for a {@link MVCCAsyncStore}. * * @param <K> key type * @param <V> value type */ @Public @Evolving public interface MVCCAsyncStoreReadView<K, V> { CompletableFuture<V> get(K key); CompletableFuture<KeyValue<K, V>> getKeyValue(K key); CompletableFuture<List<KeyValue<K, V>>> range(K key, K endKey); CompletableFuture<RangeResult<K, V>> range(RangeOp<K, V> rangeOp); }
/** * A mvcc store that supports synchronous operations. * * @param <K> key type * @param <V> value type */ @Public @Evolving public interface MVCCStore<K, V> extends StateStore, MVCCStoreWriteView<K, V>, MVCCStoreReadView<K, V> { /** * Return the operator factory to build operators. * * @return operator factory. */ OpFactory<K, V> getOpFactory(); }
/** * Iterator to iterate key/value pairs of the read-view of a k/v store. */ @Public @Evolving public interface KVIterator<K, V> extends Iterator<KV<K, V>>, AutoCloseable { /** * Close the iterator to release resources held by this iterator. * * <p>The users of this interface should be responsible for closing the iterator. */ @Override void close(); }
/** * A compare operator used in a {@link org.apache.bookkeeper.api.kv.Txn}. * * @param <K> key type * @param <V> value type */ @Public @Evolving public interface CompareOp<K, V> extends AutoCloseable { CompareTarget target(); CompareResult result(); K key(); V value(); long revision(); @Override void close(); }