Interface WriteStrategy
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
ReadOnlyWriteStrategy,RepositoryWriteStrategy
Interface for the
WriteStrategy that 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:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddStatement(Resource subj, IRI pred, Value obj, Resource... contexts) Add a statementvoidbegin()Begin a transaction.voidvoidvoidclose()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 Details
-
close
Close this write strategy (e.g. close a sharedRepositoryException).- Specified by:
closein interfaceAutoCloseable- Throws:
RepositoryException
-
setTransactionSettings
AssignTransactionSettings to be used for the next transaction.- Parameters:
transactionSettings- one or moreTransactionSettings- Throws:
RepositoryException
-
begin
Begin a transaction.- Throws:
RepositoryException
-
commit
Commit a transaction.- Throws:
RepositoryException
-
rollback
Rollback 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
- Throws:
RepositoryException
-
clearNamespaces
- Throws:
RepositoryException
-