Package com.apple.foundationdb.record
Class ScanProperties
- java.lang.Object
-
- com.apple.foundationdb.record.ScanProperties
-
@API(MAINTAINED) public class ScanProperties extends Object
A group of properties that pertain to a single scan. Among these properties is anExecuteProperties
, which holds the properties that pertain to an entire execution.
-
-
Field Summary
Fields Modifier and Type Field Description static ScanProperties
FORWARD_SCAN
static ScanProperties
REVERSE_SCAN
-
Constructor Summary
Constructors Constructor Description ScanProperties(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CursorStreamingMode
getCursorStreamingMode()
Get cursor streaming mode.ExecuteProperties
getExecuteProperties()
Get execute properties for this scan properties.boolean
isReverse()
Get direction of scans.ScanProperties
setReverse(boolean reverse)
Change direction of scans.ScanProperties
setStreamingMode(CursorStreamingMode cursorStreamingMode)
Set cursor streaming mode.String
toString()
ScanProperties
with(Function<ExecuteProperties,ExecuteProperties> modifier)
Change execute properties.
-
-
-
Field Detail
-
FORWARD_SCAN
public static final ScanProperties FORWARD_SCAN
-
REVERSE_SCAN
public static final ScanProperties REVERSE_SCAN
-
-
Constructor Detail
-
ScanProperties
public ScanProperties(@Nonnull ExecuteProperties executeProperties)
Creates scan properties.- Parameters:
executeProperties
- the execution properties (such as isolation level and row limit) associated with this scan
-
ScanProperties
public ScanProperties(@Nonnull ExecuteProperties executeProperties, boolean reverse)
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 Detail
-
isReverse
public boolean isReverse()
Get direction of scans.- Returns:
true
if scan is in reverse order
-
getExecuteProperties
@Nonnull public ExecuteProperties 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
@Nonnull public ScanProperties setReverse(boolean reverse)
Change direction of scans.- Parameters:
reverse
-true
if scan is in reverse order- Returns:
- a new scan properties with given direction
-
getCursorStreamingMode
@Nonnull public CursorStreamingMode getCursorStreamingMode()
Get cursor streaming mode.- Returns:
- cursor streaming mode
-
setStreamingMode
@Nonnull public ScanProperties setStreamingMode(@Nonnull CursorStreamingMode cursorStreamingMode)
Set cursor streaming mode.- Parameters:
cursorStreamingMode
- cursor streaming mode to set- Returns:
- a new scan properties with given streaming mode
-
-