C
- The cursor type.O
- The cursor item type.R
- The result type.public class CursorService<C,O,R> extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<String,CursorResult<C,O>> |
cursorResults |
protected Function<O,R> |
extractor |
Constructor and Description |
---|
CursorService(Function<O,R> extractor) |
Modifier and Type | Method and Description |
---|---|
void |
checkForTimedOutScroll() |
void |
clear()
Clear and close all cursors owned by this service.
|
protected boolean |
isScrollTimedOut(String scrollId,
CursorResult<C,O> cursorResult) |
String |
registerCursor(C cursor,
int batchSize,
int keepAliveSeconds)
Registers the input
C and generates a new scrollId to associate with. |
String |
registerCursor(String scrollId,
C cursor,
int batchSize,
int keepAliveSeconds)
Registers the input
C associated to the input scrollId . |
String |
registerCursorResult(CursorResult<C,O> cursorResult)
Registers the input
CursorResult and generates a new scrollId to associate with. |
String |
registerCursorResult(String scrollId,
CursorResult<C,O> cursorResult)
Registers the input
CursorResult associated to the input scrollId . |
ScrollResult<R> |
scroll(String scrollId) |
boolean |
unregisterCursor(String scrollId)
Unregisters cursor associated to the input
scrollId . |
protected final Map<String,CursorResult<C,O>> cursorResults
public CursorService(Function<O,R> extractor)
public void checkForTimedOutScroll()
protected boolean isScrollTimedOut(String scrollId, CursorResult<C,O> cursorResult)
public String registerCursor(C cursor, int batchSize, int keepAliveSeconds)
C
and generates a new scrollId
to associate with.public String registerCursor(String scrollId, C cursor, int batchSize, int keepAliveSeconds)
C
associated to the input scrollId
.public String registerCursorResult(CursorResult<C,O> cursorResult)
CursorResult
and generates a new scrollId
to associate with.public String registerCursorResult(String scrollId, CursorResult<C,O> cursorResult)
CursorResult
associated to the input scrollId
.public boolean unregisterCursor(String scrollId)
scrollId
.scrollId
- The scoll id of CursorResult
to unregisterpublic ScrollResult<R> scroll(String scrollId)
scrollId
public void clear()
Copyright © 2018 Nuxeo. All rights reserved.