reintegrated my changes back into chronicle map ( manually ) as the merge caused issues and was rolled back, these changes also are less ambitious and as such are not so risky

This commit is contained in:
Rob Austin
2015-03-12 19:13:11 +00:00
parent c54f1c1166
commit 8cfa117537
12 changed files with 2680 additions and 6 deletions
@@ -48,12 +48,12 @@ import static net.openhft.chronicle.map.Replica.ModificationNotifier.NOP;
/**
* @author Rob Austin.
*/
final class ChannelProvider implements Closeable {
public final class ChannelProvider implements Closeable {
private static final Logger LOG = LoggerFactory.getLogger(ChannelProvider.class.getName());
static final Map<ReplicationHub, ChannelProvider> implMapping = new IdentityHashMap<>();
static synchronized ChannelProvider getProvider(ReplicationHub hub) throws IOException {
public static synchronized ChannelProvider getProvider(ReplicationHub hub) throws IOException {
ChannelProvider channelProvider = implMapping.get(hub);
if (channelProvider != null)
return channelProvider;
@@ -411,6 +411,10 @@ final class ChannelProvider implements Closeable {
replicators.add(replicator);
}
public List<Replica> chronicleChannelList() {
return Collections.unmodifiableList(chronicleChannelList);
}
private interface MessageHandler {
void onMessage(Bytes bytes);
}