Search in sources :

Example 11 with PluginSynchronizer

use of au.gov.asd.tac.constellation.plugins.PluginSynchronizer in project constellation by constellation-app.

the class SynchronizerAction method actionPerformed.

@Override
public void actionPerformed(ActionEvent e) {
    Graph graph = context.getGraph();
    int count = 3;
    PluginSynchronizer pluginSynchronizer = new PluginSynchronizer(count);
    for (int i = 0; i < count; i++) {
        PluginExecution.withPlugin(new SynchronizerPlugin()).withParameter(SynchronizerPlugin.NAME_PARAMETER_ID, "I am number " + i).interactively(true).synchronizingOn(pluginSynchronizer).executeLater(graph);
    }
}
Also used : PluginSynchronizer(au.gov.asd.tac.constellation.plugins.PluginSynchronizer) Graph(au.gov.asd.tac.constellation.graph.Graph)

Aggregations

PluginSynchronizer (au.gov.asd.tac.constellation.plugins.PluginSynchronizer)11 Graph (au.gov.asd.tac.constellation.graph.Graph)9 Plugin (au.gov.asd.tac.constellation.plugins.Plugin)9 PluginParameters (au.gov.asd.tac.constellation.plugins.parameters.PluginParameters)9 Future (java.util.concurrent.Future)8 CompletableFuture (java.util.concurrent.CompletableFuture)7 Test (org.testng.annotations.Test)7 Callable (java.util.concurrent.Callable)6 ExecutorService (java.util.concurrent.ExecutorService)6 PluginGraphs (au.gov.asd.tac.constellation.plugins.PluginGraphs)3 PluginInteraction (au.gov.asd.tac.constellation.plugins.PluginInteraction)3 GraphManager (au.gov.asd.tac.constellation.graph.manager.GraphManager)2 PluginExecution (au.gov.asd.tac.constellation.plugins.PluginExecution)2 PluginRegistry (au.gov.asd.tac.constellation.plugins.PluginRegistry)2 PluginParameter (au.gov.asd.tac.constellation.plugins.parameters.PluginParameter)2 DataAccessPlugin (au.gov.asd.tac.constellation.views.dataaccess.plugins.DataAccessPlugin)2 DuplicateKeyException (au.gov.asd.tac.constellation.graph.DuplicateKeyException)1 DualGraph (au.gov.asd.tac.constellation.graph.locking.DualGraph)1 AbstractPlugin (au.gov.asd.tac.constellation.plugins.AbstractPlugin)1 PluginException (au.gov.asd.tac.constellation.plugins.PluginException)1