private boolean isCursorFinalizerEnabled() { return collection.getDB().getMongo().getMongoClientOptions().isCursorFinalizerEnabled(); }
@SuppressWarnings("deprecation") Mongo(final Cluster cluster, final MongoClientOptions options, final List<MongoCredential> credentialsList) { this.options = options; this.readPreference = options.getReadPreference(); this.writeConcern = options.getWriteConcern(); this.readConcern = options.getReadConcern(); this.optionHolder = new Bytes.OptionHolder(null); this.credentialsList = unmodifiableList(credentialsList); this.delegate = new MongoClientDelegate(cluster, credentialsList, this); cursorCleaningService = options.isCursorFinalizerEnabled() ? createCursorCleaningService() : null; }
dbEncoderFactory = options.getDbEncoderFactory(); socketFactory = options.socketFactory; cursorFinalizerEnabled = options.isCursorFinalizerEnabled(); clusterListeners.addAll(options.getClusterListeners()); commandListeners.addAll(options.getCommandListeners());
@Override public Map<String, ?> properties(RequestContext ctx) throws Exception { Map properties = new HashMap<>(); properties.put(DESCRIPTION, mongoClientOptions.getDescription()); properties.put(CONNECTIONS_PER_HOST, mongoClientOptions.getConnectionsPerHost()); properties.put(THREADS_ALLOWED_TO_BLOCK_FOR_CONNECTION_MULTIPLIER, mongoClientOptions.getThreadsAllowedToBlockForConnectionMultiplier()); properties.put(MAX_WAIT_TIME, mongoClientOptions.getMaxWaitTime()); properties.put(CONNECT_TIMEOUT, mongoClientOptions.getConnectTimeout()); properties.put(SOCKET_KEEP_ALIVE, mongoClientOptions.isSocketKeepAlive()); properties.put(AUTOCONNECT_RETRY, mongoClientOptions.isAutoConnectRetry()); properties.put(MAX_AUTOCONNECT_RETRY_TIME, mongoClientOptions.getMaxAutoConnectRetryTime()); properties.put(CURSOR_FINALIZER_ENABLED, mongoClientOptions.isCursorFinalizerEnabled()); properties.put(ALWAYS_USE_MBEANS, mongoClientOptions.isAlwaysUseMBeans()); return properties; } }
private boolean isCursorFinalizerEnabled() { return collection.getDB().getMongo().getMongoClientOptions().isCursorFinalizerEnabled(); }
@SuppressWarnings("deprecation") Mongo(final Cluster cluster, final MongoClientOptions options, final List<MongoCredential> credentialsList) { this.options = options; this.readPreference = options.getReadPreference(); this.writeConcern = options.getWriteConcern(); this.readConcern = options.getReadConcern(); this.optionHolder = new Bytes.OptionHolder(null); this.credentialsList = unmodifiableList(credentialsList); this.delegate = new MongoClientDelegate(cluster, credentialsList, this); cursorCleaningService = options.isCursorFinalizerEnabled() ? createCursorCleaningService() : null; }
dbEncoderFactory = options.getDbEncoderFactory(); socketFactory = options.socketFactory; cursorFinalizerEnabled = options.isCursorFinalizerEnabled(); clusterListeners.addAll(options.getClusterListeners()); commandListeners.addAll(options.getCommandListeners());