Class ReadOnlyWriteStrategy
- java.lang.Object
-
- org.eclipse.rdf4j.federated.write.ReadOnlyWriteStrategy
-
- All Implemented Interfaces:
AutoCloseable
,WriteStrategy
public class ReadOnlyWriteStrategy extends Object implements WriteStrategy
DefaultWriteStrategy
implementation for read only federations. In case a user attempts to perform a write operation aUnsupportedOperationException
is thrown.- Author:
- Andreas Schwarte
-
-
Field Summary
Fields Modifier and Type Field Description static ReadOnlyWriteStrategy
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Field Detail
-
INSTANCE
public static final ReadOnlyWriteStrategy INSTANCE
-
-
Method Detail
-
begin
public void begin() throws RepositoryException
Description copied from interface:WriteStrategy
Begin a transaction.- Specified by:
begin
in interfaceWriteStrategy
- Throws:
RepositoryException
-
commit
public void commit() throws RepositoryException
Description copied from interface:WriteStrategy
Commit a transaction.- Specified by:
commit
in interfaceWriteStrategy
- Throws:
RepositoryException
-
rollback
public void rollback() throws RepositoryException
Description copied from interface:WriteStrategy
Rollback a transaction.- Specified by:
rollback
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
-
addStatement
public void addStatement(Resource subj, IRI pred, Value obj, Resource... contexts)
Description copied from interface:WriteStrategy
Add a statement- Specified by:
addStatement
in interfaceWriteStrategy
-
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
- Throws:
RepositoryException
-
clear
public void clear(Resource... contexts) throws RepositoryException
- Specified by:
clear
in interfaceWriteStrategy
- Throws:
RepositoryException
-
close
public void close() throws RepositoryException
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
-
clearNamespaces
public void clearNamespaces() throws RepositoryException
- Specified by:
clearNamespaces
in interfaceWriteStrategy
- Throws:
RepositoryException
-
-