Interface WriteStrategy
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
ReadOnlyWriteStrategy
,RepositoryWriteStrategy
@Experimental public interface WriteStrategy extends AutoCloseable
Interface for theWriteStrategy
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:
RepositoryWriteStrategy
,ReadOnlyWriteStrategy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addStatement(Resource subj, IRI pred, Value obj, Resource... contexts)
Add a statementvoid
begin()
Begin a transaction.void
clear(Resource... contexts)
void
clearNamespaces()
void
close()
Close this write strategy (e.g.void
commit()
Commit a transaction.void
removeStatement(Resource subj, IRI pred, Value obj, Resource... contexts)
Remove a statementvoid
rollback()
Rollback a transaction.void
setTransactionSettings(TransactionSetting... transactionSettings)
AssignTransactionSetting
s to be used for the next transaction.
-
-
-
Method Detail
-
close
void close() throws RepositoryException
Close this write strategy (e.g. close a sharedRepositoryException
).- Specified by:
close
in interfaceAutoCloseable
- Throws:
RepositoryException
-
setTransactionSettings
void setTransactionSettings(TransactionSetting... transactionSettings) throws RepositoryException
AssignTransactionSetting
s to be used for the next transaction.- Parameters:
transactionSettings
- one or moreTransactionSetting
s- Throws:
RepositoryException
-
begin
void begin() throws RepositoryException
Begin a transaction.- Throws:
RepositoryException
-
commit
void commit() throws RepositoryException
Commit a transaction.- Throws:
RepositoryException
-
rollback
void rollback() throws RepositoryException
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
void clear(Resource... contexts) throws RepositoryException
- Throws:
RepositoryException
-
clearNamespaces
void clearNamespaces() throws RepositoryException
- Throws:
RepositoryException
-
-