Class Insert
- java.lang.Object
-
- org.trellisldp.ext.cassandra.query.CassandraQuery
-
- org.trellisldp.ext.cassandra.query.binary.BinaryQuery
-
- org.trellisldp.ext.cassandra.query.binary.Insert
-
- All Implemented Interfaces:
Executor
@ApplicationScoped public class Insert extends BinaryQuery implements Executor
Insert binary data into a table.
-
-
Field Summary
-
Fields inherited from class org.trellisldp.ext.cassandra.query.CassandraQuery
consistency, preparedStmtAsync, queryString, readBinaryWorkers, session, writeWorkers
-
-
Constructor Summary
Constructors Constructor Description Insert()For use with RESTeasy and CDI proxies.Insert(CqlSession session, ConsistencyLevel consistency)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(Runnable command)CompletionStage<Void>execute(IRI id, int chunkSize, int chunkIndex, InputStream chunk)-
Methods inherited from class org.trellisldp.ext.cassandra.query.CassandraQuery
executeSyncRead, preparedStatementAsync
-
-
-
-
Constructor Detail
-
Insert
public Insert()
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.
-
Insert
@Inject public Insert(CqlSession session, @BinaryWriteConsistency ConsistencyLevel consistency)
- Parameters:
session- the cassandra sessionconsistency- the consistency level
-
-
Method Detail
-
execute
public CompletionStage<Void> execute(IRI id, int chunkSize, int chunkIndex, InputStream chunk)
- Parameters:
id- theIRIof this binarychunkSize- size of chunk to use for this binarychunkIndex- which chunk this ischunk- the bytes of this chunk- Returns:
- whether and when it has been inserted
-
-