Java 类com.hazelcast.core.ItemEvent 实例源码

项目:Camel    文件:HazelcastListConsumerTest.java   
@Test
@SuppressWarnings("unchecked")
public void add() throws InterruptedException {
    MockEndpoint out = getMockEndpoint("mock:added");
    out.expectedMessageCount(1);

    final ItemEvent<String> event = new ItemEvent<String>("mm", ItemEventType.ADDED, "foo", null);
    argument.getValue().itemAdded(event);

    assertMockEndpointsSatisfied(2000, TimeUnit.MILLISECONDS);

    this.checkHeaders(out.getExchanges().get(0).getIn().getHeaders(), HazelcastConstants.ADDED);
}
项目:Camel    文件:HazelcastListConsumerTest.java   
@Test
@SuppressWarnings("unchecked")
public void remove() throws InterruptedException {
    MockEndpoint out = getMockEndpoint("mock:removed");
    out.expectedMessageCount(1);

    final ItemEvent<String> event = new ItemEvent<String>("mm", ItemEventType.REMOVED, "foo", null);
    argument.getValue().itemRemoved(event);

    assertMockEndpointsSatisfied(2000, TimeUnit.MILLISECONDS);
    this.checkHeaders(out.getExchanges().get(0).getIn().getHeaders(), HazelcastConstants.REMOVED);
}
项目:Camel    文件:HazelcastSetConsumerTest.java   
@Test
@SuppressWarnings("unchecked")
public void add() throws InterruptedException {
    MockEndpoint out = getMockEndpoint("mock:added");
    out.expectedMessageCount(1);

    final ItemEvent<String> event = new ItemEvent<String>("mm", ItemEventType.ADDED, "foo", null);
    argument.getValue().itemAdded(event);

    assertMockEndpointsSatisfied(2000, TimeUnit.MILLISECONDS);

    this.checkHeaders(out.getExchanges().get(0).getIn().getHeaders(), HazelcastConstants.ADDED);
}
项目:Camel    文件:HazelcastSetConsumerTest.java   
@Test
@SuppressWarnings("unchecked")
public void remove() throws InterruptedException {
    MockEndpoint out = getMockEndpoint("mock:removed");
    out.expectedMessageCount(1);

    final ItemEvent<String> event = new ItemEvent<String>("mm", ItemEventType.REMOVED, "foo", null);
    argument.getValue().itemRemoved(event);

    assertMockEndpointsSatisfied(2000, TimeUnit.MILLISECONDS);
    this.checkHeaders(out.getExchanges().get(0).getIn().getHeaders(), HazelcastConstants.REMOVED);
}
项目:Camel    文件:HazelcastQueueConsumerTest.java   
@Test
@SuppressWarnings("unchecked")
public void add() throws InterruptedException {
    MockEndpoint out = getMockEndpoint("mock:added");
    out.expectedMessageCount(1);

    final ItemEvent<String> event = new ItemEvent<String>("foo", ItemEventType.ADDED, "foo", null);
    argument.getValue().itemAdded(event);


    assertMockEndpointsSatisfied(2000, TimeUnit.MILLISECONDS);

    this.checkHeaders(out.getExchanges().get(0).getIn().getHeaders(), HazelcastConstants.ADDED);
}
项目:Camel    文件:HazelcastQueueConsumerTest.java   
@Test
@SuppressWarnings("unchecked")
public void remove() throws InterruptedException {
    MockEndpoint out = getMockEndpoint("mock:removed");
    out.expectedMessageCount(1);

    final ItemEvent<String> event = new ItemEvent<String>("foo", ItemEventType.REMOVED, "foo", null);
    argument.getValue().itemRemoved(event);

    assertMockEndpointsSatisfied(2000, TimeUnit.MILLISECONDS);
    this.checkHeaders(out.getExchanges().get(0).getIn().getHeaders(), HazelcastConstants.REMOVED);
}
项目:spike.x    文件:HzEventListener.java   
@Override
public void itemAdded(final ItemEvent<JsonObject> event) {
    m_logger.debug("Member: {} {} - item added: {}",
            event.getMember().getSocketAddress(),
            event.getMember().getUuid(),
            event.getItem().getValue(EVENT_FIELD_ID));
}
项目:spike.x    文件:HzEventListener.java   
@Override
public void itemRemoved(final ItemEvent<JsonObject> event) {
    m_logger.debug("Member: {} {} - item removed: {}",
            event.getMember().getSocketAddress(),
            event.getMember().getUuid(),
            event.getItem().getValue(EVENT_FIELD_ID));
}
项目:telekom-workflow-engine    文件:HazelcastWorkQueue.java   
@Override
public void itemRemoved( ItemEvent<WorkUnit> e ){
    if( queue.isEmpty() ){
        synchronized( monitor ){
            monitor.notifyAll();
        }
    }
}
项目:microservices-sample    文件:PublishServiceListener.java   
@Override
public void itemAdded(ItemEvent event) {
    if (!(event.getItem() instanceof PublishedServiceInfo)) {
        return;
    }
    PublishedServiceInfo info = (PublishedServiceInfo) event.getItem();
    //notify listeners
    for (ServiceDiscoveryListener discoveryListener : serviceDiscovery.getListeners()) {
        discoveryListener.onServiceJoined(info);
    }
}
项目:microservices-sample    文件:PublishServiceListener.java   
@Override
public void itemRemoved(ItemEvent event) {
    if (!(event.getItem() instanceof PublishedServiceInfo)) {
        return;
    }
    PublishedServiceInfo info = (PublishedServiceInfo) event.getItem();
    for (ServiceDiscoveryListener discoveryListener : serviceDiscovery.getListeners()) {
        discoveryListener.onServiceLeft(info);
    }
}
项目:apgas    文件:Transport.java   
@Override
synchronized public void itemAdded(ItemEvent<Member> item) {
  updatePlaces();
}
项目:apgas    文件:Transport.java   
@Override
synchronized public void itemRemoved(ItemEvent<Member> item) {
  // unused
}
项目:Camel    文件:CamelItemListener.java   
public void itemAdded(ItemEvent<Object> itemEvent) {
    this.sendExchange(HazelcastConstants.ADDED, null, itemEvent);
}
项目:Camel    文件:CamelItemListener.java   
public void itemRemoved(ItemEvent<Object> itemEvent) {
    this.sendExchange(HazelcastConstants.REMOVED, null, itemEvent);
}
项目:telekom-workflow-engine    文件:HazelcastWorkQueue.java   
@Override
public void itemAdded( ItemEvent<WorkUnit> event ){
}
项目:hazelcast-archive    文件:DummyItemListener.java   
public void itemAdded(final ItemEvent item) {
}
项目:hazelcast-archive    文件:DummyItemListener.java   
public void itemRemoved(final ItemEvent item) {
}
项目:hazelcast-archive    文件:CountDownItemListener.java   
public void itemAdded(ItemEvent<E> itemEvent) {
    itemAddLatch.countDown();
}
项目:hazelcast-archive    文件:CountDownItemListener.java   
public void itemRemoved(ItemEvent<E> itemEvent) {
    itemRemovedLatch.countDown();
}
项目:health-and-care-developer-network    文件:DummyItemListener.java   
public void itemAdded(final ItemEvent item) {
}
项目:health-and-care-developer-network    文件:DummyItemListener.java   
public void itemRemoved(final ItemEvent item) {
}
项目:health-and-care-developer-network    文件:CountDownItemListener.java   
public void itemAdded(ItemEvent<E> itemEvent) {
    itemAddLatch.countDown();
}
项目:health-and-care-developer-network    文件:CountDownItemListener.java   
public void itemRemoved(ItemEvent<E> itemEvent) {
    itemRemovedLatch.countDown();
}