Package com.apple.foundationdb.record
Class ScanProperties
java.lang.Object
com.apple.foundationdb.record.ScanProperties
A group of properties that pertain to a single scan.
Among these properties is an
ExecuteProperties, which holds the properties that pertain to an entire
execution.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionScanProperties(ExecuteProperties executeProperties) Creates scan properties.ScanProperties(ExecuteProperties executeProperties, boolean reverse) Creates scan properties.ScanProperties(ExecuteProperties executeProperties, boolean reverse, CursorStreamingMode cursorStreamingMode) Creates scan properties. -
Method Summary
Modifier and TypeMethodDescriptionGet cursor streaming mode.Get execute properties for this scan properties.booleanGet direction of scans.setReverse(boolean reverse) Change direction of scans.setStreamingMode(CursorStreamingMode cursorStreamingMode) Set cursor streaming mode.toString()with(Function<ExecuteProperties, ExecuteProperties> modifier) Change execute properties.
-
Field Details
-
FORWARD_SCAN
-
REVERSE_SCAN
-
-
Constructor Details
-
ScanProperties
Creates scan properties.- Parameters:
executeProperties- the execution properties (such as isolation level and row limit) associated with this scan
-
ScanProperties
Creates scan properties.- Parameters:
executeProperties- the execution properties (such as isolation level and row limit) associated with this scanreverse- if true, the scan direction will be reversed
-
ScanProperties
public ScanProperties(@Nonnull ExecuteProperties executeProperties, boolean reverse, @Nonnull CursorStreamingMode cursorStreamingMode) Creates scan properties.- Parameters:
executeProperties- the execution properties (such as isolation level and row limit) associated with this scanreverse- if true, the scan direction will be reversedcursorStreamingMode- streaming mode to use if opening an FDB cursor
-
-
Method Details
-
isReverse
public boolean isReverse()Get direction of scans.- Returns:
trueif scan is in reverse order
-
getExecuteProperties
Get execute properties for this scan properties.- Returns:
- execute properties for this scan properties.
-
with
@Nonnull public ScanProperties with(@Nonnull Function<ExecuteProperties, ExecuteProperties> modifier) Change execute properties.- Parameters:
modifier- a function to produce a new execute properties from the current one- Returns:
- a new scan properties with updated execute properties
-
setReverse
Change direction of scans.- Parameters:
reverse-trueif scan is in reverse order- Returns:
- a new scan properties with given direction
-
getCursorStreamingMode
Get cursor streaming mode.- Returns:
- cursor streaming mode
-
setStreamingMode
Set cursor streaming mode.- Parameters:
cursorStreamingMode- cursor streaming mode to set- Returns:
- a new scan properties with given streaming mode
-
toString
-