Class GridFSBuckets


  • public final class GridFSBuckets
    extends java.lang.Object
    A factory for GridFSBucket instances.
    Since:
    3.1
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static GridFSBucket create​(MongoDatabase database)
      Create a new GridFS bucket with the default 'fs' bucket name
      static GridFSBucket create​(MongoDatabase database, java.lang.String bucketName)
      Create a new GridFS bucket with a custom bucket name
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static GridFSBucket create​(MongoDatabase database)
        Create a new GridFS bucket with the default 'fs' bucket name
        Parameters:
        database - the database instance to use with GridFS
        Returns:
        the GridFSBucket
      • create

        public static GridFSBucket create​(MongoDatabase database,
                                          java.lang.String bucketName)
        Create a new GridFS bucket with a custom bucket name
        Parameters:
        database - the database instance to use with GridFS
        bucketName - the custom bucket name to use
        Returns:
        the GridFSBucket