Search in sources :

Example 1 with LedgerDescriptor

use of com.twitter.distributedlog.LedgerDescriptor in project distributedlog by twitter.

the class ReadAheadWorker method closeCurrentLedgerHandle.

private boolean closeCurrentLedgerHandle() {
    if (currentLH == null) {
        return true;
    }
    boolean retVal = false;
    LedgerDescriptor ld = currentLH;
    try {
        handleCache.closeLedger(ld);
        currentLH = null;
        retVal = true;
    } catch (BKException bke) {
        LOG.debug("BK Exception during closing {} : ", ld, bke);
        handleException(ReadAheadPhase.CLOSE_LEDGER, bke.getCode());
    }
    return retVal;
}
Also used : LedgerDescriptor(com.twitter.distributedlog.LedgerDescriptor) BKException(org.apache.bookkeeper.client.BKException)

Aggregations

LedgerDescriptor (com.twitter.distributedlog.LedgerDescriptor)1 BKException (org.apache.bookkeeper.client.BKException)1