本文整理了Java中org.zeromq.ZMQ
类的一些代码示例,展示了ZMQ
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZMQ
类的具体详情如下:
包路径:org.zeromq.ZMQ
类名称:ZMQ
[英]ZeroMQ JNI Bindings.
[中]ZeroMQ JNI绑定。
代码示例来源:origin: alibaba/mdrill
public static Context context(int threads) {
try {
return ZMQ.context(threads);
} catch (UnsatisfiedLinkError e) {
LOG.error("context", e);
}
return null;
}
代码示例来源:origin: zeromq/jzmq
public void setGSSAPIServer(boolean isServer) {
if(ZMQ.version_full() >= ZMQ.makeVersion(4, 1, 0)) {
setLongSockopt(GSSAPI_SERVER, isServer ? 1L : 0L);
}
}
代码示例来源:origin: org.zeromq/zeromq-scala-binding_2.10
public long getBacklog() {
if (getFullVersion() < makeVersion(3, 0, 0))
return -1;
return (int) getLongSockopt(ZeroMQ$.MODULE$.ZMQ_BACKLOG());
}
代码示例来源:origin: org.zeromq/zeromq-scala-binding
public static int getFullVersion() {
return makeVersion(getMajorVersion(), getMinorVersion(), getPatchVersion());
}
代码示例来源:origin: org.zeromq/zeromq-scala-binding_2.10
public static String getVersionString() {
return String.format("%d.%d.%d", getMajorVersion(), getMinorVersion(), getPatchVersion());
}
代码示例来源:origin: org.zeromq/zeromq-scala-binding_2.10
public long getSndHWM() {
if (getFullVersion() < makeVersion(3, 0, 0))
return -1;
return getLongSockopt(ZeroMQ$.MODULE$.ZMQ_SNDHWM());
}
代码示例来源:origin: org.spark-project.zeromq/zeromq-scala-binding
public static int getFullVersion() {
return makeVersion(getMajorVersion(), getMinorVersion(), getPatchVersion());
}
代码示例来源:origin: org.spark-project.zeromq/zeromq-scala-binding_2.10
public static String getVersionString() {
return String.format("%d.%d.%d", getMajorVersion(), getMinorVersion(), getPatchVersion());
}
代码示例来源:origin: twosigma/beakerx
public KernelSocketsZMQ(KernelFunctionality kernel, Config configuration, SocketCloseAction closeAction) {
this.closeAction = closeAction;
this.kernel = kernel;
this.hmac = new HashedMessageAuthenticationCode(configuration.getKey());
this.context = ZMQ.context(1);
configureSockets(configuration);
}
代码示例来源:origin: org.zeromq/zeromq-scala-binding_2.10
public long getFD() {
if (getFullVersion() < makeVersion(2, 1, 0))
return -1;
return getLongSockopt(ZeroMQ$.MODULE$.ZMQ_FD());
}
代码示例来源:origin: org.zeromq/zeromq-scala-binding_2.10
public static int getFullVersion() {
return makeVersion(getMajorVersion(), getMinorVersion(), getPatchVersion());
}
代码示例来源:origin: org.zeromq/zeromq-scala-binding
public static String getVersionString() {
return String.format("%d.%d.%d", getMajorVersion(), getMinorVersion(), getPatchVersion());
}
代码示例来源:origin: zeromq/jzmq
public void setGSSAPIPlainText(boolean isPlaintext) {
if(ZMQ.version_full() >= ZMQ.makeVersion(4, 1, 0)) {
setLongSockopt(GSSAPI_PLAINTEXT, isPlaintext ? 1L : 0L);
}
}
代码示例来源:origin: apache/ignite
ctx = ZMQ.context(ioThreads);
ZMQ.Socket socket = ctx.socket(socketType);
socket.connect(addr);
socket.subscribe(topic);
byte[] msg = socket.recv(0);
代码示例来源:origin: org.zeromq/zeromq-scala-binding_2.10
public long getEvents() {
if (getFullVersion() < makeVersion(2, 1, 0))
return -1;
return getLongSockopt(ZeroMQ$.MODULE$.ZMQ_EVENTS());
}
代码示例来源:origin: org.spark-project.zeromq/zeromq-scala-binding_2.10
public static int getFullVersion() {
return makeVersion(getMajorVersion(), getMinorVersion(), getPatchVersion());
}
代码示例来源:origin: org.spark-project.zeromq/zeromq-scala-binding
public static String getVersionString() {
return String.format("%d.%d.%d", getMajorVersion(), getMinorVersion(), getPatchVersion());
}
代码示例来源:origin: benmfaul/XRTB
public static Context getInstance() {
if (context == null)
context = ZMQ.context(1);
return context;
}
代码示例来源:origin: org.zeromq/zeromq-scala-binding_2.10
public void setReconnectIVL(long reconnectIVL) {
if (getFullVersion() < makeVersion(3, 0, 0))
return;
setLongSockopt(ZeroMQ$.MODULE$.ZMQ_RECONNECT_IVL(), reconnectIVL);
}
代码示例来源:origin: org.opendaylight.netide/shim
public void Start() {
context = ZMQ.context(1);
thread = new Thread(this);
thread.setName("ZeroMQBasedConnector Receive Loop");
thread.start();
}
内容来源于网络,如有侵权,请联系作者删除!