Class CursorPool

java.lang.Object
org.restheart.mongodb.db.CursorPool

public class CursorPool extends Object
Author:
Andrea Di Cesare <andrea@softinstigate.com>
  • Field Details

    • MIN_SKIP_DISTANCE_PERCENTAGE

      public static final double MIN_SKIP_DISTANCE_PERCENTAGE
      Cursor in the pool won't be used if
      REQUESTED_SKIPS - POOL_SKIPS > MIN_SKIP_DISTANCE_PERCENTAGE * REQUESTED_SKIPS.
      The cursor from the pool need to be iterated via the next() method (REQUESTED_SKIPS - POOL_SKIPS) times to reach the requested page; since skip() is more efficient than next(), using the cursor in the pool is worthwhile only if next() has to be used less than MIN_SKIP_DISTANCE_PERCENTAGE * REQUESTED_SKIPS times.
      See Also:
      Constant Field Values
  • Method Details