Interface WriteStrategy
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
ReadOnlyWriteStrategy,RepositoryWriteStrategy
@Experimental public interface WriteStrategy extends AutoCloseable
Interface for theWriteStrategythat is used for writing data to the federation. The implementation can decided upon how is data written to the underlying federation members (e.g. to a designated federation member)Note: this is an experimental feature which is subject to change in a future version.
- Author:
- Andreas Schwarte
- See Also:
RepositoryWriteStrategy,ReadOnlyWriteStrategy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddStatement(Resource subj, IRI pred, Value obj, Resource... contexts)Add a statementvoidbegin()Begin a transaction.voidclear(Resource... contexts)voidclearNamespaces()voidclose()Close this write strategy (e.g.voidcommit()Commit a transaction.voidremoveStatement(Resource subj, IRI pred, Value obj, Resource... contexts)Remove a statementvoidrollback()Rollback a transaction.voidsetTransactionSettings(TransactionSetting... transactionSettings)AssignTransactionSettings to be used for the next transaction.
-
-
-
Method Detail
-
close
void close() throws RepositoryExceptionClose this write strategy (e.g. close a sharedRepositoryException).- Specified by:
closein interfaceAutoCloseable- Throws:
RepositoryException
-
setTransactionSettings
void setTransactionSettings(TransactionSetting... transactionSettings) throws RepositoryException
AssignTransactionSettings to be used for the next transaction.- Parameters:
transactionSettings- one or moreTransactionSettings- Throws:
RepositoryException
-
begin
void begin() throws RepositoryExceptionBegin a transaction.- Throws:
RepositoryException
-
commit
void commit() throws RepositoryExceptionCommit a transaction.- Throws:
RepositoryException
-
rollback
void rollback() throws RepositoryExceptionRollback a transaction.- Throws:
RepositoryException
-
addStatement
void addStatement(Resource subj, IRI pred, Value obj, Resource... contexts) throws RepositoryException
Add a statement- Parameters:
subj-pred-obj-contexts-- Throws:
RepositoryException
-
removeStatement
void removeStatement(Resource subj, IRI pred, Value obj, Resource... contexts) throws RepositoryException
Remove a statement- Parameters:
subj-pred-obj-contexts-- Throws:
RepositoryException
-
clear
void clear(Resource... contexts) throws RepositoryException
- Throws:
RepositoryException
-
clearNamespaces
void clearNamespaces() throws RepositoryException- Throws:
RepositoryException
-
-