Class MongoDBRepository

    • Field Detail

      • LONG_ZERO

        public static final Long LONG_ZERO
      • ZERO

        public static final Double ZERO
      • ONE

        public static final Double ONE
      • SEQUENCE_RANDOMIZED_BLOCKSIZE_DEFAULT

        protected static final int SEQUENCE_RANDOMIZED_BLOCKSIZE_DEFAULT
        See Also:
        Constant Field Values
      • MAX_TIME_DEFAULT

        protected static final Duration MAX_TIME_DEFAULT
        Default maximum execution time for a query.
        Since:
        11.1
      • SETTING_DENORMALIZED_BLOB_KEYS

        protected static final String SETTING_DENORMALIZED_BLOB_KEYS
        Settings key to determine whether ecm:blobKeys is supported.

        The value is true on new or migrated repositories.

        See Also:
        Constant Field Values
      • idKey

        protected String idKey
        The key to use to store the id in the database.
      • sequenceBlockSize

        protected long sequenceBlockSize
        Sequence allocation block size.
      • mongoClient

        protected final com.mongodb.client.MongoClient mongoClient
      • coll

        protected final com.mongodb.client.MongoCollection<org.bson.Document> coll
      • countersColl

        protected final com.mongodb.client.MongoCollection<org.bson.Document> countersColl
      • settingsColl

        protected final com.mongodb.client.MongoCollection<org.bson.Document> settingsColl
      • supportsSessions

        protected final boolean supportsSessions
      • supportsTransactions

        protected final boolean supportsTransactions
      • maxTimeMS

        protected final long maxTimeMS
        Maximum execution time for a query when outside of a transaction.
        Since:
        11.1
      • supportsDenormalizedBlobKeys

        protected boolean supportsDenormalizedBlobKeys
      • indexInitialized

        protected volatile boolean indexInitialized
      • binaryKeys

        protected org.bson.conversions.Bson binaryKeys
        Keys used for document projection when marking all binaries for GC.

        Used when denormalized ecm:blobKeys is not available.

    • Method Detail

      • initRepository

        protected void initRepository()
      • initSettings

        protected void initSettings()
      • updateCapabilities

        public void updateCapabilities()
        Description copied from interface: DBSRepository
        Update repository capabilities after a migration. Internal use only.
      • readSettings

        protected void readSettings()
      • initCapabilities

        protected void initCapabilities()
      • getConnection

        public MongoDBConnection getConnection()
        Description copied from interface: DBSRepository
        Gets a new connection to this repository.
        Returns:
        a new connection
      • supportsSessions

        protected boolean supportsSessions()
      • getClient

        protected com.mongodb.client.MongoClient getClient()
      • getCollection

        protected com.mongodb.client.MongoCollection<org.bson.Document> getCollection()
      • getCountersCollection

        protected com.mongodb.client.MongoCollection<org.bson.Document> getCountersCollection()
      • getIdKey

        protected String getIdKey()
      • markReferencedBlobs

        public void markReferencedBlobs​(BiConsumer<String,​String> markerCallback)
        Description copied from interface: Repository
        Marks the blobs in use by passing them to the provided callback (taking the blob key and the repository name).
      • markReferencedBlobsDenormalized

        protected void markReferencedBlobsDenormalized​(org.bson.Document ob,
                                                       BiConsumer<String,​String> markReferencedBlob)
      • markReferencedBlobs

        protected void markReferencedBlobs​(org.bson.Document ob,
                                           BiConsumer<String,​String> markerCallback)