T - the generic type of the actual Cursor types that will be producedpublic abstract class ManagedCursorProvider<T extends org.mule.runtime.api.streaming.Cursor> extends Object implements org.mule.runtime.api.streaming.CursorProvider<T>
CursorProvider decorator which makes sure that cursors
opened by the decorated provider are properly tracked through the CursorManager.CursorManager| Modifier | Constructor and Description |
|---|---|
protected |
ManagedCursorProvider(CursorContext cursorContext,
CursorManager cursorManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected CursorManager |
getCursorManager() |
boolean |
isClosed() |
protected abstract T |
managedCursor(T cursor,
CursorContext handle)
Returns a managed version of the
cursor. |
T |
openCursor()
Gets a cursor from the
delegate and registers it through CursorManager.onOpen(Cursor, CursorContext). |
void |
releaseResources() |
protected ManagedCursorProvider(CursorContext cursorContext, CursorManager cursorManager)
public final T openCursor()
delegate and registers it through CursorManager.onOpen(Cursor, CursorContext).
The returned cursor will also be managed through the means of managedCursor(Cursor, CursorContext)
openCursor in interface org.mule.runtime.api.streaming.CursorProvider<T extends org.mule.runtime.api.streaming.Cursor>Cursorprotected abstract T managedCursor(T cursor, CursorContext handle)
cursor. How will that cursor be managed depends on each
implementation. Although it is possible that the same input cursor is returned, the assumption
should be that a new instance will be returned.cursor - the cursor to managehandle - the CursorContextCursorpublic void releaseResources()
releaseResources in interface org.mule.runtime.api.streaming.CursorProvider<T extends org.mule.runtime.api.streaming.Cursor>public void close()
close in interface org.mule.runtime.api.streaming.CursorProvider<T extends org.mule.runtime.api.streaming.Cursor>public boolean isClosed()
isClosed in interface org.mule.runtime.api.streaming.CursorProvider<T extends org.mule.runtime.api.streaming.Cursor>protected CursorManager getCursorManager()
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.