public class RouteGraphConnection {
private static final boolean DEBUG_SYNC = false;
- private static final boolean USE_COMMAND_BASED_SYNCHRONIZATION = true;
-
+
public static Write synchronizer(final Resource connection, final RouteGraphChangeEvent event) {
return new WriteRequest() {
@Override
private DiagramResource DIA;
private ConnectionUtil cu;
private Resource connection;
+ private boolean commandBasedSynchronization;
- public RouteGraphConnection(WriteGraph graph, Resource connection) {
+ public RouteGraphConnection(WriteGraph graph, Resource connection) throws DatabaseException {
this.L0 = Layer0.getInstance(graph);
this.DIA = DiagramResource.getInstance(graph);
this.cu = new ConnectionUtil(graph);
this.connection = connection;
+ this.commandBasedSynchronization = graph.hasStatement(connection, DIA.CommandBasedSynchronization);
}
private static Function ConnectionPoint;
if (DEBUG_SYNC)
delta.print();
- if(USE_COMMAND_BASED_SYNCHRONIZATION) {
+ if(commandBasedSynchronization) {
initialize(graph);
Layer0 L0 = Layer0.getInstance(graph);