Package de.caluga.morphium.driver.wire
Class DriverBase
java.lang.Object
de.caluga.morphium.driver.wire.DriverBase
- All Implemented Interfaces:
MorphiumDriver,Closeable,AutoCloseable
- Direct Known Subclasses:
PooledDriver,SingleMongoConnectDriver
User: Stephan Bösebeck
Date: 03.12.15
Time: 22:36
Base for custom drivers
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.caluga.morphium.driver.MorphiumDriver
MorphiumDriver.DriverStatsKey -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbooleanintString[]getCredentials(String db) intbooleanintintintintintintintintintintintintintintintintintintgetUser()voidheartBeatFrequency(int t) abstract booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisUseSSL()listCollections(String db, String regex) voidsetConnectionTimeout(int timeout) voidsetConnectionUrl(String connectionUrl) voidsetCredentials(String db, String login, String pwd) voidsetDefaultBatchSize(int defaultBatchSize) voidsetDefaultJ(boolean j) voidvoidsetDefaultW(int w) voidsetDefaultWriteTimeout(int wt) voidsetHeartbeatFrequency(int heartbeatFrequency) voidsetHostSeed(String... hosts) voidsetHostSeed(List<String> hosts) voidsetLocalThreshold(int thr) voidsetMaxBsonObjectSize(int maxBsonObjectSize) voidsetMaxConnectionIdleTime(int time) voidsetMaxConnectionLifetime(int timeout) setMaxConnections(int maxConnections) voidsetMaxConnectionsPerHost(int maxConnectionsPerHost) voidsetMaxMessageSize(int maxMessageSize) voidsetMaxWaitTime(int maxWaitTime) voidsetMaxWriteBatchSize(int maxWriteBatchSize) setMinConnections(int minConnections) voidsetMinConnectionsPerHost(int minConnectionsPerHost) setPassword(String password) voidsetReadTimeout(int readTimeout) voidsetReplicaSet(boolean replicaSet) voidsetReplicaSetName(String replicaSetName) setRetriesOnNetworkError(int r) setRetryReads(boolean retryReads) setRetryWrites(boolean retryWrites) setSleepBetweenErrorRetries(int s) voidvoidsetUseSSL(boolean useSSL) voidsetUuidRepresentation(String uuidRepresentation) startTransaction(boolean autoCommit) voiduseSsl(boolean ssl) abstract voidwatch(WatchCommand settings) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.caluga.morphium.driver.MorphiumDriver
abortTransaction, commitTransaction, connect, connect, createAggregator, createBulkContext, exists, getCollStats, getDBStats, getDriverStats, getName, getNumConnectionsByHost, getPrimaryConnection, getReadConnection, getReplsetStatus, isConnected, releaseConnection
-
Constructor Details
-
DriverBase
public DriverBase()
-
-
Method Details
-
setConnectionUrl
- Specified by:
setConnectionUrlin interfaceMorphiumDriver- Throws:
MalformedURLException
-
listCollections
- Specified by:
listCollectionsin interfaceMorphiumDriver- Throws:
MorphiumDriverException
-
setHostSeed
- Specified by:
setHostSeedin interfaceMorphiumDriver
-
getRetriesOnNetworkError
public int getRetriesOnNetworkError()- Specified by:
getRetriesOnNetworkErrorin interfaceMorphiumDriver
-
setRetriesOnNetworkError
- Specified by:
setRetriesOnNetworkErrorin interfaceMorphiumDriver
-
getSleepBetweenErrorRetries
public int getSleepBetweenErrorRetries()- Specified by:
getSleepBetweenErrorRetriesin interfaceMorphiumDriver
-
setSleepBetweenErrorRetries
- Specified by:
setSleepBetweenErrorRetriesin interfaceMorphiumDriver
-
setCredentials
- Specified by:
setCredentialsin interfaceMorphiumDriver
-
getMaxConnections
public int getMaxConnections()- Specified by:
getMaxConnectionsin interfaceMorphiumDriver
-
getAuthDb
-
setAuthDb
-
getUser
-
setUser
-
getPassword
-
setPassword
-
setMaxConnections
- Specified by:
setMaxConnectionsin interfaceMorphiumDriver
-
getMinConnections
public int getMinConnections()- Specified by:
getMinConnectionsin interfaceMorphiumDriver
-
setMinConnections
- Specified by:
setMinConnectionsin interfaceMorphiumDriver
-
isRetryReads
public boolean isRetryReads()- Specified by:
isRetryReadsin interfaceMorphiumDriver
-
setRetryReads
- Specified by:
setRetryReadsin interfaceMorphiumDriver
-
isRetryWrites
public boolean isRetryWrites()- Specified by:
isRetryWritesin interfaceMorphiumDriver
-
setRetryWrites
- Specified by:
setRetryWritesin interfaceMorphiumDriver
-
getUuidRepresentation
-
setUuidRepresentation
-
getReadTimeout
public int getReadTimeout()- Specified by:
getReadTimeoutin interfaceMorphiumDriver
-
setReadTimeout
public void setReadTimeout(int readTimeout) - Specified by:
setReadTimeoutin interfaceMorphiumDriver
-
getMinConnectionsPerHost
public int getMinConnectionsPerHost()- Specified by:
getMinConnectionsPerHostin interfaceMorphiumDriver
-
setMinConnectionsPerHost
public void setMinConnectionsPerHost(int minConnectionsPerHost) - Specified by:
setMinConnectionsPerHostin interfaceMorphiumDriver
-
getMaxConnectionsPerHost
public int getMaxConnectionsPerHost()- Specified by:
getMaxConnectionsPerHostin interfaceMorphiumDriver
-
setMaxConnectionsPerHost
public void setMaxConnectionsPerHost(int maxConnectionsPerHost) - Specified by:
setMaxConnectionsPerHostin interfaceMorphiumDriver
-
isReplicaset
public boolean isReplicaset()- Specified by:
isReplicasetin interfaceMorphiumDriver
-
listDatabases
- Specified by:
listDatabasesin interfaceMorphiumDriver- Throws:
MorphiumDriverException
-
exists
- Specified by:
existsin interfaceMorphiumDriver- Throws:
MorphiumDriverException
-
getHostSeed
- Specified by:
getHostSeedin interfaceMorphiumDriver
-
getReplicaSetName
- Specified by:
getReplicaSetNamein interfaceMorphiumDriver
-
setReplicaSetName
- Specified by:
setReplicaSetNamein interfaceMorphiumDriver
-
getMaxBsonObjectSize
public int getMaxBsonObjectSize()- Specified by:
getMaxBsonObjectSizein interfaceMorphiumDriver
-
setMaxBsonObjectSize
public void setMaxBsonObjectSize(int maxBsonObjectSize) - Specified by:
setMaxBsonObjectSizein interfaceMorphiumDriver
-
getMaxMessageSize
public int getMaxMessageSize()- Specified by:
getMaxMessageSizein interfaceMorphiumDriver
-
setMaxMessageSize
public void setMaxMessageSize(int maxMessageSize) - Specified by:
setMaxMessageSizein interfaceMorphiumDriver
-
getMaxWriteBatchSize
public int getMaxWriteBatchSize()- Specified by:
getMaxWriteBatchSizein interfaceMorphiumDriver
-
setMaxWriteBatchSize
public void setMaxWriteBatchSize(int maxWriteBatchSize) - Specified by:
setMaxWriteBatchSizein interfaceMorphiumDriver
-
isReplicaSet
public boolean isReplicaSet()- Specified by:
isReplicaSetin interfaceMorphiumDriver
-
setReplicaSet
public void setReplicaSet(boolean replicaSet) - Specified by:
setReplicaSetin interfaceMorphiumDriver
-
getNextId
public int getNextId() -
getDefaultJ
public boolean getDefaultJ()- Specified by:
getDefaultJin interfaceMorphiumDriver
-
getDefaultWriteTimeout
public int getDefaultWriteTimeout()- Specified by:
getDefaultWriteTimeoutin interfaceMorphiumDriver
-
setDefaultWriteTimeout
public void setDefaultWriteTimeout(int wt) - Specified by:
setDefaultWriteTimeoutin interfaceMorphiumDriver
-
getMaxWaitTime
public int getMaxWaitTime()- Specified by:
getMaxWaitTimein interfaceMorphiumDriver
-
setMaxWaitTime
public void setMaxWaitTime(int maxWaitTime) - Specified by:
setMaxWaitTimein interfaceMorphiumDriver
-
getCredentials
- Specified by:
getCredentialsin interfaceMorphiumDriver
-
setHostSeed
- Specified by:
setHostSeedin interfaceMorphiumDriver
-
getMaxConnectionLifetime
public int getMaxConnectionLifetime()- Specified by:
getMaxConnectionLifetimein interfaceMorphiumDriver
-
setMaxConnectionLifetime
public void setMaxConnectionLifetime(int timeout) - Specified by:
setMaxConnectionLifetimein interfaceMorphiumDriver
-
getMaxConnectionIdleTime
public int getMaxConnectionIdleTime()- Specified by:
getMaxConnectionIdleTimein interfaceMorphiumDriver
-
setMaxConnectionIdleTime
public void setMaxConnectionIdleTime(int time) - Specified by:
setMaxConnectionIdleTimein interfaceMorphiumDriver
-
getConnectionTimeout
public int getConnectionTimeout()- Specified by:
getConnectionTimeoutin interfaceMorphiumDriver
-
setConnectionTimeout
public void setConnectionTimeout(int timeout) - Specified by:
setConnectionTimeoutin interfaceMorphiumDriver
-
getDefaultW
public int getDefaultW()- Specified by:
getDefaultWin interfaceMorphiumDriver
-
setDefaultW
public void setDefaultW(int w) - Specified by:
setDefaultWin interfaceMorphiumDriver
-
getHeartbeatFrequency
public int getHeartbeatFrequency()- Specified by:
getHeartbeatFrequencyin interfaceMorphiumDriver
-
setHeartbeatFrequency
public void setHeartbeatFrequency(int heartbeatFrequency) - Specified by:
setHeartbeatFrequencyin interfaceMorphiumDriver
-
getMaximums
-
getDefaultReadPreference
- Specified by:
getDefaultReadPreferencein interfaceMorphiumDriver
-
setDefaultReadPreference
- Specified by:
setDefaultReadPreferencein interfaceMorphiumDriver
-
getDefaultBatchSize
public int getDefaultBatchSize()- Specified by:
getDefaultBatchSizein interfaceMorphiumDriver
-
setDefaultBatchSize
public void setDefaultBatchSize(int defaultBatchSize) - Specified by:
setDefaultBatchSizein interfaceMorphiumDriver
-
isUseSSL
public boolean isUseSSL()- Specified by:
isUseSSLin interfaceMorphiumDriver
-
setUseSSL
public void setUseSSL(boolean useSSL) - Specified by:
setUseSSLin interfaceMorphiumDriver
-
isDefaultJ
public boolean isDefaultJ()- Specified by:
isDefaultJin interfaceMorphiumDriver
-
setDefaultJ
public void setDefaultJ(boolean j) - Specified by:
setDefaultJin interfaceMorphiumDriver
-
getLocalThreshold
public int getLocalThreshold() -
setLocalThreshold
public void setLocalThreshold(int thr) -
heartBeatFrequency
public void heartBeatFrequency(int t) -
useSsl
public void useSsl(boolean ssl) -
startTransaction
- Specified by:
startTransactionin interfaceMorphiumDriver
-
getTransactionContext
- Specified by:
getTransactionContextin interfaceMorphiumDriver
-
setTransactionContext
- Specified by:
setTransactionContextin interfaceMorphiumDriver
-
isTransactionInProgress
public boolean isTransactionInProgress()- Specified by:
isTransactionInProgressin interfaceMorphiumDriver
-
clearTransactionContext
protected void clearTransactionContext() -
watch
- Specified by:
watchin interfaceMorphiumDriver- Throws:
MorphiumDriverException
-
isCapped
- Specified by:
isCappedin interfaceMorphiumDriver- Throws:
MorphiumDriverException
-