Class EmptyMongoCursor<TResult>

java.lang.Object
fr.gouv.vitam.common.database.server.mongodb.EmptyMongoCursor<TResult>
Type Parameters:
TResult - The type of documents the cursor is supposed to contain
All Implemented Interfaces:
com.mongodb.client.MongoCursor<TResult>, Closeable, AutoCloseable, Iterator<TResult>

public class EmptyMongoCursor<TResult> extends Object implements com.mongodb.client.MongoCursor<TResult>
Empty mongo cursor implementation to use in place of a real MongoCursor
  • Constructor Details

    • EmptyMongoCursor

      public EmptyMongoCursor()
      the constructor
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface com.mongodb.client.MongoCursor<TResult>
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<TResult>
      Specified by:
      hasNext in interface com.mongodb.client.MongoCursor<TResult>
    • next

      public TResult next()
      Specified by:
      next in interface Iterator<TResult>
      Specified by:
      next in interface com.mongodb.client.MongoCursor<TResult>
    • available

      public int available()
      Specified by:
      available in interface com.mongodb.client.MongoCursor<TResult>
    • tryNext

      public TResult tryNext()
      Specified by:
      tryNext in interface com.mongodb.client.MongoCursor<TResult>
    • getServerCursor

      public com.mongodb.ServerCursor getServerCursor()
      Specified by:
      getServerCursor in interface com.mongodb.client.MongoCursor<TResult>
    • getServerAddress

      public com.mongodb.ServerAddress getServerAddress()
      Specified by:
      getServerAddress in interface com.mongodb.client.MongoCursor<TResult>