public void notifyProjectACLUpdate(String project) throws IOException { notifyListener(SYNC_PRJ_ACL, Event.UPDATE, project); }
public void notifyListener(String entity, Event event, String cacheKey) throws IOException { notifyListener(entity, event, cacheKey, true); }
public void notifyProjectDataUpdate(String project) throws IOException { notifyListener(SYNC_PRJ_DATA, Event.UPDATE, project); }
public void notifyNonStaticListener(String entity, Event event, String cacheKey) throws IOException { notifyListener(entity, event, cacheKey, false); }
public void notifyClearAll() throws IOException { notifyListener(SYNC_ALL, Event.UPDATE, SYNC_ALL); }
public void notifyProjectSchemaUpdate(String project) throws IOException { notifyListener(SYNC_PRJ_SCHEMA, Event.UPDATE, project); }
public void notifyMetadataChange(String entity, Event event, String cacheKey) throws IOException { Broadcaster broadcaster = Broadcaster.getInstance(getConfig()); broadcaster.notifyListener(entity, event, cacheKey); }
@Test public void testBasics() throws IOException { Broadcaster broadcaster = Broadcaster.getInstance(getTestConfig()); final AtomicInteger i = new AtomicInteger(0); broadcaster.registerStaticListener(new Listener() { @Override public void onEntityChange(Broadcaster broadcaster, String entity, Event event, String cacheKey) throws IOException { Assert.assertEquals(2, i.incrementAndGet()); } }, "test"); broadcaster.registerListener(new Listener() { @Override public void onEntityChange(Broadcaster broadcaster, String entity, Event event, String cacheKey) throws IOException { Assert.assertEquals(1, i.incrementAndGet()); } }, "test"); broadcaster.notifyListener("test", Event.UPDATE, ""); broadcaster.stopAnnounce(); Broadcaster.staticListenerMap.clear(); }
public void notifyProjectDataUpdate(String project) throws IOException { notifyListener(SYNC_PRJ_DATA, Event.UPDATE, project); }
public void notifyNonStaticListener(String entity, Event event, String cacheKey) throws IOException { notifyListener(entity, event, cacheKey, false); }
public void notifyClearAll() throws IOException { notifyListener(SYNC_ALL, Event.UPDATE, SYNC_ALL); }
public void notifyListener(String entity, Event event, String cacheKey) throws IOException { notifyListener(entity, event, cacheKey, true); }
public void notifyProjectSchemaUpdate(String project) throws IOException { notifyListener(SYNC_PRJ_SCHEMA, Event.UPDATE, project); }
public void notifyProjectACLUpdate(String project) throws IOException { notifyListener(SYNC_PRJ_ACL, Event.UPDATE, project); }