mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1245 - Refactor internals - move logic to TransactionManager from DefaultServer
This commit is contained in:
@@ -552,12 +552,7 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
|
||||
*/
|
||||
@Override
|
||||
public void externalModification(TransactionEventTable tableEvent) {
|
||||
SpiTransaction t = transactionManager.get();
|
||||
if (t != null) {
|
||||
t.getEvent().add(tableEvent);
|
||||
} else {
|
||||
transactionManager.externalModification(tableEvent);
|
||||
}
|
||||
transactionManager.externalModification(tableEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -417,14 +417,16 @@ public class TransactionManager implements SpiTransactionManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a Transaction that comes from another framework or local code.
|
||||
* <p>
|
||||
* For cases where raw SQL/JDBC or other frameworks are used this can
|
||||
* invalidate the appropriate parts of the cache.
|
||||
* </p>
|
||||
*/
|
||||
public void externalModification(TransactionEventTable tableEvents) {
|
||||
public void externalModification(TransactionEventTable tableEvent) {
|
||||
SpiTransaction t = get();
|
||||
if (t != null) {
|
||||
t.getEvent().add(tableEvent);
|
||||
} else {
|
||||
externalModificationEvent(tableEvent);
|
||||
}
|
||||
}
|
||||
|
||||
private void externalModificationEvent(TransactionEventTable tableEvents) {
|
||||
|
||||
TransactionEvent event = new TransactionEvent();
|
||||
event.add(tableEvents);
|
||||
|
||||
Reference in New Issue
Block a user