[New] Added StrolchTransaction.reset()
This commit is contained in:
parent
a1ef05a6b7
commit
07d2329725
|
@ -1428,6 +1428,16 @@ public abstract class AbstractTransaction implements StrolchTransaction {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void reset() {
|
||||||
|
clearCache();
|
||||||
|
if (this.commands != null)
|
||||||
|
this.commands.clear();
|
||||||
|
if (this.objectFilter != null)
|
||||||
|
this.objectFilter.clearCache();
|
||||||
|
logger.info("Cache, commands and changes have been cleared!");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void flush() {
|
public void flush() {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -292,6 +292,12 @@ public interface StrolchTransaction extends AutoCloseable {
|
||||||
*/
|
*/
|
||||||
void clearCache();
|
void clearCache();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets this TX so that all caches and changes are reverted, fetched objects might need to be re-fetched to have a
|
||||||
|
* clean state. Locks are not released!
|
||||||
|
*/
|
||||||
|
void reset();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Performs all registered commands
|
* Performs all registered commands
|
||||||
|
|
Loading…
Reference in New Issue