@Test public void testCreate() throws Exception { underTest.start(); createRoutingRule("asdf", "asdf2"); RoutingRule rule = underTest.getByName("asdf"); assertThat(rule.name(), is("asdf")); assertThat(rule.description(), is("some description")); assertThat(rule.mode(), is(RoutingMode.BLOCK)); assertThat(rule.matchers(), contains("asdf2")); }
@Override @Guarded(by = STARTED) public RoutingRule create(final RoutingRule rule) { checkNotNull(rule); validate(rule); persist(entityAdapter::addEntity, rule); return rule; }
OrientRoutingRuleStore extends StateGuardLifecycleSupport implements RoutingRuleStore { @Override @Guarded(by = STARTED) public RoutingRule create(final RoutingRule rule) { checkNotNull(rule); validate(rule); persist(entityAdapter::addEntity, rule); return rule; } }
OrientRoutingRuleStore extends StateGuardLifecycleSupport implements RoutingRuleStore { @Override @Guarded(by = STARTED) public RoutingRule create(final RoutingRule rule) { checkNotNull(rule); validate(rule); persist(entityAdapter::addEntity, rule); return rule; } @Inject  OrientRoutingRuleStore(@Named(DatabaseInstanceNames.CONFIG) final Provider<DatabaseInstance> databaseInstance,
                                final OrientRoutingRuleEntityAdapter entityAdapter); }
OrientRoutingRuleStore extends StateGuardLifecycleSupport implements RoutingRuleStore { @Override @Guarded(by = STARTED) public RoutingRule create(final RoutingRule rule) { checkNotNull(rule); validate(rule); persist(entityAdapter::addEntity, rule); return rule; } @Inject  OrientRoutingRuleStore(@Named(DatabaseInstanceNames.CONFIG) final Provider<DatabaseInstance> databaseInstance,
                                final OrientRoutingRuleEntityAdapter entityAdapter); @Override @Guarded(by = STARTED) RoutingRule create(final RoutingRule rule); @Override @Guarded(by = STARTED) void update(final RoutingRule rule); @Override @Guarded(by = STARTED) List<RoutingRule> list(); @Override void delete(final RoutingRule rule); @Override RoutingRule getByName(final String name); @Override RoutingRule getById(final String id); @Override RoutingRule newRoutingRule(); }
OrientRoutingRuleStore extends StateGuardLifecycleSupport implements RoutingRuleStore { @Override @Guarded(by = STARTED) public RoutingRule create(final RoutingRule rule) { checkNotNull(rule); validate(rule); persist(entityAdapter::addEntity, rule); return rule; } @Inject  OrientRoutingRuleStore(@Named(DatabaseInstanceNames.CONFIG) final Provider<DatabaseInstance> databaseInstance,
                                final OrientRoutingRuleEntityAdapter entityAdapter); @Override @Guarded(by = STARTED) RoutingRule create(final RoutingRule rule); @Override @Guarded(by = STARTED) void update(final RoutingRule rule); @Override @Guarded(by = STARTED) List<RoutingRule> list(); @Override void delete(final RoutingRule rule); @Override RoutingRule getByName(final String name); @Override RoutingRule getById(final String id); @Override RoutingRule newRoutingRule();  }