Class ScanProperties

java.lang.Object
com.apple.foundationdb.record.ScanProperties

@API(UNSTABLE) public class ScanProperties extends Object
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 Details

  • Constructor Details

    • 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 scan
      reverse - 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 scan
      reverse - if true, the scan direction will be reversed
      cursorStreamingMode - streaming mode to use if opening an FDB cursor
  • Method Details

    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object