Package org.apache.bookkeeper.metastore
Interface MetastoreCursor
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
InMemoryMetastoreCursor
A Metastore Cursor.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA callback for reading entries. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidasyncReadEntries(int numEntries, MetastoreCursor.ReadEntriesCallback callback, Object ctx) Asynchronously read entries from the cursor, up to the specifiednumEntries.booleanIs there any entries left in the cursor to read.readEntries(int numEntries) Read entries from the cursor, up to the specifiednumEntries.
-
Field Details
-
EMPTY_CURSOR
-
-
Method Details
-
hasMoreEntries
boolean hasMoreEntries()Is there any entries left in the cursor to read.- Returns:
- true if there is entries left, false otherwise.
-
readEntries
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.
-
asyncReadEntries
Asynchronously read entries from the cursor, up to the specifiednumEntries.- Parameters:
numEntries- maximum number of entries to readcallback- callback objectctx- opaque context- See Also:
-