org.openrdf.repository.memento
Class RepositoryMemento
java.lang.Object
org.openrdf.repository.memento.RepositoryMemento
- All Implemented Interfaces:
- RepositoryConnectionListener
public class RepositoryMemento
- extends Object
- implements RepositoryConnectionListener
Tracks changes to a RepositoryConnection and allows those changes to be
reversed. There is a performance hit when this object is attached to a
RepositoryConnection. This object depends on NotifyingRepository to
be on the stack. If the repository does not support or have enabled read
uncommitted, the StatementRealizerRepository must be a delegate of
NotifyingRepository.
- Author:
- James Leigh
|
Method Summary |
void |
add(RepositoryConnection conn,
Resource subj,
URI pred,
Value obj,
Resource... contexts)
|
void |
clear(RepositoryConnection conn,
Resource... contexts)
|
void |
clearNamespaces(RepositoryConnection conn)
|
void |
close(RepositoryConnection conn)
|
void |
commit(RepositoryConnection conn)
|
void |
redo(RepositoryConnection conn)
After this object has recorded changes to a connection, it can be
repeated with this method. |
void |
remove(RepositoryConnection conn,
Resource subj,
URI pred,
Value obj,
Resource... contexts)
|
void |
removeNamespace(RepositoryConnection conn,
String prefix)
|
void |
rollback(RepositoryConnection conn)
|
void |
setAutoCommit(RepositoryConnection conn,
boolean autoCommit)
|
void |
setNamespace(RepositoryConnection conn,
String prefix,
String name)
|
void |
undo(RepositoryConnection conn)
After this object has recorded changes to a connection, it can be
reverted with this method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RepositoryMemento
public RepositoryMemento(RepositoryConnection conn)
throws RepositoryException
- Throws:
RepositoryException
RepositoryMemento
public RepositoryMemento(NotifyingRepositoryConnection conn)
close
public void close(RepositoryConnection conn)
- Specified by:
close in interface RepositoryConnectionListener
setAutoCommit
public void setAutoCommit(RepositoryConnection conn,
boolean autoCommit)
- Specified by:
setAutoCommit in interface RepositoryConnectionListener
commit
public void commit(RepositoryConnection conn)
- Specified by:
commit in interface RepositoryConnectionListener
rollback
public void rollback(RepositoryConnection conn)
- Specified by:
rollback in interface RepositoryConnectionListener
add
public void add(RepositoryConnection conn,
Resource subj,
URI pred,
Value obj,
Resource... contexts)
- Specified by:
add in interface RepositoryConnectionListener
remove
public void remove(RepositoryConnection conn,
Resource subj,
URI pred,
Value obj,
Resource... contexts)
- Specified by:
remove in interface RepositoryConnectionListener
clear
public void clear(RepositoryConnection conn,
Resource... contexts)
- Specified by:
clear in interface RepositoryConnectionListener
setNamespace
public void setNamespace(RepositoryConnection conn,
String prefix,
String name)
- Specified by:
setNamespace in interface RepositoryConnectionListener
removeNamespace
public void removeNamespace(RepositoryConnection conn,
String prefix)
- Specified by:
removeNamespace in interface RepositoryConnectionListener
clearNamespaces
public void clearNamespaces(RepositoryConnection conn)
- Specified by:
clearNamespaces in interface RepositoryConnectionListener
undo
public void undo(RepositoryConnection conn)
throws RepositoryException
- After this object has recorded changes to a connection, it can be
reverted with this method. This RepositoryConnection does not have to be
the same connection that this object was attached to.
- Parameters:
conn -
- Throws:
RepositoryException
redo
public void redo(RepositoryConnection conn)
throws RepositoryException
- After this object has recorded changes to a connection, it can be
repeated with this method. This RepositoryConnection does not have to be
the same connection that this object was attached to.
- Parameters:
conn -
- Throws:
RepositoryException
Copyright © 2004-2008 Aduna. All Rights Reserved.