Package org.apache.bookkeeper.metastore

Examples of org.apache.bookkeeper.metastore.MetastoreCursor$ReadEntriesCallback


        if (syn.getReturnCode() != MSException.Code.OK.getCode()) {
            throw new IOException("Failed to get topics : ", MSException.create(
                    MSException.Code.get(syn.getReturnCode()), ""));
        }

        final MetastoreCursor cursor = syn.getValue();
        return new Iterator<ByteString>() {
            Iterator<MetastoreTableItem> itemIter = null;

            @Override
            public boolean hasNext() {
                while (null == itemIter || !itemIter.hasNext()) {
                    if (!cursor.hasMoreEntries()) {
                        return false;
                    }

                    try {
                        itemIter = cursor.readEntries(cfg.getMetastoreMaxEntriesPerScan());
                    } catch (MSException mse) {
                        logger.warn("Interrupted when iterating the topics list : ", mse);
                        return false;
                    }
                }
View Full Code Here

TOP

Related Classes of org.apache.bookkeeper.metastore.MetastoreCursor$ReadEntriesCallback

Copyright © 2018 www.massapicom. 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.