Package net.quasardb.qdb.kv
Class BlobEntry
java.lang.Object
net.quasardb.qdb.kv.Entry
net.quasardb.qdb.kv.BlobEntry
A blob in the database.
Blob stands for "Binary Large Object", it's an entry which store binary data.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.quasardb.qdb.kv.Entry
Entry.Type
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()
Read the content of the blob.static BlobEntry
void
put
(ByteBuffer content) Create a new blob with the specified content.boolean
update
(ByteBuffer content) Replaces the content of the blob.
-
Constructor Details
-
BlobEntry
-
-
Method Details
-
ofAlias
-
put
Create a new blob with the specified content. Fails if the blob already exists.- Parameters:
content
- The content of the blob to be created.- Throws:
AliasAlreadyExistsException
- If an entry matching the provided alias already exists.ClusterClosedException
- If QdbCluster.close() has been called.ReservedAliasException
- If the alias name or prefix is reserved for quasardb internal use.
-
update
Replaces the content of the blob.- Parameters:
content
- The content of the blob to be set.- Returns:
- true if the blob was created, or false it it was updated.
- Throws:
ClusterClosedException
- If QdbCluster.close() has been called.IncompatibleTypeException
- If the alias has a type incompatible for this operation.InvalidArgumentException
- If the expiry time is in the past (with a certain tolerance)ReservedAliasException
- If the alias name or prefix is reserved for quasardb internal use.
-
get
Read the content of the blob.- Returns:
- The current content.
- Throws:
AliasNotFoundException
- If an entry matching the provided alias cannot be found.IncompatibleTypeException
- If the alias has a type incompatible for this operation.ReservedAliasException
- If the alias name or prefix is reserved for quasardb internal use.
-