Package org.apache.bookkeeper.metastore
Interface MetastoreCursor
- 
- All Superinterfaces:
- java.lang.AutoCloseable,- java.io.Closeable
 - All Known Implementing Classes:
- InMemoryMetastoreCursor
 
 public interface MetastoreCursor extends java.io.CloseableA Metastore Cursor.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceMetastoreCursor.ReadEntriesCallbackA callback for reading entries.
 - 
Field SummaryFields Modifier and Type Field Description static MetastoreCursorEMPTY_CURSOR
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidasyncReadEntries(int numEntries, MetastoreCursor.ReadEntriesCallback callback, java.lang.Object ctx)Asynchronously read entries from the cursor, up to the specifiednumEntries.booleanhasMoreEntries()Is there any entries left in the cursor to read.java.util.Iterator<MetastoreTableItem>readEntries(int numEntries)Read entries from the cursor, up to the specifiednumEntries.
 
- 
- 
- 
Field Detail- 
EMPTY_CURSORstatic final MetastoreCursor EMPTY_CURSOR 
 
- 
 - 
Method Detail- 
hasMoreEntriesboolean hasMoreEntries() Is there any entries left in the cursor to read.- Returns:
- true if there is entries left, false otherwise.
 
 - 
readEntriesjava.util.Iterator<MetastoreTableItem> readEntries(int numEntries) throws MSException Read entries from the cursor, up to the specifiednumEntries. The returned list can be smaller.- Parameters:
- numEntries- maximum number of entries to read
- Returns:
- the iterator of returned entries.
- Throws:
- MSException- when failed to read entries from the cursor.
 
 - 
asyncReadEntriesvoid asyncReadEntries(int numEntries, MetastoreCursor.ReadEntriesCallback callback, java.lang.Object ctx)Asynchronously read entries from the cursor, up to the specifiednumEntries.- Parameters:
- numEntries- maximum number of entries to read
- callback- callback object
- ctx- opaque context
- See Also:
- readEntries(int)
 
 
- 
 
-