Class Slice

All Implemented Interfaces:
Iterable<Replica>, MapSerializable, MapWriter, NavigableObject, org.noggit.JSONWriter.Writable

public class Slice extends ZkNodeProps implements Iterable<Replica>
A Slice contains immutable information about a logical shard (all replicas that share the same shard id).
  • Field Details

    • collection

      public final String collection
  • Constructor Details

    • Slice

      public Slice(String name, Map<String,Replica> replicas, Map<String,Object> props, String collection)
      Parameters:
      name - The name of the slice
      replicas - The replicas of the slice. This is used directly and a copy is not made. If null, replicas will be constructed from props.
      props - The properties of the slice - a shallow copy will always be made.
  • Method Details