Class CursorResult<C,​O>

    • Field Detail

      • cursor

        protected C cursor
      • batchSize

        protected final int batchSize
      • keepAliveSeconds

        protected final int keepAliveSeconds
      • lastCallTimestamp

        protected volatile long lastCallTimestamp
    • Constructor Detail

      • CursorResult

        public CursorResult​(C cursor,
                            int batchSize,
                            int keepAliveSeconds)
    • Method Detail

      • getCursor

        public C getCursor()
      • getBatchSize

        public int getBatchSize()
      • touch

        public void touch()
      • timedOut

        public boolean timedOut()
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface Iterator<C>
      • next

        public O next()
        Specified by:
        next in interface Iterator<C>
      • close

        public void close()
        CAUTION: if your cursor doesn't implement Closeable, we just set the field to null
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable