public interface KeyValueManagement
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
bucketsNames()
Get the list of bucket names
THIS IS A BETA FEATURE AND SUBJECT TO CHANGE
|
BucketInfo |
createBucket(BucketConfiguration config)
Create a bucket.
|
boolean |
deleteBucket(java.lang.String bucketName)
Deletes an existing bucket.
|
BucketInfo |
getBucketInfo(java.lang.String bucketName)
Gets the info for an existing bucket.
|
java.util.List<KvEntry> |
getHistory(java.lang.String bucketName,
java.lang.String key)
Get the history (list of KvEntry) for a key
THIS IS A BETA FEATURE AND SUBJECT TO CHANGE
|
java.util.Set<java.lang.String> |
keys(java.lang.String bucketName)
Get the set of the keys in a bucket.
|
PurgeResponse |
purgeBucket(java.lang.String bucketName)
Purge all keys/values/history from the bucket.
|
PurgeResponse |
purgeKey(java.lang.String bucketName,
java.lang.String key)
Purge all values/history from the specific key
THIS IS A BETA FEATURE AND SUBJECT TO CHANGE
|
BucketInfo createBucket(BucketConfiguration config) throws java.io.IOException, JetStreamApiException
config - the bucket configurationjava.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the datajava.lang.IllegalArgumentException - the server is not JetStream enabledboolean deleteBucket(java.lang.String bucketName)
throws java.io.IOException,
JetStreamApiException
bucketName - the stream name to use.java.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the dataBucketInfo getBucketInfo(java.lang.String bucketName) throws java.io.IOException, JetStreamApiException
bucketName - the stream name to use.java.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the dataPurgeResponse purgeBucket(java.lang.String bucketName) throws java.io.IOException, JetStreamApiException
bucketName - the bucket namejava.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the dataPurgeResponse purgeKey(java.lang.String bucketName, java.lang.String key) throws java.io.IOException, JetStreamApiException
bucketName - the bucket namekey - the keyjava.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the datajava.util.List<KvEntry> getHistory(java.lang.String bucketName, java.lang.String key) throws java.io.IOException, JetStreamApiException, java.lang.InterruptedException
bucketName - the bucket namekey - the keyjava.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the datajava.lang.InterruptedException - if the thread is interruptedjava.util.Set<java.lang.String> keys(java.lang.String bucketName)
throws java.io.IOException,
JetStreamApiException,
java.lang.InterruptedException
bucketName - the bucket namejava.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the datajava.lang.InterruptedException - if the thread is interruptedjava.util.List<java.lang.String> bucketsNames()
throws java.io.IOException,
JetStreamApiException,
java.lang.InterruptedException
java.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the datajava.lang.InterruptedException - if the thread is interrupted