BookKeeper.asyncDeleteLedger
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.apache.bookkeeper.client.BookKeeper.asyncDeleteLedger(Showing top 3 results out of 315)

origin: org.apache.bookkeeper/bookkeeper-server

/**
 * Synchronous call to delete a ledger. Parameters match those of
 * {@link #asyncDeleteLedger(long, AsyncCallback.DeleteCallback, Object)}
 *
 * @param lId
 *            ledgerId
 * @throws InterruptedException
 * @throws BKException.BKNoSuchLedgerExistsException if the ledger doesn't exist
 * @throws BKException
 */
@SuppressWarnings("unchecked")
public void deleteLedger(long lId) throws InterruptedException, BKException {
  CompletableFuture<Void> future = new CompletableFuture<>();
  SyncDeleteCallback result = new SyncDeleteCallback(future);
  // Call asynchronous version
  asyncDeleteLedger(lId, result, null);
  SyncCallbackUtils.waitForResult(future);
}
origin: twitter/bookkeeper

/**
 * Synchronous call to delete a ledger. Parameters match those of
 * {@link #asyncDeleteLedger(long, AsyncCallback.DeleteCallback, Object)}
 *
 * @param lId
 *            ledgerId
 * @throws InterruptedException
 * @throws BKException.BKNoSuchLedgerExistsException if the ledger doesn't exist
 * @throws BKException
 */
public void deleteLedger(long lId) throws InterruptedException, BKException {
  SyncCounter counter = new SyncCounter();
  counter.inc();
  // Call asynchronous version
  asyncDeleteLedger(lId, new SyncDeleteCallback(), counter);
  // Wait
  counter.block(0);
  if (counter.getrc() != BKException.Code.OK) {
    LOG.error("Error deleting ledger " + lId + " : " + counter.getrc());
    throw BKException.create(counter.getrc());
  }
}
origin: twitter/bookkeeper

bk.asyncDeleteLedger(lh.getId(), cb, openLatch);
org.apache.bookkeeper.clientBookKeeperasyncDeleteLedger

Javadoc

Deletes a ledger asynchronously.

Popular methods of BookKeeper

  • openLedgerNoRecovery
    Synchronous, unsafe open ledger call
  • <init>
  • close
    Shuts down client.
  • createLedger
    Creates a new ledger. Default of 3 servers, and quorum of 2 servers.
  • asyncCreateLedger
    Creates a new ledger asynchronously. To create a ledger, we need to specify the ensemble size, the q
  • asyncOpenLedger
    Open existing ledger asynchronously for reading. Opening a ledger with this method invokes fencing a
  • deleteLedger
    Synchronous call to delete a ledger. Parameters match those of #asyncDeleteLedger(long,AsyncCallback
  • newBuilder
  • openLedger
    Synchronous open ledger call
  • asyncCreateLedgerAdv
  • asyncIsClosed
    Check asynchronously whether the ledger with identifier lId has been closed.
  • asyncOpenLedgerNoRecovery
    Open existing ledger asynchronously for reading, but it does not try to recover the ledger if it is
  • asyncIsClosed,
  • asyncOpenLedgerNoRecovery,
  • checkForFaultyBookies,
  • createLedgerAdv,
  • forConfig,
  • getAddOpLogger,
  • getBookieClient,
  • getBookieInfo,
  • getBookieWatcher

Popular classes and methods

  • getSharedPreferences (Context)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • notifyDataSetChanged (ArrayAdapter)
  • Container (java.awt)
  • File (java.io)
    LocalStorage based File implementation for GWT. Should probably have used Harmony as a starting poin
  • Proxy (java.net)
    This class represents a proxy setting, typically a type (http, socks) and a socket address. A Proxy
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • Path (java.nio.file)
  • ArrayList (java.util)
    Resizable-array implementation of the List interface.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)