public interface KeyValue
| Modifier and Type | Method and Description |
|---|---|
long |
delete(java.lang.String key)
Deletes a key.
|
KvEntry |
getEntry(java.lang.String key)
Get the full entry for a key
THIS IS A BETA FEATURE AND SUBJECT TO CHANGE
|
java.lang.Long |
getLongValue(java.lang.String key)
Get the number value for a key
THIS IS A BETA FEATURE AND SUBJECT TO CHANGE
|
java.lang.String |
getStringValue(java.lang.String key)
Get the string value for a key
THIS IS A BETA FEATURE AND SUBJECT TO CHANGE
|
byte[] |
getValue(java.lang.String key)
Get the byte[] value for a key
THIS IS A BETA FEATURE AND SUBJECT TO CHANGE
|
long |
put(java.lang.String key,
byte[] value)
Put a byte[] as the value for a key
THIS IS A BETA FEATURE AND SUBJECT TO CHANGE
|
long |
put(java.lang.String key,
long value)
Put a long as the value for a key
THIS IS A BETA FEATURE AND SUBJECT TO CHANGE
|
long |
put(java.lang.String key,
java.lang.String value)
Put a string as the value for a key
THIS IS A BETA FEATURE AND SUBJECT TO CHANGE
|
byte[] getValue(java.lang.String key)
throws java.io.IOException,
JetStreamApiException
key - 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.IllegalArgumentException - the server is not JetStream enabledjava.lang.String getStringValue(java.lang.String key)
throws java.io.IOException,
JetStreamApiException
key - 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.IllegalArgumentException - the server is not JetStream enabledjava.lang.Long getLongValue(java.lang.String key)
throws java.io.IOException,
JetStreamApiException
key - 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.IllegalArgumentException - the server is not JetStream enabledKvEntry getEntry(java.lang.String key) throws java.io.IOException, JetStreamApiException
key - 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.IllegalArgumentException - the server is not JetStream enabledlong put(java.lang.String key,
byte[] value)
throws java.io.IOException,
JetStreamApiException
key - the keyvalue - the bytes of the valuejava.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 enabledlong put(java.lang.String key,
java.lang.String value)
throws java.io.IOException,
JetStreamApiException
key - the keyvalue - the UTF-8 stringjava.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 enabledlong put(java.lang.String key,
long value)
throws java.io.IOException,
JetStreamApiException
key - the keyvalue - the numberjava.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 enabledlong delete(java.lang.String key)
throws java.io.IOException,
JetStreamApiException
key - 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 data