public DefaultAsyncDistributedLog(String name, LogClient client, Serializer serializer) { this.name = checkNotNull(name); this.client = checkNotNull(client); this.serializer = checkNotNull(serializer); client.getPartitions().forEach(partition -> { DefaultAsyncDistributedLogPartition<E> logPartition = new DefaultAsyncDistributedLogPartition<>(this, partition, serializer); partitions.put(partition.partitionId().id(), logPartition); sortedPartitions.add(logPartition); }); }
public LogProxyClient( String name, PrimitiveType type, PrimitiveProtocol protocol, Class<S> serviceType, ServiceConfig serviceConfig, LogClient client) { super(name, type, protocol, createSessions(name, type, serviceType, serviceConfig, client.getPartitions())); this.client = client; this.serializer = Serializer.using(type.namespace()); }
public DefaultAsyncDistributedLog(String name, LogClient client, Serializer serializer) { this.name = checkNotNull(name); this.client = checkNotNull(client); this.serializer = checkNotNull(serializer); client.getPartitions().forEach(partition -> { DefaultAsyncDistributedLogPartition<E> logPartition = new DefaultAsyncDistributedLogPartition<>(this, partition, serializer); partitions.put(partition.partitionId().id(), logPartition); sortedPartitions.add(logPartition); }); }