public class InfluxDbDriver extends Object implements de.caluga.morphium.driver.MorphiumDriver
translation of the morphium fluent interface for queries to influxQL has some caveats:
query.addProjection("reqtime","mean");qstr (for query string). Make sure this is valid!| Constructor and Description |
|---|
InfluxDbDriver() |
| Modifier and Type | Method and Description |
|---|---|
List<Map<String,Object>> |
aggregate(String db,
String collection,
List<Map<String,Object>> pipeline,
boolean explain,
boolean allowDiskUse,
de.caluga.morphium.driver.ReadPreference readPreference) |
void |
close() |
void |
closeIteration(de.caluga.morphium.driver.MorphiumCursor crs) |
void |
connect() |
void |
connect(String replicasetName) |
long |
count(String db,
String collection,
Map<String,Object> query,
de.caluga.morphium.driver.ReadPreference rp) |
de.caluga.morphium.driver.bulk.BulkRequestContext |
createBulkContext(de.caluga.morphium.Morphium m,
String db,
String collection,
boolean ordered,
de.caluga.morphium.driver.WriteConcern wc) |
void |
createIndex(String db,
String collection,
Map<String,Object> index,
Map<String,Object> options) |
Map<String,Object> |
delete(String db,
String collection,
Map<String,Object> query,
boolean multiple,
de.caluga.morphium.driver.WriteConcern wc) |
List<Object> |
distinct(String db,
String collection,
String field,
Map<String,Object> filter,
de.caluga.morphium.driver.ReadPreference rp) |
void |
drop(String db,
String collection,
de.caluga.morphium.driver.WriteConcern wc) |
void |
drop(String db,
de.caluga.morphium.driver.WriteConcern wc) |
boolean |
exists(String db) |
boolean |
exists(String db,
String collection) |
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,
de.caluga.morphium.driver.ReadPreference rp,
Map<String,Object> findMetaData) |
List<String> |
getCollectionNames(String db) |
int |
getConnectionTimeout() |
String[] |
getCredentials(String db) |
Map<String,Object> |
getDBStats(String db) |
int |
getDefaultW() |
int |
getDefaultWriteTimeout() |
int |
getHeartbeatConnectTimeout() |
int |
getHeartbeatFrequency() |
int |
getHeartbeatSocketTimeout() |
String[] |
getHostSeed() |
List<Map<String,Object>> |
getIndexes(String db,
String collection) |
int |
getLocalThreshold() |
int |
getMaxBlockintThreadMultiplier() |
int |
getMaxConnectionIdleTime() |
int |
getMaxConnectionLifetime() |
int |
getMaxConnectionsPerHost() |
de.caluga.morphium.driver.mongodb.Maximums |
getMaximums() |
int |
getMaxWaitTime() |
int |
getMinConnectionsPerHost() |
Map<String,Object> |
getOps(long threshold) |
Map<String,Object> |
getReplsetStatus() |
int |
getRetriesOnNetworkError() |
int |
getSleepBetweenErrorRetries() |
int |
getSocketTimeout() |
int |
getWriteTimeout() |
Map<String,Object> |
group(String db,
String coll,
Map<String,Object> query,
Map<String,Object> initial,
String jsReduce,
String jsFinalize,
de.caluga.morphium.driver.ReadPreference rp,
String... keys) |
void |
heartBeatFrequency(int t) |
void |
heartBeatSocketTimeout(int t) |
de.caluga.morphium.driver.MorphiumCursor |
initIteration(String db,
String collection,
Map<String,Object> query,
Map<String,Integer> sort,
Map<String,Object> projection,
int skip,
int limit,
int batchSize,
de.caluga.morphium.driver.ReadPreference readPreference,
Map<String,Object> findMetaData) |
void |
insert(String db,
String collection,
List<Map<String,Object>> objs,
de.caluga.morphium.driver.WriteConcern wc) |
boolean |
isCapped(String db,
String coll) |
boolean |
isConnected() |
boolean |
isDefaultFsync() |
boolean |
isDefaultJ() |
boolean |
isReplicaset() |
boolean |
isSocketKeepAlive() |
boolean |
isUseSSL() |
de.caluga.morphium.driver.MorphiumCursor |
nextIteration(de.caluga.morphium.driver.MorphiumCursor crs) |
Map<String,Object> |
runCommand(String db,
Map<String,Object> cmd) |
void |
setConnectionTimeout(int timeout) |
void |
setCredentials(Map<String,String[]> credentials) |
void |
setCredentials(String db,
String login,
char[] pwd) |
void |
setDefaultBatchSize(int defaultBatchSize) |
void |
setDefaultFsync(boolean j) |
void |
setDefaultJ(boolean j) |
void |
setDefaultReadPreference(de.caluga.morphium.driver.ReadPreference rp) |
void |
setDefaultW(int w) |
void |
setDefaultWriteTimeout(int wt) |
void |
setHeartbeatConnectTimeout(int heartbeatConnectTimeout) |
void |
setHeartbeatFrequency(int heartbeatFrequency) |
void |
setHeartbeatSocketTimeout(int heartbeatSocketTimeout) |
void |
setHostSeed(String... host) |
void |
setLocalThreshold(int thr) |
void |
setMaxBlockingThreadMultiplier(int m) |
void |
setMaxConnectionIdleTime(int time) |
void |
setMaxConnectionLifetime(int timeout) |
void |
setMaxConnectionsPerHost(int mx) |
void |
setMaxWaitTime(int maxWaitTime) |
void |
setMinConnectionsPerHost(int mx) |
void |
setRetriesOnNetworkError(int r) |
void |
setSleepBetweenErrorRetries(int s) |
void |
setSocketKeepAlive(boolean socketKeepAlive) |
void |
setSocketTimeout(int timeout) |
void |
setUseSSL(boolean useSSL) |
void |
setWriteTimeout(int writeTimeout) |
void |
store(String db,
String collection,
List<Map<String,Object>> list,
de.caluga.morphium.driver.WriteConcern writeConcern) |
Map<String,Object> |
update(String s,
String s1,
Map<String,Object> map,
Map<String,Object> map1,
boolean b,
boolean b1,
de.caluga.morphium.driver.WriteConcern writeConcern) |
void |
useSsl(boolean ssl) |
public void setCredentials(String db, String login, char[] pwd)
setCredentials in interface de.caluga.morphium.driver.MorphiumDriverpublic boolean isReplicaset()
isReplicaset in interface de.caluga.morphium.driver.MorphiumDriverpublic String[] getCredentials(String db)
getCredentials in interface de.caluga.morphium.driver.MorphiumDriverpublic boolean isDefaultFsync()
isDefaultFsync in interface de.caluga.morphium.driver.MorphiumDriverpublic void setDefaultFsync(boolean j)
setDefaultFsync in interface de.caluga.morphium.driver.MorphiumDriverpublic String[] getHostSeed()
getHostSeed in interface de.caluga.morphium.driver.MorphiumDriverpublic void setHostSeed(String... host)
setHostSeed in interface de.caluga.morphium.driver.MorphiumDriverpublic int getMaxConnectionsPerHost()
getMaxConnectionsPerHost in interface de.caluga.morphium.driver.MorphiumDriverpublic void setMaxConnectionsPerHost(int mx)
setMaxConnectionsPerHost in interface de.caluga.morphium.driver.MorphiumDriverpublic int getMinConnectionsPerHost()
getMinConnectionsPerHost in interface de.caluga.morphium.driver.MorphiumDriverpublic void setMinConnectionsPerHost(int mx)
setMinConnectionsPerHost in interface de.caluga.morphium.driver.MorphiumDriverpublic int getMaxConnectionLifetime()
getMaxConnectionLifetime in interface de.caluga.morphium.driver.MorphiumDriverpublic void setMaxConnectionLifetime(int timeout)
setMaxConnectionLifetime in interface de.caluga.morphium.driver.MorphiumDriverpublic int getMaxConnectionIdleTime()
getMaxConnectionIdleTime in interface de.caluga.morphium.driver.MorphiumDriverpublic void setMaxConnectionIdleTime(int time)
setMaxConnectionIdleTime in interface de.caluga.morphium.driver.MorphiumDriverpublic int getSocketTimeout()
getSocketTimeout in interface de.caluga.morphium.driver.MorphiumDriverpublic void setSocketTimeout(int timeout)
setSocketTimeout in interface de.caluga.morphium.driver.MorphiumDriverpublic int getConnectionTimeout()
getConnectionTimeout in interface de.caluga.morphium.driver.MorphiumDriverpublic void setConnectionTimeout(int timeout)
setConnectionTimeout in interface de.caluga.morphium.driver.MorphiumDriverpublic int getDefaultW()
getDefaultW in interface de.caluga.morphium.driver.MorphiumDriverpublic void setDefaultW(int w)
setDefaultW in interface de.caluga.morphium.driver.MorphiumDriverpublic int getMaxBlockintThreadMultiplier()
getMaxBlockintThreadMultiplier in interface de.caluga.morphium.driver.MorphiumDriverpublic int getHeartbeatFrequency()
getHeartbeatFrequency in interface de.caluga.morphium.driver.MorphiumDriverpublic void setHeartbeatFrequency(int heartbeatFrequency)
setHeartbeatFrequency in interface de.caluga.morphium.driver.MorphiumDriverpublic void setDefaultBatchSize(int defaultBatchSize)
setDefaultBatchSize in interface de.caluga.morphium.driver.MorphiumDriverpublic void setCredentials(Map<String,String[]> credentials)
setCredentials in interface de.caluga.morphium.driver.MorphiumDriverpublic int getHeartbeatSocketTimeout()
getHeartbeatSocketTimeout in interface de.caluga.morphium.driver.MorphiumDriverpublic void setHeartbeatSocketTimeout(int heartbeatSocketTimeout)
setHeartbeatSocketTimeout in interface de.caluga.morphium.driver.MorphiumDriverpublic boolean isUseSSL()
isUseSSL in interface de.caluga.morphium.driver.MorphiumDriverpublic void setUseSSL(boolean useSSL)
setUseSSL in interface de.caluga.morphium.driver.MorphiumDriverpublic boolean isDefaultJ()
isDefaultJ in interface de.caluga.morphium.driver.MorphiumDriverpublic void setDefaultJ(boolean j)
setDefaultJ in interface de.caluga.morphium.driver.MorphiumDriverpublic int getWriteTimeout()
getWriteTimeout in interface de.caluga.morphium.driver.MorphiumDriverpublic void setWriteTimeout(int writeTimeout)
setWriteTimeout in interface de.caluga.morphium.driver.MorphiumDriverpublic int getLocalThreshold()
getLocalThreshold in interface de.caluga.morphium.driver.MorphiumDriverpublic void setLocalThreshold(int thr)
setLocalThreshold in interface de.caluga.morphium.driver.MorphiumDriverpublic void setMaxBlockingThreadMultiplier(int m)
setMaxBlockingThreadMultiplier in interface de.caluga.morphium.driver.MorphiumDriverpublic void heartBeatFrequency(int t)
heartBeatFrequency in interface de.caluga.morphium.driver.MorphiumDriverpublic void heartBeatSocketTimeout(int t)
heartBeatSocketTimeout in interface de.caluga.morphium.driver.MorphiumDriverpublic void useSsl(boolean ssl)
useSsl in interface de.caluga.morphium.driver.MorphiumDriverpublic void connect()
throws de.caluga.morphium.driver.MorphiumDriverException
connect in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic void setDefaultReadPreference(de.caluga.morphium.driver.ReadPreference rp)
setDefaultReadPreference in interface de.caluga.morphium.driver.MorphiumDriverpublic void connect(String replicasetName) throws de.caluga.morphium.driver.MorphiumDriverException
connect in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic de.caluga.morphium.driver.mongodb.Maximums getMaximums()
getMaximums in interface de.caluga.morphium.driver.MorphiumDriverpublic boolean isConnected()
isConnected in interface de.caluga.morphium.driver.MorphiumDriverpublic int getDefaultWriteTimeout()
getDefaultWriteTimeout in interface de.caluga.morphium.driver.MorphiumDriverpublic void setDefaultWriteTimeout(int wt)
setDefaultWriteTimeout in interface de.caluga.morphium.driver.MorphiumDriverpublic int getRetriesOnNetworkError()
getRetriesOnNetworkError in interface de.caluga.morphium.driver.MorphiumDriverpublic void setRetriesOnNetworkError(int r)
setRetriesOnNetworkError in interface de.caluga.morphium.driver.MorphiumDriverpublic int getSleepBetweenErrorRetries()
getSleepBetweenErrorRetries in interface de.caluga.morphium.driver.MorphiumDriverpublic void setSleepBetweenErrorRetries(int s)
setSleepBetweenErrorRetries in interface de.caluga.morphium.driver.MorphiumDriverpublic void close()
throws de.caluga.morphium.driver.MorphiumDriverException
close in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic Map<String,Object> getReplsetStatus() throws de.caluga.morphium.driver.MorphiumDriverException
getReplsetStatus in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic Map<String,Object> getDBStats(String db) throws de.caluga.morphium.driver.MorphiumDriverException
getDBStats in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic Map<String,Object> getOps(long threshold) throws de.caluga.morphium.driver.MorphiumDriverException
getOps in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic Map<String,Object> runCommand(String db, Map<String,Object> cmd) throws de.caluga.morphium.driver.MorphiumDriverException
runCommand in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic de.caluga.morphium.driver.MorphiumCursor initIteration(String db, String collection, Map<String,Object> query, Map<String,Integer> sort, Map<String,Object> projection, int skip, int limit, int batchSize, de.caluga.morphium.driver.ReadPreference readPreference, Map<String,Object> findMetaData) throws de.caluga.morphium.driver.MorphiumDriverException
initIteration in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic de.caluga.morphium.driver.MorphiumCursor nextIteration(de.caluga.morphium.driver.MorphiumCursor crs)
throws de.caluga.morphium.driver.MorphiumDriverException
nextIteration in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic void closeIteration(de.caluga.morphium.driver.MorphiumCursor crs)
throws de.caluga.morphium.driver.MorphiumDriverException
closeIteration in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic 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, de.caluga.morphium.driver.ReadPreference rp, Map<String,Object> findMetaData) throws de.caluga.morphium.driver.MorphiumDriverException
find in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic long count(String db, String collection, Map<String,Object> query, de.caluga.morphium.driver.ReadPreference rp) throws de.caluga.morphium.driver.MorphiumDriverException
count in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic void insert(String db, String collection, List<Map<String,Object>> objs, de.caluga.morphium.driver.WriteConcern wc) throws de.caluga.morphium.driver.MorphiumDriverException
insert in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic void store(String db, String collection, List<Map<String,Object>> list, de.caluga.morphium.driver.WriteConcern writeConcern) throws de.caluga.morphium.driver.MorphiumDriverException
store in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic Map<String,Object> update(String s, String s1, Map<String,Object> map, Map<String,Object> map1, boolean b, boolean b1, de.caluga.morphium.driver.WriteConcern writeConcern) throws de.caluga.morphium.driver.MorphiumDriverException
update in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic Map<String,Object> delete(String db, String collection, Map<String,Object> query, boolean multiple, de.caluga.morphium.driver.WriteConcern wc) throws de.caluga.morphium.driver.MorphiumDriverException
delete in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic void drop(String db, String collection, de.caluga.morphium.driver.WriteConcern wc) throws de.caluga.morphium.driver.MorphiumDriverException
drop in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic void drop(String db, de.caluga.morphium.driver.WriteConcern wc) throws de.caluga.morphium.driver.MorphiumDriverException
drop in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic boolean exists(String db) throws de.caluga.morphium.driver.MorphiumDriverException
exists in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic List<Object> distinct(String db, String collection, String field, Map<String,Object> filter, de.caluga.morphium.driver.ReadPreference rp) throws de.caluga.morphium.driver.MorphiumDriverException
distinct in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic boolean exists(String db, String collection) throws de.caluga.morphium.driver.MorphiumDriverException
exists in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic List<Map<String,Object>> getIndexes(String db, String collection) throws de.caluga.morphium.driver.MorphiumDriverException
getIndexes in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic List<String> getCollectionNames(String db) throws de.caluga.morphium.driver.MorphiumDriverException
getCollectionNames in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic Map<String,Object> group(String db, String coll, Map<String,Object> query, Map<String,Object> initial, String jsReduce, String jsFinalize, de.caluga.morphium.driver.ReadPreference rp, String... keys) throws de.caluga.morphium.driver.MorphiumDriverException
group in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic List<Map<String,Object>> aggregate(String db, String collection, List<Map<String,Object>> pipeline, boolean explain, boolean allowDiskUse, de.caluga.morphium.driver.ReadPreference readPreference) throws de.caluga.morphium.driver.MorphiumDriverException
aggregate in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic boolean isSocketKeepAlive()
isSocketKeepAlive in interface de.caluga.morphium.driver.MorphiumDriverpublic void setSocketKeepAlive(boolean socketKeepAlive)
setSocketKeepAlive in interface de.caluga.morphium.driver.MorphiumDriverpublic int getHeartbeatConnectTimeout()
getHeartbeatConnectTimeout in interface de.caluga.morphium.driver.MorphiumDriverpublic void setHeartbeatConnectTimeout(int heartbeatConnectTimeout)
setHeartbeatConnectTimeout in interface de.caluga.morphium.driver.MorphiumDriverpublic int getMaxWaitTime()
getMaxWaitTime in interface de.caluga.morphium.driver.MorphiumDriverpublic void setMaxWaitTime(int maxWaitTime)
setMaxWaitTime in interface de.caluga.morphium.driver.MorphiumDriverpublic boolean isCapped(String db, String coll) throws de.caluga.morphium.driver.MorphiumDriverException
isCapped in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionpublic de.caluga.morphium.driver.bulk.BulkRequestContext createBulkContext(de.caluga.morphium.Morphium m,
String db,
String collection,
boolean ordered,
de.caluga.morphium.driver.WriteConcern wc)
createBulkContext in interface de.caluga.morphium.driver.MorphiumDriverpublic void createIndex(String db, String collection, Map<String,Object> index, Map<String,Object> options) throws de.caluga.morphium.driver.MorphiumDriverException
createIndex in interface de.caluga.morphium.driver.MorphiumDriverde.caluga.morphium.driver.MorphiumDriverExceptionCopyright © 2016. All rights reserved.