mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Refactor properties bootup, remove GlobalProperties and allow ServerConfig.loadFromProperties()
This commit is contained in:
+4
-44
@@ -1,15 +1,13 @@
|
||||
package com.avaje.ebeaninternal.server.transaction;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.avaje.ebeaninternal.api.SpiEbeanServer;
|
||||
import com.avaje.ebeaninternal.api.TransactionEventTable.TableIUD;
|
||||
import com.avaje.ebeaninternal.server.cluster.BinaryMessageList;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class RemoteTransactionEvent implements Runnable {
|
||||
|
||||
private List<BeanPersistIds> beanPersistList = new ArrayList<BeanPersistIds>();
|
||||
@@ -19,10 +17,6 @@ public class RemoteTransactionEvent implements Runnable {
|
||||
private List<BeanDeltaList> beanDeltaLists;
|
||||
|
||||
private BeanDeltaMap beanDeltaMap;
|
||||
|
||||
private List<IndexEvent> indexEventList;
|
||||
|
||||
private Set<IndexInvalidate> indexInvalidations;
|
||||
|
||||
private DeleteByIdMap deleteByIdMap;
|
||||
|
||||
@@ -56,12 +50,6 @@ public class RemoteTransactionEvent implements Runnable {
|
||||
|
||||
public void writeBinaryMessage(BinaryMessageList msgList) throws IOException {
|
||||
|
||||
if (indexInvalidations != null){
|
||||
for (IndexInvalidate indexInvalidate : indexInvalidations) {
|
||||
indexInvalidate.writeBinaryMessage(msgList);
|
||||
}
|
||||
}
|
||||
|
||||
if (tableList != null){
|
||||
for (int i = 0; i < tableList.size(); i++) {
|
||||
tableList.get(i).writeBinaryMessage(msgList);
|
||||
@@ -85,12 +73,6 @@ public class RemoteTransactionEvent implements Runnable {
|
||||
beanDeltaLists.get(i).writeBinaryMessage(msgList);
|
||||
}
|
||||
}
|
||||
|
||||
if (indexEventList != null){
|
||||
for (int i = 0; i < indexEventList.size(); i++) {
|
||||
indexEventList.get(i).writeBinaryMessage(msgList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
@@ -101,13 +83,6 @@ public class RemoteTransactionEvent implements Runnable {
|
||||
beanPersistList.add(beanPersist);
|
||||
}
|
||||
|
||||
public void addIndexInvalidate(IndexInvalidate indexInvalidate){
|
||||
if (indexInvalidations == null){
|
||||
indexInvalidations = new HashSet<IndexInvalidate>();
|
||||
}
|
||||
indexInvalidations.add(indexInvalidate);
|
||||
}
|
||||
|
||||
public void addTableIUD(TableIUD tableIud){
|
||||
if (tableList == null){
|
||||
tableList = new ArrayList<TableIUD>(4);
|
||||
@@ -129,13 +104,6 @@ public class RemoteTransactionEvent implements Runnable {
|
||||
beanDeltaMap.addBeanDelta(beanDelta);
|
||||
}
|
||||
|
||||
public void addIndexEvent(IndexEvent indexEvent){
|
||||
if (indexEventList == null){
|
||||
indexEventList = new ArrayList<IndexEvent>(2);
|
||||
}
|
||||
indexEventList.add(indexEvent);
|
||||
}
|
||||
|
||||
public String getServerName() {
|
||||
return serverName;
|
||||
}
|
||||
@@ -156,14 +124,6 @@ public class RemoteTransactionEvent implements Runnable {
|
||||
this.deleteByIdMap = deleteByIdMap;
|
||||
}
|
||||
|
||||
public Set<IndexInvalidate> getIndexInvalidations() {
|
||||
return indexInvalidations;
|
||||
}
|
||||
|
||||
public List<IndexEvent> getIndexEventList() {
|
||||
return indexEventList;
|
||||
}
|
||||
|
||||
public List<TableIUD> getTableIUDList() {
|
||||
return tableList;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user