@NotNull @Override public ReadPreference getReadPreference() { return db.getReadPreference(); }
public MongoBlobStore(MongoDatabase db, long cacheSize) { super(cacheSize); // use a block size of 2 MB - 1 KB, because MongoDB rounds up the // space allocated for a record to the next power of two // (there is an overhead per record, let's assume it is 1 KB at most) setBlockSize(2 * 1024 * 1024 - 1024); defaultReadPreference = db.getReadPreference(); blobCollection = initBlobCollection(db); }
public MongoBlobStore(MongoDatabase db, long cacheSize) { super(cacheSize); // use a block size of 2 MB - 1 KB, because MongoDB rounds up the // space allocated for a record to the next power of two // (there is an overhead per record, let's assume it is 1 KB at most) setBlockSize(2 * 1024 * 1024 - 1024); defaultReadPreference = db.getReadPreference(); blobCollection = initBlobCollection(db); }