Search in sources :

Example 26 with INodeService

use of org.jumpmind.symmetric.service.INodeService in project symmetric-ds by JumpMind.

the class RestService method reinitializeImpl.

private void reinitializeImpl(ISymmetricEngine engine) {
    INodeService nodeService = engine.getNodeService();
    org.jumpmind.symmetric.model.Node modelNode = nodeService.findIdentity();
    if (!this.isRootNode(engine, modelNode)) {
        engine.uninstall();
    }
    engine.start();
}
Also used : INodeService(org.jumpmind.symmetric.service.INodeService)

Example 27 with INodeService

use of org.jumpmind.symmetric.service.INodeService in project symmetric-ds by JumpMind.

the class SimpleIntegrationTest method test23IgnoreNodeChannel.

@Test(timeout = 120000)
public void test23IgnoreNodeChannel() {
    logTestRunning();
    INodeService rootNodeService = getServer().getNodeService();
    IConfigurationService rootConfigService = getServer().getConfigurationService();
    rootNodeService.ignoreNodeChannelForExternalId(true, TestConstants.TEST_CHANNEL_ID, TestConstants.TEST_ROOT_NODE_GROUP, TestConstants.TEST_ROOT_EXTERNAL_ID);
    rootConfigService.clearCache();
    NodeChannel channel = rootConfigService.getNodeChannel(TestConstants.TEST_CHANNEL_ID, TestConstants.TEST_ROOT_EXTERNAL_ID, false);
    assertNotNull(channel);
    assertTrue(channel.isIgnoreEnabled());
    assertFalse(channel.isSuspendEnabled());
    Customer customer = new Customer(201, "Charlie Dude", true, "300 Grub Street", "New York", "NY", 90009, new Date(), new Date(), THIS_IS_A_TEST, BINARY_DATA);
    serverTestService.insertCustomer(customer);
    clientPull();
    assertNull(clientTestService.getCustomer(customer.getCustomerId()));
    rootNodeService.ignoreNodeChannelForExternalId(false, TestConstants.TEST_CHANNEL_ID, TestConstants.TEST_ROOT_NODE_GROUP, TestConstants.TEST_ROOT_EXTERNAL_ID);
    rootConfigService.clearCache();
    clientPull();
    assertNull(clientTestService.getCustomer(customer.getCustomerId()));
    getClient().getConfigurationService().clearCache();
}
Also used : INodeService(org.jumpmind.symmetric.service.INodeService) IConfigurationService(org.jumpmind.symmetric.service.IConfigurationService) NodeChannel(org.jumpmind.symmetric.model.NodeChannel) Date(java.util.Date) Test(org.junit.Test)

Aggregations

INodeService (org.jumpmind.symmetric.service.INodeService)27 NodeSecurity (org.jumpmind.symmetric.model.NodeSecurity)12 Node (org.jumpmind.symmetric.model.Node)8 ISymmetricEngine (org.jumpmind.symmetric.ISymmetricEngine)6 ArrayList (java.util.ArrayList)5 Date (java.util.Date)5 IoException (org.jumpmind.exception.IoException)4 NodeHost (org.jumpmind.symmetric.model.NodeHost)4 ProcessInfo (org.jumpmind.symmetric.model.ProcessInfo)4 IConfigurationService (org.jumpmind.symmetric.service.IConfigurationService)4 ApiOperation (com.wordnik.swagger.annotations.ApiOperation)3 IOException (java.io.IOException)3 ISqlTransaction (org.jumpmind.db.sql.ISqlTransaction)3 SymmetricException (org.jumpmind.symmetric.SymmetricException)3 NetworkedNode (org.jumpmind.symmetric.model.NetworkedNode)3 NodeGroupLink (org.jumpmind.symmetric.model.NodeGroupLink)3 ProcessInfoKey (org.jumpmind.symmetric.model.ProcessInfoKey)3 Trigger (org.jumpmind.symmetric.model.Trigger)3 ITriggerRouterService (org.jumpmind.symmetric.service.ITriggerRouterService)3 Test (org.junit.Test)3