本文整理了Java中com.hazelcast.core.Message.<init>()
方法的一些代码示例,展示了Message.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.<init>()
方法的具体详情如下:
包路径:com.hazelcast.core.Message
类名称:Message
方法名:<init>
暂无
代码示例来源:origin: kaazing/gateway
@Override
public void publish(E o) {
if (isPublishing.get()) {
throw new UnsupportedOperationException("Cannot nest publishing operations");
}
isPublishing.set(true);
Message<E> m = new Message<>(this.getName(), o, System.nanoTime(), null);
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Publishing message on topic: " + MemoryTopic.this.getName() + ", notifying " + messageListenerHolders.size() + " listener(s).");
}
for (MessageListenerHolder holder : messageListenerHolders) {
try {
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Publishing message on topic: " + MemoryTopic.this.getName() + ", notifying listener: " + holder.key + ".");
}
localTopicStats.incrementReceives();
holder.listener.onMessage(m);
} catch (Exception e) {
LOGGER.debug("Message listener: " + holder.key + " failed.", e);
}
}
localTopicStats.incrementPublishes();
isPublishing.set(false);
}
代码示例来源:origin: hazelcast/hazelcast-jet
private Message<E> toMessage(ReliableTopicMessage m) {
Member member = getMember(m);
E payload = serializationService.toObject(m.getPayload());
return new Message<E>(topicName, payload, m.getPublishTime(), member);
}
代码示例来源:origin: com.hazelcast/hazelcast-all
private Message<E> toMessage(ReliableTopicMessage m) {
Member member = getMember(m);
E payload = serializationService.toObject(m.getPayload());
return new Message<E>(topicName, payload, m.getPublishTime(), member);
}
内容来源于网络,如有侵权,请联系作者删除!