Package org.zeromq

Examples of org.zeromq.ZContext.destroy()


                System.out.println ("I: worker heartbeat\n");
                ZFrame frame = new ZFrame (PPP_HEARTBEAT);
                frame.send(worker, 0);
            }
        }
        ctx.destroy();
    }

}
View Full Code Here


                //  Send random values for worker availability
                statebe.send(self, ZMQ.SNDMORE);
                statebe.send(String.format("%d", rand.nextInt(10)), 0);
            }
        }
        ctx.destroy();
    }
}
View Full Code Here

        assert (kvmsg.getProp("prop2").equals("value2"));
        kvmsg.destroy();

        //  .skip
        //  Shutdown and destroy all objects
        ctx.destroy();

        System.out.printf("OK\n");

    }
    //  .until
View Full Code Here

                    //  Send request again, on new socket
                    client.send(request);
                }
            }
        }
        ctx.destroy();
    }
}
View Full Code Here

        kvsimple kvUpdateMsg = new kvsimple(key, 0, b.array());
        kvUpdateMsg.send(push);
        alarm = System.currentTimeMillis() + 1000;
      }
    }
        ctx.destroy();
  }

  public static void main(String[] args) {
    new clonecli4().run();
  }
View Full Code Here

                    }
                }
                frame.destroy();
            }
        }
        context.destroy();
    }
}
View Full Code Here

        //  When we're done, clean up properly
        while ( workers.size() > 0) {
            Worker worker = workers.remove(0);
        }
        workers.clear();
        ctx.destroy();
    }

}
View Full Code Here

            reply.send(server);
        }
        if (Thread.currentThread().isInterrupted())
            System.out.printf ("W: interrupted\n");

        ctx.destroy();
    }
}
View Full Code Here

        Socket pubpipe = ZThread.fork(ctx, new Publisher());
        Socket subpipe = ZThread.fork(ctx, new Subscriber());
        subpipe.recvStr();
        pubpipe.send("break");
        Thread.sleep(100);
        ctx.destroy();
    }
}
View Full Code Here

        while (!Thread.currentThread().isInterrupted()) {
            Thread.sleep(1000);
            publisher.send(String.format("%03d", rand.nextInt(1000)), ZMQ.SNDMORE);
            publisher.send("Off with his head!");
        }
        context.destroy();
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.