Package com.linkedin.databus.client.pub

Examples of com.linkedin.databus.client.pub.DatabusV3MultiPartitionRegistration


   * @throws RequestProcessingException
   *           when unable to find the cluster.
   */
  private Collection<PartitionInfo> getV3ClusterPartitions(String cluster) throws RequestProcessingException
  {
    DatabusV3MultiPartitionRegistration reg = getV3ClusterRegistration(cluster);
    List<PartitionInfo> partitions = new ArrayList<PartitionInfo>();

    Map<PhysicalPartition, DatabusV3Registration> regMap = reg.getPartionRegs();
    for (Entry<PhysicalPartition, DatabusV3Registration> e : regMap.entrySet())
    {
      PartitionInfo p =
          new PartitionInfo(e.getKey().getId(), e.getValue().getRegistrationId());
      partitions.add(p);
View Full Code Here


   * @throws RequestProcessingException
   *           When cluster or partition is not hosted in this instance.
   */
  private RegInfo getV3PartitionRegistration(String cluster, long partition) throws RequestProcessingException
  {
    DatabusV3MultiPartitionRegistration reg = getV3ClusterRegistration(cluster);

    for (Entry<PhysicalPartition, DatabusV3Registration> e : reg.getPartionRegs()
                                                                .entrySet())
    {
      if (partition == e.getKey().getId())
      {
        DatabusV3Registration r = e.getValue();
View Full Code Here

    setParentRegId(null != reg.getParentRegistration() ? reg.getParentRegistration().getId() : null);
    setSubscriptions(reg.getSubscriptions());

      if (reg instanceof DatabusV3MultiPartitionRegistration)
      {
        DatabusV3MultiPartitionRegistration mpReg = (DatabusV3MultiPartitionRegistration)reg;
        setMultiPartition(true);
        ArrayList<RegistrationId> childrenRegs =
        new ArrayList<RegistrationId>(mpReg.getPartionRegs().size());
        for (Map.Entry<PhysicalPartition, DatabusV3Registration> child: mpReg.getPartionRegs().entrySet())
        {
          childrenRegs.add(child.getValue().getId());
        }
        setChildrenRegistrations(childrenRegs);
      }
View Full Code Here

TOP

Related Classes of com.linkedin.databus.client.pub.DatabusV3MultiPartitionRegistration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.