public class Driver extends Object implements MorphiumDriver
VERSION_NAME| Constructor and Description |
|---|
Driver() |
public boolean isReplicaset()
isReplicaset in interface MorphiumDriverpublic void setCredentials(String db, String login, char[] pwd)
setCredentials in interface MorphiumDriverpublic List<String> listDatabases() throws MorphiumDriverException
listDatabases in interface MorphiumDriverMorphiumDriverExceptionpublic List<String> listCollections(String db, String pattern) throws MorphiumDriverException
MorphiumDriverlistCollections in interface MorphiumDriverpattern - regular expression for the collection, might be nullMorphiumDriverExceptionpublic ReadPreference getDefaultReadPreference()
public void setDefaultReadPreference(ReadPreference defaultReadPreference)
setDefaultReadPreference in interface MorphiumDriverpublic String[] getCredentials(String db)
getCredentials in interface MorphiumDriverpublic boolean isDefaultFsync()
isDefaultFsync in interface MorphiumDriverpublic void setDefaultFsync(boolean j)
setDefaultFsync in interface MorphiumDriverpublic String[] getHostSeed()
getHostSeed in interface MorphiumDriverpublic void setHostSeed(String... host)
setHostSeed in interface MorphiumDriverpublic int getMaxConnectionsPerHost()
getMaxConnectionsPerHost in interface MorphiumDriverpublic void setMaxConnectionsPerHost(int mx)
setMaxConnectionsPerHost in interface MorphiumDriverpublic int getMinConnectionsPerHost()
getMinConnectionsPerHost in interface MorphiumDriverpublic void setMinConnectionsPerHost(int mx)
setMinConnectionsPerHost in interface MorphiumDriverpublic int getMaxConnectionLifetime()
getMaxConnectionLifetime in interface MorphiumDriverpublic void setMaxConnectionLifetime(int timeout)
setMaxConnectionLifetime in interface MorphiumDriverpublic int getMaxConnectionIdleTime()
getMaxConnectionIdleTime in interface MorphiumDriverpublic void setMaxConnectionIdleTime(int time)
setMaxConnectionIdleTime in interface MorphiumDriverpublic int getSocketTimeout()
getSocketTimeout in interface MorphiumDriverpublic void setSocketTimeout(int timeout)
setSocketTimeout in interface MorphiumDriverpublic int getConnectionTimeout()
getConnectionTimeout in interface MorphiumDriverpublic void setConnectionTimeout(int timeout)
setConnectionTimeout in interface MorphiumDriverpublic int getDefaultW()
getDefaultW in interface MorphiumDriverpublic void setDefaultW(int w)
setDefaultW in interface MorphiumDriverpublic int getMaxBlockintThreadMultiplier()
getMaxBlockintThreadMultiplier in interface MorphiumDriverpublic int getHeartbeatFrequency()
getHeartbeatFrequency in interface MorphiumDriverpublic void setHeartbeatFrequency(int heartbeatFrequency)
setHeartbeatFrequency in interface MorphiumDriverpublic void setDefaultBatchSize(int defaultBatchSize)
setDefaultBatchSize in interface MorphiumDriverpublic void setCredentials(Map<String,String[]> credentials)
setCredentials in interface MorphiumDriverpublic void setMongo(com.mongodb.MongoClient mongo)
public int getHeartbeatSocketTimeout()
getHeartbeatSocketTimeout in interface MorphiumDriverpublic void setHeartbeatSocketTimeout(int heartbeatSocketTimeout)
setHeartbeatSocketTimeout in interface MorphiumDriverpublic boolean isUseSSL()
isUseSSL in interface MorphiumDriverpublic void setUseSSL(boolean useSSL)
setUseSSL in interface MorphiumDriverpublic boolean isDefaultJ()
isDefaultJ in interface MorphiumDriverpublic void setDefaultJ(boolean j)
setDefaultJ in interface MorphiumDriverpublic int getWriteTimeout()
getWriteTimeout in interface MorphiumDriverpublic void setWriteTimeout(int writeTimeout)
setWriteTimeout in interface MorphiumDriverpublic int getLocalThreshold()
getLocalThreshold in interface MorphiumDriverpublic void setLocalThreshold(int thr)
setLocalThreshold in interface MorphiumDriverpublic void setMaxBlockingThreadMultiplier(int m)
setMaxBlockingThreadMultiplier in interface MorphiumDriverpublic void heartBeatFrequency(int t)
heartBeatFrequency in interface MorphiumDriverpublic void heartBeatSocketTimeout(int t)
heartBeatSocketTimeout in interface MorphiumDriverpublic void useSsl(boolean ssl)
useSsl in interface MorphiumDriverpublic void connect()
throws MorphiumDriverException
connect in interface MorphiumDriverMorphiumDriverExceptionpublic void connect(String replicasetName) throws MorphiumDriverException
connect in interface MorphiumDriverMorphiumDriverExceptionpublic Maximums getMaximums()
getMaximums in interface MorphiumDriverpublic boolean isConnected()
isConnected in interface MorphiumDriverpublic int getDefaultWriteTimeout()
getDefaultWriteTimeout in interface MorphiumDriverpublic void setDefaultWriteTimeout(int wt)
setDefaultWriteTimeout in interface MorphiumDriverpublic void close()
throws MorphiumDriverException
close in interface MorphiumDriverMorphiumDriverExceptionpublic Map<String,Object> getReplsetStatus() throws MorphiumDriverException
getReplsetStatus in interface MorphiumDriverMorphiumDriverExceptionpublic Map<String,Object> getDBStats(String db) throws MorphiumDriverException
getDBStats in interface MorphiumDriverMorphiumDriverExceptionpublic Map<String,Object> getOps(long threshold)
getOps in interface MorphiumDriverpublic Map<String,Object> runCommand(String db, Map<String,Object> cmd) throws MorphiumDriverException
runCommand in interface MorphiumDriverMorphiumDriverExceptionpublic 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
initIteration in interface MorphiumDriverMorphiumDriverExceptionpublic void watch(String db, int maxWaitTime, boolean fullDocumentOnUpdate, DriverTailableIterationCallback cb) throws MorphiumDriverException
watch in interface MorphiumDriverMorphiumDriverExceptionpublic void watch(String db, String collection, int maxWaitTime, boolean fullDocumentOnUpdate, DriverTailableIterationCallback cb) throws MorphiumDriverException
watch in interface MorphiumDriverMorphiumDriverExceptionpublic void tailableIteration(String db, String collection, Map<String,Object> query, Map<String,Integer> sort, Map<String,Object> projection, int skip, int limit, int batchSize, ReadPreference readPreference, int timeout, DriverTailableIterationCallback cb) throws MorphiumDriverException
tailableIteration in interface MorphiumDriverMorphiumDriverExceptionpublic MorphiumCursor nextIteration(MorphiumCursor crs) throws MorphiumDriverException
nextIteration in interface MorphiumDriverMorphiumDriverExceptionpublic void closeIteration(MorphiumCursor crs) throws MorphiumDriverException
closeIteration in interface MorphiumDriverMorphiumDriverExceptionpublic List<Map<String,Object>> find(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
find in interface MorphiumDriverMorphiumDriverExceptionpublic com.mongodb.DBCollection getColl(com.mongodb.DB database,
String collection,
ReadPreference readPreference,
WriteConcern wc)
public com.mongodb.client.MongoCollection<org.bson.Document> getCollection(com.mongodb.client.MongoDatabase database,
String collection,
ReadPreference readPreference,
WriteConcern wc)
public long count(String db, String collection, Map<String,Object> query, ReadPreference rp)
count in interface MorphiumDriverpublic Map<String,Object> store(String db, String collection, List<Map<String,Object>> objs, WriteConcern wc) throws MorphiumDriverException
MorphiumDriverstore in interface MorphiumDriverMorphiumDriverExceptionpublic void insert(String db, String collection, List<Map<String,Object>> objs, WriteConcern wc) throws MorphiumDriverException
MorphiumDriverinsert in interface MorphiumDriverMorphiumDriverExceptionpublic Map<String,Object> update(String db, String collection, Map<String,Object> query, Map<String,Object> op, boolean multiple, boolean upsert, WriteConcern wc) throws MorphiumDriverException
update in interface MorphiumDriverMorphiumDriverExceptionpublic Map<String,Object> delete(String db, String collection, Map<String,Object> query, boolean multiple, WriteConcern wc) throws MorphiumDriverException
delete in interface MorphiumDriverMorphiumDriverExceptionpublic void drop(String db, String collection, WriteConcern wc) throws MorphiumDriverException
drop in interface MorphiumDriverMorphiumDriverExceptionpublic void drop(String db, WriteConcern wc) throws MorphiumDriverException
drop in interface MorphiumDriverMorphiumDriverExceptionpublic boolean exists(String db)
exists in interface MorphiumDriverpublic List<Object> distinct(String db, String collection, String field, Map<String,Object> filter, ReadPreference rp) throws MorphiumDriverException
distinct in interface MorphiumDriverMorphiumDriverExceptionpublic boolean exists(String db, String collection) throws MorphiumDriverException
exists in interface MorphiumDriverMorphiumDriverExceptionpublic List<Map<String,Object>> getIndexes(String db, String collection) throws MorphiumDriverException
getIndexes in interface MorphiumDriverMorphiumDriverExceptionpublic List<String> getCollectionNames(String db) throws MorphiumDriverException
getCollectionNames in interface MorphiumDriverMorphiumDriverExceptionpublic Map<String,Object> group(String db, String coll, Map<String,Object> query, Map<String,Object> initial, String jsReduce, String jsFinalize, ReadPreference rp, String... keys)
group in interface MorphiumDriverpublic List<Map<String,Object>> aggregate(String db, String collection, List<Map<String,Object>> pipeline, boolean explain, boolean allowDiskUse, ReadPreference readPreference)
aggregate in interface MorphiumDriverpublic boolean isSocketKeepAlive()
isSocketKeepAlive in interface MorphiumDriverpublic void setSocketKeepAlive(boolean socketKeepAlive)
setSocketKeepAlive in interface MorphiumDriverpublic int getHeartbeatConnectTimeout()
getHeartbeatConnectTimeout in interface MorphiumDriverpublic void setHeartbeatConnectTimeout(int heartbeatConnectTimeout)
setHeartbeatConnectTimeout in interface MorphiumDriverpublic int getMaxWaitTime()
getMaxWaitTime in interface MorphiumDriverpublic void setMaxWaitTime(int maxWaitTime)
setMaxWaitTime in interface MorphiumDriverpublic int getRetriesOnNetworkError()
getRetriesOnNetworkError in interface MorphiumDriverpublic void setRetriesOnNetworkError(int retriesOnNetworkError)
setRetriesOnNetworkError in interface MorphiumDriverpublic int getSleepBetweenErrorRetries()
getSleepBetweenErrorRetries in interface MorphiumDriverpublic void setSleepBetweenErrorRetries(int sleepBetweenErrorRetries)
setSleepBetweenErrorRetries in interface MorphiumDriverpublic Map<String,Object> getCollectionStats(String db, String coll, int scale, boolean verbose) throws MorphiumDriverException
MorphiumDriverExceptionpublic boolean isCapped(String db, String coll) throws MorphiumDriverException
isCapped in interface MorphiumDriverMorphiumDriverExceptionpublic BulkRequestContext createBulkContext(Morphium m, String db, String collection, boolean ordered, WriteConcern wc)
createBulkContext in interface MorphiumDriverpublic com.mongodb.client.MongoDatabase getDb(String db)
public void createIndex(String db, String collection, Map<String,Object> index, Map<String,Object> options) throws MorphiumDriverException
createIndex in interface MorphiumDriverMorphiumDriverExceptionpublic List<Map<String,Object>> mapReduce(String db, String collection, String mapping, String reducing)
mapReduce in interface MorphiumDriverpublic List<Map<String,Object>> mapReduce(String db, String collection, String mapping, String reducing, Map<String,Object> query)
mapReduce in interface MorphiumDriverpublic List<Map<String,Object>> mapReduce(String db, String collection, String mapping, String reducing, Map<String,Object> query, Map<String,Object> sorting)
mapReduce in interface MorphiumDriverpublic void startTransaction()
startTransaction in interface MorphiumDriverpublic void commitTransaction()
commitTransaction in interface MorphiumDriverpublic MorphiumTransactionContext getTransactionContext()
getTransactionContext in interface MorphiumDriverpublic void abortTransaction()
abortTransaction in interface MorphiumDriverpublic void setTransactionContext(MorphiumTransactionContext ctx)
setTransactionContext in interface MorphiumDriverCopyright © 2018. All rights reserved.