@InterfaceAudience.Public @InterfaceStability.Stable public class InterfaceAudience {
@Public @Evolving public interface KVMulti<K, V> {
@Public @Evolving public interface KVStoreWriteView<K, V> {
@Public @Unstable public interface Handle extends AutoCloseable {
@InterfaceAudience.Public @InterfaceStability.Stable interface AddCallback extends AddCallbackWithLatency {
/** * Annotation to inform users of how much to rely on a particular package, * class or method not changing over time. */ @InterfaceAudience.Public @InterfaceStability.Stable public class InterfaceStability { /** * Can evolve while retaining compatibility for minor release boundaries.; * can break compatibility only at major release (ie. at m.0). */ @Documented public @interface Stable {}; /** * Evolving, but can break compatibility at minor release (i.e. m.x) */ @Documented public @interface Evolving {}; /** * No guarantee is provided as to reliability or stability across any * level of release granularity. */ @Documented public @interface Unstable {}; private InterfaceStability() {} }
@Public @Evolving public interface MVCCAsyncStoreWriteView<K, V> {
/** * Async Callback for reading entries from ledgers. * * @since 4.0 */ @InterfaceAudience.Public @InterfaceStability.Stable interface ReadCallback { /** * Callback declaration. * * @param rc * return code * @param lh * ledger handle * @param seq * sequence of entries * @param ctx * context object */ void readComplete(int rc, LedgerHandle lh, Enumeration<LedgerEntry> seq, Object ctx); }
/** * Validator that validates configuration settings. */ @Public public interface Validator { /** * Validates the configuration value. * * @param name name of the configuration setting * @param value value of the configuration setting * @return true if it is a valid value, otherwise false. */ boolean validate(String name, Object value); /** * Return the documentation for a given validator. * * @return the documentation for a given validator */ default String documentation() { return ""; } }
/** * Async Callback for long polling read request. * * @since 4.5 */ @InterfaceAudience.Public @InterfaceStability.Stable interface ReadLastConfirmedAndEntryCallback { /** * Callback definition for bookie operation that allows reading the last add confirmed * along with an entry within the last add confirmed range. * * @param rc Return code * @param lastConfirmed The entry id of the last confirmed write or * {@link LedgerHandle#INVALID_ENTRY_ID INVALID_ENTRY_ID} * if no entry has been confirmed * @param entry The entry since the lastAddConfirmed entry that was specified when the request * was initiated * @param ctx context object */ void readLastConfirmedAndEntryComplete(int rc, long lastConfirmed, LedgerEntry entry, Object ctx); }
/** * Async Callback for adding entries to ledgers with latency information. * * @since 4.7 */ @InterfaceAudience.Public @InterfaceStability.Evolving interface AddCallbackWithLatency { /** * Callback declaration which additionally passes quorum write complete latency. * * @param rc * return code * @param lh * ledger handle * @param entryId * entry identifier * @param qwcLatency * QuorumWriteComplete Latency * @param ctx * context object */ void addCompleteWithLatency(int rc, LedgerHandle lh, long entryId, long qwcLatency, Object ctx); }
/** * Provide the ability to enforce durability guarantees to the writer. * * @see WriteAdvHandle * @see WriteHandle * * @since 4.8 */ @Public @Unstable public interface ForceableHandle { /** * Enforce durability to the entries written by this handle. * <p>This API is useful with {@link WriteFlag#DEFERRED_SYNC}, because with * that flag writes are acknowledged by the bookie without waiting for a * durable write * </p> * * @return an handle to the result */ CompletableFuture<Void> force(); }
/** * A read-only view of a key/value store. It only supports read-only operations. * * <p>The implementation of this class should be thread-safe. */ @Public @Evolving public interface KVStoreReadView<K, V> { /** * Return the value associated with this key. * * @param key key to retrieve the value * @return the value associated with this key. */ V get(K key); /** * Return an {@link KVIterator} to iterate a range of keys. * * @param from the first key * @param to the last key * @return a k/v iterator */ KVIterator<K, V> range(K from, K to); }
/** * Async Callback for reading LAC for ledgers. * * @since 4.0 */ @InterfaceAudience.Public @InterfaceStability.Stable interface ReadLastConfirmedCallback { /** * Callback definition for bookie recover operations. * * @param rc Return code * @param lastConfirmed The entry id of the last confirmed write or * {@link LedgerHandle#INVALID_ENTRY_ID INVALID_ENTRY_ID} * if no entry has been confirmed * @param ctx * context object */ void readLastConfirmedComplete(int rc, long lastConfirmed, Object ctx); }
/** * Async Callback for closing ledgers. * * @since 4.0 */ @InterfaceAudience.Public @InterfaceStability.Stable interface CloseCallback { /** * Callback definition. * * @param rc * return code * @param lh * ledger handle * @param ctx * context object */ void closeComplete(int rc, LedgerHandle lh, Object ctx); }
/** * Class that may be configured with a {@link Configuration}. */ @Public @Stable public interface Configurable { /** * Set the configuration to be used by this object. * * @param conf * Configuration object to use */ void setConf(Configuration conf); /** * Return the configuration used by this object. * * @return configuration used by this object. */ Configuration getConf(); }
/** * Async Callback for checking if a ledger is closed. * * @since 4.0 */ @InterfaceAudience.Public @InterfaceStability.Stable interface IsClosedCallback { /** * Callback definition for isClosed operation. * * @param rc * return code * @param isClosed * true if ledger is closed */ void isClosedComplete(int rc, boolean isClosed, Object ctx); } }
/** * Async Callback for opening ledgers. * * @since 4.0 */ @InterfaceAudience.Public @InterfaceStability.Stable interface OpenCallback { /** * Callback for asynchronous call to open ledger. * * @param rc * Return code * @param lh * ledger handle * @param ctx * context object */ void openComplete(int rc, LedgerHandle lh, Object ctx); }
/** * Async Callback for creating ledgers. * * @since 4.0 */ @InterfaceAudience.Public @InterfaceStability.Stable interface CreateCallback { /** * Declaration of callback method. * * @param rc * return status * @param lh * ledger handle * @param ctx * context object */ void createComplete(int rc, LedgerHandle lh, Object ctx); }
/** * Async Callback for updating LAC for ledgers. * * @since 4.5 */ @InterfaceAudience.Public @InterfaceStability.Stable interface AddLacCallback { /** * Callback declaration. * * @param rc * return code * @param lh * ledger handle * @param ctx * context object */ void addLacComplete(int rc, LedgerHandle lh, Object ctx); }