public class Patterns extends Object
Modifier and Type | Method and Description |
---|---|
static BeaconReactorBuilder |
buildBeaconReactor()
Create a new BeaconReactor, which will send and receive UDP beacons
on a broadcast address, with event-driven handling of received beacons.
|
static BinaryStarReactorBuilder |
buildBinaryStarReactor()
Create a new BinaryStarReactor, which will create one half of an HA-pair
with event-driven polling of a client Socket.
|
static BinaryStarSocketBuilder |
buildBinaryStarSocket()
Create a ØMQ Socket, backed by a background agent that is connecting
to a BinaryStarReactor HA-pair.
|
static CloneClientBuilder |
buildCloneClient()
Create a new CloneClient, connected to an HA-pair, for publishing key/value data
to anonymous peers.
|
static CloneServerBuilder |
buildCloneServer()
Create a new CloneServer, which will create one half of an HA-pair
for distributing key/value data to clients.
|
static Socket |
newBinaryStarSocket(String primaryUrl,
String backupUrl)
Create a ØMQ DEALER Socket, backed by a background agent that is connected
to a BinaryStarReactor HA-pair.
|
static CloneClient |
newCloneClient(String primaryAddress,
String backupAddress,
String subtree)
Create a new CloneClient, connected to an HA-pair, for publishing key/value data
to anonymous peers.
|
static CloneServer |
newCloneServer(BinaryStarReactor.Mode mode,
String primaryAddress,
String backupAddress)
Create a new CloneServer, which will create one half of an HA-pair
for distributing key/value data to clients.
|
public static BinaryStarReactorBuilder buildBinaryStarReactor()
public static BinaryStarSocketBuilder buildBinaryStarSocket()
public static Socket newBinaryStarSocket(String primaryUrl, String backupUrl)
primaryUrl
- The primary server's url to connect tobackupUrl
- The backup server's url to connect topublic static CloneServerBuilder buildCloneServer()
public static CloneServer newCloneServer(BinaryStarReactor.Mode mode, String primaryAddress, String backupAddress)
mode
- The server mode (e.g. PRIMARY, BACKUP)primaryAddress
- The primary server's url to connect to (if mode is BACKUP)backupAddress
- The backup server's url to connect to (if mode is PRIMARY)public static CloneClientBuilder buildCloneClient()
public static CloneClient newCloneClient(String primaryAddress, String backupAddress, String subtree)
primaryAddress
- The primary server's url to connect tobackupAddress
- The backup server's url to connect tosubtree
- The prefix (subtree) to subscribe topublic static BeaconReactorBuilder buildBeaconReactor()
Copyright © 2019. All rights reserved.