use of org.apache.jackrabbit.oak.plugins.document.persistentCache.broadcast.UDPBroadcaster in project jackrabbit-oak by apache.
the class PersistentCache method initBroadcast.
private void initBroadcast(String broadcast) {
if (broadcast == null) {
return;
}
if (broadcast.equals("disabled")) {
return;
} else if (broadcast.equals("inMemory")) {
broadcaster = InMemoryBroadcaster.INSTANCE;
} else if (broadcast.startsWith("udp:")) {
String config = broadcast.substring("udp:".length(), broadcast.length());
broadcaster = new UDPBroadcaster(config);
} else if (broadcast.startsWith("tcp:")) {
String config = broadcast.substring("tcp:".length(), broadcast.length());
broadcaster = new TCPBroadcaster(config);
} else {
throw new IllegalArgumentException("Unknown broadcaster type " + broadcast);
}
broadcaster.addListener(this);
}
Aggregations