Examples of CloseCallback


Examples of org.apache.bookkeeper.client.AsyncCallback.CloseCallback

            return;
        }

        if (rc == BKException.Code.NoSuchEntryException || rc == BKException.Code.NoSuchLedgerExistsException) {
            lh.asyncCloseInternal(new CloseCallback() {
                @Override
                public void closeComplete(int rc, LedgerHandle lh, Object ctx) {
                    if (rc != KeeperException.Code.OK.intValue()) {
                        LOG.warn("Close failed: " + BKException.getMessage(rc));
                        cb.operationComplete(BKException.Code.ZKException, null);
View Full Code Here

Examples of org.apache.bookkeeper.client.AsyncCallback.CloseCallback

            lh.asyncRecoveryAddEntry(data, 0, data.length, this, null);
            return;
        }

        if (rc == BKException.Code.NoSuchEntryException || rc == BKException.Code.NoSuchLedgerExistsException) {
            lh.asyncCloseInternal(new CloseCallback() {
                @Override
                public void closeComplete(int rc, LedgerHandle lh, Object ctx) {
                    if (rc != BKException.Code.OK) {
                        LOG.warn("Close failed: " + BKException.getMessage(rc));
                        cb.operationComplete(rc, null);
View Full Code Here

Examples of org.apache.bookkeeper.client.AsyncCallback.CloseCallback

            lh.asyncRecoveryAddEntry(data, 0, data.length, this, null);
            return;
        }

        if (rc == BKException.Code.NoSuchEntryException || rc == BKException.Code.NoSuchLedgerExistsException) {
            lh.asyncCloseInternal(new CloseCallback() {
                @Override
                public void closeComplete(int rc, LedgerHandle lh, Object ctx) {
                    if (rc != KeeperException.Code.OK.intValue()) {
                        LOG.warn("Close failed: " + BKException.getMessage(rc));
                        cb.operationComplete(BKException.Code.ZKException, null);
View Full Code Here

Examples of org.apache.bookkeeper.client.AsyncCallback.CloseCallback

            lh.asyncRecoveryAddEntry(data, 0, data.length, this, null);
            return;
        }

        if (rc == BKException.Code.NoSuchEntryException || rc == BKException.Code.NoSuchLedgerExistsException) {
            lh.asyncCloseInternal(new CloseCallback() {
                @Override
                public void closeComplete(int rc, LedgerHandle lh, Object ctx) {
                    if (rc != KeeperException.Code.OK.intValue()) {
                        LOG.warn("Close failed: " + BKException.getMessage(rc));
                        cb.operationComplete(BKException.Code.ZKException, null);
View Full Code Here

Examples of org.apache.bookkeeper.client.AsyncCallback.CloseCallback

            closeLastTopicLedgerAndOpenNewOne(topicInfo);
        }

        private void closeLastTopicLedgerAndOpenNewOne(final TopicInfo topicInfo) {
            final long ledgerId = topicInfo.currentLedgerRange.handle.getId();
            topicInfo.currentLedgerRange.handle.asyncClose(new CloseCallback() {
                AtomicBoolean processed = new AtomicBoolean(false);
                @Override
                public void closeComplete(int rc, LedgerHandle lh, Object ctx) {
                    if (!processed.compareAndSet(false, true)) {
                        return;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.