Package com.linkedin.helix

Examples of com.linkedin.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> 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

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

    PropertyType type = propertyKey.getType();
    CallbackHandler handler =
        createCallBackHandler(propertyKey, listener, eventType, changeType);

    synchronized (this)
    {
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

    if(tmp.length == 0 || tmp[0].equals("*"))
    {
      throw new Exception("Unable to read " + path);
    }
   
    PropertyType parentProperty = null;
    try
    {
      parentProperty = PropertyType.valueOf(tmp[0]);
    }
    catch(Exception e)
View Full Code Here

  @Override
  public <T extends HelixProperty> boolean updateProperty(PropertyKey key,
      T value)
  {
    PropertyType type = key.getType();
    String path = key.getPath();

    try
    {
      _readWriteLock.writeLock().lock();
     
      if (type.isUpdateOnlyOnExists())
      {
        updateIfExists(path, value.getRecord(), type.isMergeOnUpdate());
      }
      else
      {
        createOrUpdate(path, value.getRecord(), type.isMergeOnUpdate());
      }
      return true;
    }
    catch (PropertyStoreException e)
    {
View Full Code Here

TOP

Related Classes of com.linkedin.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.