DB(final Mongo mongo, final String name, final OperationExecutor executor) { checkDatabaseNameValidity(name); this.mongo = mongo; this.name = name; this.executor = executor; this.collectionCache = new ConcurrentHashMap<String, DBCollection>(); this.optionHolder = new Bytes.OptionHolder(mongo.getOptionHolder()); this.commandCodec = MongoClient.getCommandCodec(); }
collection = nsPart.substring(idx + 1); MongoNamespace.checkDatabaseNameValidity(database); } else { database = null;
/** * Construct an instance for the given full name. The database name is the string preceding the first {@code "."} character. * * @param fullName the non-null full namespace * @see #checkDatabaseNameValidity(String) * @see #checkCollectionNameValidity(String) */ public MongoNamespace(final String fullName) { notNull("fullName", fullName); this.fullName = fullName; this.databaseName = getDatatabaseNameFromFullName(fullName); this.collectionName = getCollectionNameFullName(fullName); checkDatabaseNameValidity(databaseName); checkCollectionNameValidity(collectionName); }
/** * Construct an instance from the given database name and collection name. * * @param databaseName the valid database name * @param collectionName the valid collection name * @see #checkDatabaseNameValidity(String) * @see #checkCollectionNameValidity(String) */ @BsonCreator public MongoNamespace(@BsonProperty("db") final String databaseName, @BsonProperty("coll") final String collectionName) { checkDatabaseNameValidity(databaseName); checkCollectionNameValidity(collectionName); this.databaseName = databaseName; this.collectionName = collectionName; this.fullName = databaseName + '.' + collectionName; }
public MongoDatabaseImpl(final String name, final CodecRegistry codecRegistry, final ReadPreference readPreference, final WriteConcern writeConcern, final boolean retryWrites, final ReadConcern readConcern, final OperationExecutor executor) { checkDatabaseNameValidity(name); this.name = notNull("name", name); this.codecRegistry = notNull("codecRegistry", codecRegistry); this.readPreference = notNull("readPreference", readPreference); this.writeConcern = notNull("writeConcern", writeConcern); this.retryWrites = retryWrites; this.readConcern = notNull("readConcern", readConcern); this.executor = notNull("executor", executor); }
CoreRemoteMongoDatabaseImpl( final String name, final CoreStitchServiceClient service ) { notNull("name", name); checkDatabaseNameValidity(name); this.name = name; this.service = service; }
DB(final Mongo mongo, final String name, final OperationExecutor executor) { checkDatabaseNameValidity(name); this.mongo = mongo; this.name = name; this.executor = executor; this.collectionCache = new ConcurrentHashMap<String, DBCollection>(); this.optionHolder = new Bytes.OptionHolder(mongo.getOptionHolder()); this.commandCodec = MongoClient.getCommandCodec(); }
collection = nsPart.substring(idx + 1); MongoNamespace.checkDatabaseNameValidity(database); } else { database = null;
/** * Construct an instance from the given database name and collection name. * * @param databaseName the valid database name * @param collectionName the valid collection name * @see #checkDatabaseNameValidity(String) * @see #checkCollectionNameValidity(String) */ @BsonCreator public MongoNamespace(@BsonProperty("db") final String databaseName, @BsonProperty("coll") final String collectionName) { checkDatabaseNameValidity(databaseName); checkCollectionNameValidity(collectionName); this.databaseName = databaseName; this.collectionName = collectionName; this.fullName = databaseName + '.' + collectionName; }
/** * Construct an instance for the given full name. The database name is the string preceding the first {@code "."} character. * * @param fullName the non-null full namespace * @see #checkDatabaseNameValidity(String) * @see #checkCollectionNameValidity(String) */ public MongoNamespace(final String fullName) { notNull("fullName", fullName); this.fullName = fullName; this.databaseName = getDatatabaseNameFromFullName(fullName); this.collectionName = getCollectionNameFullName(fullName); checkDatabaseNameValidity(databaseName); checkCollectionNameValidity(collectionName); }
public MongoDatabaseImpl(final String name, final CodecRegistry codecRegistry, final ReadPreference readPreference, final WriteConcern writeConcern, final boolean retryWrites, final ReadConcern readConcern, final OperationExecutor executor) { checkDatabaseNameValidity(name); this.name = notNull("name", name); this.codecRegistry = notNull("codecRegistry", codecRegistry); this.readPreference = notNull("readPreference", readPreference); this.writeConcern = notNull("writeConcern", writeConcern); this.retryWrites = retryWrites; this.readConcern = notNull("readConcern", readConcern); this.executor = notNull("executor", executor); }
public MongoDatabaseImpl(final String name, final CodecRegistry codecRegistry, final ReadPreference readPreference, final WriteConcern writeConcern, final boolean retryWrites, final ReadConcern readConcern, final OperationExecutor executor) { checkDatabaseNameValidity(name); this.name = notNull("name", name); this.codecRegistry = notNull("codecRegistry", codecRegistry); this.readPreference = notNull("readPreference", readPreference); this.writeConcern = notNull("writeConcern", writeConcern); this.retryWrites = retryWrites; this.readConcern = notNull("readConcern", readConcern); this.executor = notNull("executor", executor); }