Package org.apache.helix

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


                                                                           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

    {
      @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

      }

      @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

    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

     
      @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

      }

      @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

    class MockDataAccessor extends Mocks.MockAccessor {

      @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

        return null;
      }

      @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);
          result.add((T) typedInstance);
View Full Code Here

  void addListener(Object listener, PropertyKey propertyKey, ChangeType changeType,
      EventType[] eventType) {
    checkConnected();

    PropertyType type = propertyKey.getType();

    synchronized (this) {
      for (CallbackHandler handler : _handlers) {
        // compare property-key path and listener reference
        if (handler.getPath().equals(propertyKey.getPath())
View Full Code Here

TOP

Related Classes of org.apache.helix.PropertyType

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.