| Package | Description |
|---|---|
| com.b14.qdb |
Official quasardb Java API
|
| Modifier and Type | Method and Description |
|---|---|
void |
Quasardb.close()
Close the connection to the quasardb instance and frees resources.
|
<V> V |
Quasardb.compareAndSwap(String alias,
V value,
V comparand)
Atomically compare an existing alias with comparand, updates it to new if they match and return the original value.
Please note that entries starting with "qdb" are reserved. |
<V> V |
Quasardb.compareAndSwap(String alias,
V value,
V comparand,
long expiryTime)
Atomically compare an existing alias with comparand, updates it to new if they match and return the original value.
Please note that entries starting with "qdb" are reserved. |
void |
Quasardb.connect()
Initialize connection to the quasardb instance and setup serialization framework.
|
<V> V |
Quasardb.get(String alias)
Get the entry associated with the supplied unique key (alias).
|
<V> V |
Quasardb.getAndReplace(String alias,
V value)
Update an existing alias with data and return its previous value.
Please note that entries starting with "qdb" are reserved. |
<V> V |
Quasardb.getAndReplace(String alias,
V value,
long expiryTime)
Update an existing alias with data and return its previous value.
Please note that entries starting with "qdb" are reserved. |
String |
Quasardb.getBuild()
Retrieve the build version of the current quasardb instance.
|
String |
Quasardb.getCurrentNodeConfig()
Retrieve the configuration of the current quasardb instance in JSON.
|
String |
Quasardb.getCurrentNodeStatus()
Retrieve the status of the current quasardb instance in JSON format.
|
String |
Quasardb.getCurrentNodeTopology()
Retrieve the topology of the current quasardb instance in JSON.
|
Date |
Quasardb.getExpiryTimeInDate(String alias)
Retrieve the expiry time in date for a provided alias
|
long |
Quasardb.getExpiryTimeInSeconds(String alias)
Retrieve the expiry time in seconds for a provided alias
|
String |
Quasardb.getNodeConfig(String node,
int port)
Retrieve the configuration of the specific quasardb instance in JSON.
|
String |
Quasardb.getNodeStatus(String node,
int port)
Retrieve the status of the current quasardb instance in JSON format.
|
String |
Quasardb.getNodeTopology(String node,
int port)
Retrieve the topology of the current quasardb instance.
|
<V> V |
Quasardb.getRemove(String alias)
Atomically get the entry associated with the supplied unique key (alias) and remove it.
|
String |
Quasardb.getVersion()
Retrieve the version of the current quasardb instance.
|
void |
Quasardb.purgeAll()
Delete all the stored objects in the current quasardb instance.
Use with caution |
<V> void |
Quasardb.put(String alias,
V value)
Adds an entry (value) to the current qdb instance under the alias key.
Entries must not already exist. Entries starting with "qdb" are reserved. |
<V> void |
Quasardb.put(String alias,
V value,
long expiryTime)
Adds an entry (value) to the current qdb instance under the alias key.
Entries must not already exist. Entries starting with "qdb" are reserved. |
boolean |
Quasardb.remove(String alias)
Delete the object associated with the alias key.
Please note that entries starting with "qdb" are reserved. |
<V> boolean |
Quasardb.removeIf(String alias,
V comparand)
Atomically delete the object associated whith the alias key if the object is equal to comparand.
|
<V> Results |
Quasardb.runBatch(List<Operation<V>> operations)
Submit a list of operation which can increase performance when it is necessary to run many small operations.
Using properly the batch operations requires : initializing running list of operations read results |
void |
Quasardb.setDefaultExpiryTimeInSeconds(long expiryTime)
Set the default expiry time in seconds for all next entries.
|
void |
Quasardb.setExpiryTimeAt(String alias,
Date expiryDate)
Change the expiry time for a provided alias at the provided date.
|
void |
Quasardb.setExpiryTimeInSeconds(String alias,
long expiryTime)
Change the expiry time in seconds for a provided alias
|
List<String> |
Quasardb.startsWith(String prefix)
Perform a search prefix based operation on all quasardb entries.
Pay attention that : search operation is based on aliases, not on values. search operation is case sensitive. searching on reserved aliases (starts with "qdb") is not allowed. |
void |
Quasardb.stopCurrentNode(String reason)
Stop the current node with a given reason.
|
void |
Quasardb.stopNode(String node,
int port,
String reason)
Stop a specific node with a given reason.
|
<V> boolean |
Quasardb.update(String alias,
V value)
Update an existing entry or create a new one.
|
<V> boolean |
Quasardb.update(String alias,
V value,
long expiryTime)
Update an existing entry or create a new one.
Please note that entries starting with "qdb" are reserved. |
Copyright © 2015 quasardb. All Rights Reserved.