@ApplicationScoped
public class CassandraBinaryService
extends java.lang.Object
implements org.trellisldp.api.BinaryService
BinaryService by chunking binary data across Cassandra.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONFIG_MAX_CHUNK_SIZE
Configuration key for adjusting the chunk size of binary resources.
|
static int |
DEFAULT_CHUNK_SIZE
The default chunk size for binary resources, in bytes.
|
| Constructor and Description |
|---|
CassandraBinaryService()
For use with RESTeasy and CDI proxies.
|
CassandraBinaryService(org.trellisldp.api.IdentifierService idService,
GetChunkSize get,
Insert insert,
Delete delete,
Read read,
ReadRange readRange) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
generateIdentifier() |
java.util.concurrent.CompletionStage<org.trellisldp.api.Binary> |
get(org.apache.commons.rdf.api.IRI id) |
java.util.concurrent.CompletionStage<java.lang.Void> |
purgeContent(org.apache.commons.rdf.api.IRI identifier) |
java.util.concurrent.CompletionStage<java.lang.Void> |
setContent(org.trellisldp.api.BinaryMetadata meta,
java.io.InputStream stream) |
public static final java.lang.String CONFIG_MAX_CHUNK_SIZE
public static final int DEFAULT_CHUNK_SIZE
public CassandraBinaryService()
@Inject
public CassandraBinaryService(org.trellisldp.api.IdentifierService idService,
GetChunkSize get,
Insert insert,
Delete delete,
Read read,
ReadRange readRange)
idService - IdentifierService to use for binariesget - a GetChunkSize query to useinsert - a Insert query to usedelete - a Delete query to useread - a Read query to usereadRange - a ReadRange query to usepublic java.util.concurrent.CompletionStage<org.trellisldp.api.Binary> get(org.apache.commons.rdf.api.IRI id)
get in interface org.trellisldp.api.RetrievalService<org.trellisldp.api.Binary>public java.util.concurrent.CompletionStage<java.lang.Void> setContent(org.trellisldp.api.BinaryMetadata meta,
java.io.InputStream stream)
setContent in interface org.trellisldp.api.BinaryServicepublic java.util.concurrent.CompletionStage<java.lang.Void> purgeContent(org.apache.commons.rdf.api.IRI identifier)
purgeContent in interface org.trellisldp.api.BinaryServicepublic java.lang.String generateIdentifier()
generateIdentifier in interface org.trellisldp.api.BinaryService