public interface InfluxDB
Modifier and Type | Interface and Description |
---|---|
static class |
InfluxDB.LogLevel
Controls the level of logging of the REST layer.
|
Modifier and Type | Method and Description |
---|---|
void |
alterDatabasePrivilege(java.lang.String database,
java.lang.String name,
boolean isAdmin,
java.lang.String... permissions)
Alter the admin privilege of a given database user.
|
void |
authenticateDatabaseUser(java.lang.String database,
java.lang.String username,
java.lang.String password)
Authenticate with the given credentials against the database.
|
void |
createClusterAdmin(java.lang.String name,
java.lang.String password)
Create a new cluster admin.
|
void |
createDatabase(DatabaseConfiguration config)
Create a new Database from a
DatabaseConfiguration . |
void |
createDatabase(java.lang.String name)
Create a new Database.
|
void |
createDatabaseUser(java.lang.String database,
java.lang.String name,
java.lang.String password,
java.lang.String... permissions)
Create a new regular database user.
|
void |
createShard(Shard shard)
Deprecated.
this functionality is gone with 0.8.0, will be removed in the next version.
|
void |
createShardSpace(java.lang.String database,
ShardSpace shardSpace)
Create a ShardSpace in a Database.
|
void |
deleteClusterAdmin(java.lang.String name)
Delete a cluster admin.
|
void |
deleteContinuousQuery(java.lang.String database,
int id)
Delete a continous query.
|
void |
deleteDatabase(java.lang.String name)
Delete a database.
|
void |
deleteDatabaseUser(java.lang.String database,
java.lang.String name)
Delete a database user.
|
void |
deleteSeries(java.lang.String database,
java.lang.String serieName)
Delete a serie.
|
java.util.List<User> |
describeClusterAdmins()
Describe all cluster admins.
|
java.util.List<ContinuousQuery> |
describeContinuousQueries(java.lang.String database)
Describe all contious queries in a database.
|
java.util.List<Database> |
describeDatabases()
Describe all available databases.
|
java.util.List<User> |
describeDatabaseUsers(java.lang.String database)
Describe all database users allowed to acces the given database.
|
void |
dropShard(Shard shard)
Deprecated.
this functionality is gone with 0.8.0, will be removed in the next version.
|
void |
dropShardSpace(java.lang.String database,
java.lang.String name)
Drop a existing ShardSpace from a Database.
|
void |
forceRaftCompaction()
Force Database compaction.
|
Shards |
getShards()
Deprecated.
this functionality is gone with 0.8.0, will be removed in the next version.
|
java.util.List<ShardSpace> |
getShardSpaces()
Describe all existing shardspaces.
|
java.util.List<java.lang.String> |
interfaces()
List all interfaces influxDB is listening.
|
java.util.List<Server> |
listServers()
List all servers which are member of the cluster.
|
Pong |
ping()
Ping this influxDB-
|
java.util.List<Serie> |
query(java.lang.String database,
java.lang.String query,
java.util.concurrent.TimeUnit precision)
Execute a query agains a database.
|
void |
removeServers(int id)
Remove the given Server from the cluster.
|
InfluxDB |
setLogLevel(InfluxDB.LogLevel logLevel)
Set the loglevel which is used for REST related actions.
|
java.lang.Boolean |
sync()
Sync the database to the filesystem.
|
void |
updateClusterAdmin(java.lang.String name,
java.lang.String password)
Update the password of the given admin.
|
void |
updateDatabaseUser(java.lang.String database,
java.lang.String name,
java.lang.String password,
java.lang.String... permissions)
Update the password and/or the permissions of a database user.
|
java.lang.String |
version()
Return the version of the connected influxDB Server.
|
void |
write(java.lang.String database,
java.util.concurrent.TimeUnit precision,
Serie... series)
Write a Series to the given database.
|
void |
writeUdp(int port,
Serie... series)
Write a Series to the given database.
|
InfluxDB setLogLevel(InfluxDB.LogLevel logLevel)
logLevel
- the loglevel to set.Pong ping()
java.lang.String version()
void write(java.lang.String database, java.util.concurrent.TimeUnit precision, Serie... series)
database
- the name of the database to write to.precision
- the precision used for the values.series
- a Array of Serie
s to write.void writeUdp(int port, Serie... series)
port
- the port where to reach the influxdb udp service. The database is configured per
port in the influxdb configuration.series
- a Array of Serie
s to write.java.util.List<Serie> query(java.lang.String database, java.lang.String query, java.util.concurrent.TimeUnit precision)
database
- the name of the database.query
- the query to execute, for language specification please see http://influxdb.org/docs/query_languageprecision
- the precision used for the values.void createDatabase(java.lang.String name)
name
- the name of the new database.void createDatabase(DatabaseConfiguration config)
DatabaseConfiguration
. This is the way to create a db
with shards specified.config
- the configuration for the database to create..void deleteDatabase(java.lang.String name)
name
- the name of the database to delete.java.util.List<Database> describeDatabases()
void createClusterAdmin(java.lang.String name, java.lang.String password)
name
- the name of the new admin.password
- the password for the new admin.void deleteClusterAdmin(java.lang.String name)
name
- the name of the admin to delete.java.util.List<User> describeClusterAdmins()
void updateClusterAdmin(java.lang.String name, java.lang.String password)
name
- the name of the admin for which the password should be updated.password
- the new password for the given admin.void createDatabaseUser(java.lang.String database, java.lang.String name, java.lang.String password, java.lang.String... permissions)
database
- the name of the database where this user is allowed.name
- the name of the new database user.password
- the password for this user.permissions
- a array of readFrom and writeTo permissions (in this order) and given in regex
form.void deleteDatabaseUser(java.lang.String database, java.lang.String name)
database
- the name of the database the given user should be removed from.name
- the name of the user to remove.java.util.List<User> describeDatabaseUsers(java.lang.String database)
database
- the name of the database for which all users should be described.void updateDatabaseUser(java.lang.String database, java.lang.String name, java.lang.String password, java.lang.String... permissions)
database
- the name of the database where this user is allowed.name
- the name of the existing database user.password
- the password for this user.permissions
- a array of readFrom and writeTo permissions (in this order) and given in regex
form.void alterDatabasePrivilege(java.lang.String database, java.lang.String name, boolean isAdmin, java.lang.String... permissions)
database
- the name of the database where this user is allowed.name
- the name of the existing database user.isAdmin
- if set to true this user is a database admin, otherwise it isnt.permissions
- a array of readFrom and writeTo permissions (in this order) and given in regex
form.void authenticateDatabaseUser(java.lang.String database, java.lang.String username, java.lang.String password)
database
- the name of the database where this user is allowed.username
- the name of the existing database user.password
- the password for this user.java.util.List<ContinuousQuery> describeContinuousQueries(java.lang.String database)
database
- the name of the database for which all continous queries should be described.void deleteContinuousQuery(java.lang.String database, int id)
database
- the name of the database for which this query should be deleted.id
- the id of the query.void deleteSeries(java.lang.String database, java.lang.String serieName)
database
- the database in which the given serie should be deleted.serieName
- the name of the serie.void forceRaftCompaction()
java.util.List<java.lang.String> interfaces()
java.lang.Boolean sync()
java.util.List<Server> listServers()
void removeServers(int id)
id
- the id of the server to remove.@Deprecated void createShard(Shard shard)
shard
- the new shard to create.@Deprecated Shards getShards()
@Deprecated void dropShard(Shard shard)
shard
- the shard to delete.java.util.List<ShardSpace> getShardSpaces()
void dropShardSpace(java.lang.String database, java.lang.String name)
database
- the name of the database.name
- the name of the ShardSpace to delete.void createShardSpace(java.lang.String database, ShardSpace shardSpace)
database
- the name of the database.shardSpace
- the shardSpace to create in this databaseCopyright © 2014. All Rights Reserved.