Class AbstractMongoDatabase<P>

  • All Implemented Interfaces:
    MongoDatabase

    public abstract class AbstractMongoDatabase<P>
    extends java.lang.Object
    implements MongoDatabase
    • Field Detail

      • databaseName

        protected final java.lang.String databaseName
    • Constructor Detail

      • AbstractMongoDatabase

        protected AbstractMongoDatabase​(java.lang.String databaseName,
                                        MongoBackend backend)
    • Method Detail

      • initializeNamespacesAndIndexes

        protected void initializeNamespacesAndIndexes()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • dropIndex

        protected void dropIndex​(MongoCollection<P> collection,
                                 java.lang.String indexName)
      • getFileSize

        protected abstract long getFileSize()
      • getStorageSize

        protected abstract long getStorageSize()
      • handleClose

        public void handleClose​(io.netty.channel.Channel channel)
        Specified by:
        handleClose in interface MongoDatabase
      • openOrCreateUniqueIndex

        protected abstract Index<P> openOrCreateUniqueIndex​(java.lang.String collectionName,
                                                            java.lang.String indexName,
                                                            java.util.List<IndexKey> keys,
                                                            boolean sparse)
      • createCollection

        protected MongoCollection<P> createCollection​(java.lang.String collectionName)
      • openOrCreateCollection

        protected abstract MongoCollection<P> openOrCreateCollection​(java.lang.String collectionName,
                                                                     java.lang.String idField)
      • dropCollection

        public void dropCollection​(java.lang.String collectionName)
        Specified by:
        dropCollection in interface MongoDatabase