Class RepositoryWriteStrategy
java.lang.Object
org.eclipse.rdf4j.federated.write.RepositoryWriteStrategy
- All Implemented Interfaces:
AutoCloseable
,WriteStrategy
A
WriteStrategy
to write to a designated Repository
. This write strategy opens a fresh
RepositoryConnection
and keeps this until a call of close()
.
Note: this is an experimental feature which is subject to change in a future version.
- Author:
- Andreas Schwarte
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addStatement
(Resource subj, IRI pred, Value obj, Resource... contexts) Add a statementvoid
begin()
Begin a transaction.void
void
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.
-
Constructor Details
-
RepositoryWriteStrategy
-
-
Method Details
-
close
Description copied from interface:WriteStrategy
Close this write strategy (e.g. close a sharedRepositoryException
).- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceWriteStrategy
- Throws:
RepositoryException
-
begin
Description copied from interface:WriteStrategy
Begin a transaction.- Specified by:
begin
in interfaceWriteStrategy
- Throws:
RepositoryException
-
commit
Description copied from interface:WriteStrategy
Commit a transaction.- Specified by:
commit
in interfaceWriteStrategy
- Throws:
RepositoryException
-
rollback
Description copied from interface:WriteStrategy
Rollback a transaction.- Specified by:
rollback
in interfaceWriteStrategy
- Throws:
RepositoryException
-
addStatement
public void addStatement(Resource subj, IRI pred, Value obj, Resource... contexts) throws RepositoryException Description copied from interface:WriteStrategy
Add a statement- Specified by:
addStatement
in interfaceWriteStrategy
- Parameters:
subj
-pred
-obj
-contexts
-- Throws:
RepositoryException
-
removeStatement
public void removeStatement(Resource subj, IRI pred, Value obj, Resource... contexts) throws RepositoryException Description copied from interface:WriteStrategy
Remove a statement- Specified by:
removeStatement
in interfaceWriteStrategy
- Parameters:
subj
-pred
-obj
-contexts
-- Throws:
RepositoryException
-
clear
- Specified by:
clear
in interfaceWriteStrategy
- Throws:
RepositoryException
-
clearNamespaces
- Specified by:
clearNamespaces
in interfaceWriteStrategy
- Throws:
RepositoryException
-
setTransactionSettings
public void setTransactionSettings(TransactionSetting... transactionSettings) throws RepositoryException Description copied from interface:WriteStrategy
AssignTransactionSetting
s to be used for the next transaction.- Specified by:
setTransactionSettings
in interfaceWriteStrategy
- Parameters:
transactionSettings
- one or moreTransactionSetting
s- Throws:
RepositoryException
-