public InProcessChronicleSource(Chronicle chronicle, int port) throws IOException { this.chronicle = chronicle; server = ServerSocketChannel.open(); server.socket().setReuseAddress(true); server.socket().bind(new InetSocketAddress(port)); name = chronicle.name() + "@" + port; logger = Logger.getLogger(getClass().getName() + "." + name); service = Executors.newCachedThreadPool(new NamedThreadFactory(name)); service.execute(new Acceptor()); }
@Override public String name() { return chronicle.name(); }