Examples of PropertyType


Examples of org.apache.helix.PropertyType

            @SuppressWarnings("unchecked")
            @Override
            public <T extends HelixProperty> List<T> getChildValues(PropertyKey key)
//            public List<ZNRecord> getChildValues(PropertyType type, String... keys)
            {
              PropertyType type = key.getType();
              String[] keys = key.getParams();
              if (type == PropertyType.CONFIGS && keys != null && keys.length > 1
                  && keys[1].equalsIgnoreCase(ConfigScopeProperty.PARTICIPANT.toString()))
              {
                List<InstanceConfig> configs = new ArrayList<InstanceConfig>();
View Full Code Here

Examples of org.apache.helix.PropertyType

  }

  @Override
  public <T extends HelixProperty> List<T> getChildValues(PropertyKey key)
  {
    PropertyType type = key.getType();
    String parentPath = key.getPath();
    int options = constructOptions(type);
    List<T> childValues = new ArrayList<T>();

    List<ZNRecord> children = _baseDataAccessor.getChildren(parentPath, null, options);
View Full Code Here

Examples of org.apache.helix.PropertyType

  }

  @Override
  public <T extends HelixProperty> Map<String, T> getChildValuesMap(PropertyKey key)
  {
    PropertyType type = key.getType();
    String parentPath = key.getPath();
    int options = constructOptions(type);
    List<T> children = getChildValues(key);
    Map<String, T> childValuesMap = new HashMap<String, T>();
    for (T t : children)
View Full Code Here

Examples of org.apache.helix.PropertyType

    List<String> paths = new ArrayList<String>();
    List<ZNRecord> records = new ArrayList<ZNRecord>();
    for (int i = 0; i < keys.size(); i++)
    {
      PropertyKey key = keys.get(i);
      PropertyType type = key.getType();
      String path = key.getPath();
      paths.add(path);
      HelixProperty value = children.get(i);
      records.add(value.getRecord());
      options = constructOptions(type);
View Full Code Here

Examples of org.apache.helix.PropertyType

                                                                           null));

    for (int i = 0; i < keys.size(); i++)
    {
      PropertyKey key = keys.get(i);
      PropertyType type = key.getType();
      String path = key.getPath();
      paths.add(path);
      options = constructOptions(type);

      HelixProperty value = children.get(i);
View Full Code Here

Examples of org.apache.helix.PropertyType

    {
      @Override
      public <T extends HelixProperty> List<T>  getChildValues(PropertyKey key)
      {
        List<T> result = new ArrayList<T>();
        PropertyType type = key.getType();
        Class<? extends HelixProperty> clazz = key.getTypeClass();
        if (type == PropertyType.EXTERNALVIEW)
        {
          HelixProperty typedInstance = HelixProperty.convertToTypedInstance(clazz, _externalView);
          result.add((T) typedInstance);
View Full Code Here

Examples of org.apache.helix.PropertyType

      }

      @Override
      public  <T extends HelixProperty> T  getProperty(PropertyKey key)
      {
        PropertyType type = key.getType();
        if (type == PropertyType.EXTERNALVIEW)
        {
          return (T) new ExternalView(_externalView);
        }
        else if (type == PropertyType.IDEALSTATES)
View Full Code Here

Examples of org.apache.helix.PropertyType

    public <T extends HelixProperty> boolean updateProperty(
        PropertyKey key, T value) {
      // String path = PropertyPathConfig.getPath(type, _clusterName,
      // keys);
      String path = key.getPath();
      PropertyType type = key.getType();
      if (type.updateOnlyOnExists) {
        if (data.containsKey(path)) {
          if (type.mergeOnUpdate) {
            ZNRecord znRecord = new ZNRecord(data.get(path));
            znRecord.merge(value.getRecord());
View Full Code Here

Examples of org.apache.helix.PropertyType

     
      @Override
      public <T extends HelixProperty> T getProperty(PropertyKey key)
      {
       
        PropertyType type = key.getType();
        if(type == PropertyType.EXTERNALVIEW || type == PropertyType.IDEALSTATES)
        {
          return (T) new ExternalView(_externalView);
        }
        return null;
View Full Code Here

Examples of org.apache.helix.PropertyType

      }

      @Override
      public <T extends HelixProperty> List<T> getChildValues(PropertyKey key)
      {
        PropertyType type = key.getType();
        List<T> result = new ArrayList<T>();
        Class<? extends HelixProperty> clazz = key.getTypeClass();
        if(type == PropertyType.EXTERNALVIEW || type == PropertyType.IDEALSTATES)
        {
          HelixProperty typedInstance = HelixProperty.convertToTypedInstance(clazz, _externalView);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.