public class SingleConnectDirectDriver extends DriverBase
connects to one node only!
| Constructor and Description |
|---|
SingleConnectDirectDriver() |
getConnectionTimeout, getCredentials, getCredentials, getDefaultReadPreference, getDefaultW, getDefaultWriteTimeout, getHeartbeatConnectTimeout, getHeartbeatFrequency, getHeartbeatSocketTimeout, getHostAdress, getHostSeed, getLocalThreshold, getMaxBlockintThreadMultiplier, getMaxBsonObjectSize, getMaxConnectionIdleTime, getMaxConnectionLifetime, getMaxConnectionsPerHost, getMaximums, getMaxMessageSize, getMaxWaitTime, getMaxWriteBatchSize, getMinConnectionsPerHost, getNextId, getReplicaSetName, getRetriesOnNetworkError, getSleepBetweenErrorRetries, getSocketTimeout, getWriteTimeout, heartBeatFrequency, heartBeatSocketTimeout, isDefaultFsync, isDefaultJ, isReplicaset, isReplicaSet, isSlaveOk, isSocketKeepAlive, isUseSSL, setConnectionTimeout, setCredentials, setCredentials, setDefaultBatchSize, setDefaultFsync, setDefaultJ, setDefaultReadPreference, setDefaultW, setDefaultWriteTimeout, setHeartbeatConnectTimeout, setHeartbeatFrequency, setHeartbeatSocketTimeout, setHostSeed, setLocalThreshold, setMaxBlockingThreadMultiplier, setMaxBsonObjectSize, setMaxConnectionIdleTime, setMaxConnectionLifetime, setMaxConnectionsPerHost, setMaxMessageSize, setMaxWaitTime, setMaxWriteBatchSize, setMinConnectionsPerHost, setReplicaSet, setReplicaSetName, setRetriesOnNetworkError, setSlaveOk, setSleepBetweenErrorRetries, setSocketKeepAlive, setSocketTimeout, setUseSSL, setWriteTimeout, useSslpublic void connect(String replSet) throws MorphiumDriverException
MorphiumDriverExceptionpublic void connect()
throws MorphiumDriverException
MorphiumDriverExceptionpublic boolean isConnected()
public void close()
throws MorphiumDriverException
MorphiumDriverExceptionpublic Map<String,Object> getReplsetStatus() throws MorphiumDriverException
MorphiumDriverExceptionpublic Map<String,Object> getDBStats(String db) throws MorphiumDriverException
MorphiumDriverExceptionpublic Map<String,Object> getOps(long threshold) throws MorphiumDriverException
MorphiumDriverExceptionpublic Map<String,Object> runCommand(String db, Map<String,Object> cmd) throws MorphiumDriverException
MorphiumDriverExceptionpublic MorphiumCursor initIteration(String db, String collection, Map<String,Object> query, Map<String,Integer> sort, Map<String,Object> projection, int skip, int limit, int batchSize, ReadPreference readPreference, Map<String,Object> findMetaData) throws MorphiumDriverException
MorphiumDriverExceptionpublic MorphiumCursor nextIteration(MorphiumCursor crs) throws MorphiumDriverException
MorphiumDriverExceptionpublic void closeIteration(MorphiumCursor crs) throws MorphiumDriverException
MorphiumDriverExceptionpublic List<Map<String,Object>> find(String db, String collection, Map<String,Object> query, Map<String,Integer> s, Map<String,Object> projection, int skip, int limit, int batchSize, ReadPreference rp, Map<String,Object> findMetaData) throws MorphiumDriverException
MorphiumDriverExceptionpublic long count(String db, String collection, Map<String,Object> query, ReadPreference rp) throws MorphiumDriverException
MorphiumDriverExceptionpublic void insert(String db, String collection, List<Map<String,Object>> objs, WriteConcern wc) throws MorphiumDriverException
MorphiumDriverMorphiumDriverExceptionpublic void store(String db, String collection, List<Map<String,Object>> objs, WriteConcern wc) throws MorphiumDriverException
MorphiumDriverMorphiumDriverExceptionpublic Map<String,Object> update(String db, String collection, Map<String,Object> query, Map<String,Object> ops, boolean multiple, boolean upsert, WriteConcern wc) throws MorphiumDriverException
MorphiumDriverExceptionpublic Map<String,Object> update(String db, String collection, List<Map<String,Object>> updateCommand, boolean ordered, WriteConcern wc) throws MorphiumDriverException
update in class DriverBaseMorphiumDriverExceptionpublic Map<String,Object> delete(String db, String collection, Map<String,Object> query, boolean multiple, WriteConcern wc) throws MorphiumDriverException
MorphiumDriverExceptionpublic void drop(String db, String collection, WriteConcern wc) throws MorphiumDriverException
MorphiumDriverExceptionpublic void drop(String db, WriteConcern wc) throws MorphiumDriverException
MorphiumDriverExceptionpublic boolean exists(String db) throws MorphiumDriverException
MorphiumDriverExceptionpublic List<Object> distinct(String db, String collection, String field, Map<String,Object> filter, ReadPreference rp) throws MorphiumDriverException
MorphiumDriverExceptionpublic boolean exists(String db, String collection) throws MorphiumDriverException
MorphiumDriverExceptionpublic List<Map<String,Object>> getIndexes(String db, String collection) throws MorphiumDriverException
MorphiumDriverExceptionpublic List<String> getCollectionNames(String db) throws MorphiumDriverException
MorphiumDriverExceptionpublic Map<String,Object> group(String db, String coll, Map<String,Object> query, Map<String,Object> initial, String jsReduce, String jsFinalize, ReadPreference rp, String... keys) throws MorphiumDriverException
MorphiumDriverExceptionpublic List<Map<String,Object>> aggregate(String db, String collection, List<Map<String,Object>> pipeline, boolean explain, boolean allowDiskUse, ReadPreference readPreference) throws MorphiumDriverException
MorphiumDriverExceptionpublic boolean isCapped(String db, String coll) throws MorphiumDriverException
MorphiumDriverExceptionpublic BulkRequestContext createBulkContext(Morphium m, String db, String collection, boolean ordered, WriteConcern wc)
public void createIndex(String db, String collection, Map<String,Object> index, Map<String,Object> options) throws MorphiumDriverException
MorphiumDriverExceptionCopyright © 2016. All rights reserved.