Class Read
- java.lang.Object
-
- org.trellisldp.ext.cassandra.query.CassandraQuery
-
- org.trellisldp.ext.cassandra.query.binary.BinaryQuery
-
- org.trellisldp.ext.cassandra.query.binary.BinaryReadQuery
-
- org.trellisldp.ext.cassandra.query.binary.Read
-
@ApplicationScoped public class Read extends BinaryReadQuery
Reads all bytes from a binary to anInputStream.
-
-
Field Summary
-
Fields inherited from class org.trellisldp.ext.cassandra.query.CassandraQuery
consistency, preparedStmtAsync, queryString, readBinaryWorkers, session, writeWorkers
-
-
Constructor Summary
Constructors Constructor Description Read()For use with RESTeasy and CDI proxies.Read(CqlSession session, ConsistencyLevel consistency)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletionStage<InputStream>execute(IRI id)-
Methods inherited from class org.trellisldp.ext.cassandra.query.binary.BinaryReadQuery
retrieve
-
Methods inherited from class org.trellisldp.ext.cassandra.query.CassandraQuery
executeSyncRead, preparedStatementAsync
-
-
-
-
Constructor Detail
-
Read
public Read()
For use with RESTeasy and CDI proxies.- API Note:
- This construtor is used by CDI runtimes that require a public, no-argument constructor. It should not be invoked directly in user code.
-
Read
@Inject public Read(CqlSession session, @BinaryReadConsistency ConsistencyLevel consistency)
- Parameters:
session- the cassandra sessionconsistency- the consistency level
-
-
Method Detail
-
execute
public CompletionStage<InputStream> execute(IRI id)
- Parameters:
id- theIRIfor a binary- Returns:
- An
InputStreamof bytes as requested. Theskipmethod of thisInputStreamis guaranteed to skip as many bytes as asked. - See Also:
BinaryReadQuery.retrieve(IRI, BoundStatement)
-
-