Examples of PropertyKey


Examples of ag.ion.bion.officelayer.internal.beans.PropertyKey

   * @author Markus Kr�ger
   */
  public static IPropertyKey[] getPossiblyPropertyKeys() {
    if (PROPERTY_KEYS == null) {
      PROPERTY_KEYS = new PropertyKey[] {
          new PropertyKey("LeftBorder", null, null),
          new PropertyKey("RightBorder", null, null),
          new PropertyKey("TopBorder", null, null),
          new PropertyKey("BottomBorder", null, null),
          new PropertyKey("LeftBorderDistance", null, null),
          new PropertyKey("RightBorderDistance", null, null),
          new PropertyKey("TopBorderDistance", null, null),
          new PropertyKey("BottomBorderDistance", null, null),
          new PropertyKey("NumberFormat", null, null),
          new PropertyKey("BackColor", null, null),
          new PropertyKey("VertOrient", null, null), };
    }
    return PROPERTY_KEYS;
  }
View Full Code Here

Examples of com.linkedin.helix.PropertyKey

    List<ZNRecord> children = _baseDataAccessor.get(paths, null, 0);

    // check if bucketized
    for (int i = 0; i < keys.size(); i++)
    {
      PropertyKey key = keys.get(i);
      ZNRecord record = children.get(i);

      PropertyType type = key.getType();
      String path = key.getPath();
      int options = constructOptions(type);
      // ZNRecord record = null;

      switch (type)
      {
      case CURRENTSTATES:
      case IDEALSTATES:
      case EXTERNALVIEW:
        // check if bucketized
        if (record != null)
        {
          HelixProperty property = new HelixProperty(record);

          int bucketSize = property.getBucketSize();
          if (bucketSize > 0)
          {
            List<ZNRecord> childRecords =
                _baseDataAccessor.getChildren(path, null, options);
            ZNRecord assembledRecord = new ZNRecordAssembler().assemble(childRecords);

            // merge with parent node value
            if (assembledRecord != null)
            {
              record.getSimpleFields().putAll(assembledRecord.getSimpleFields());
              record.getListFields().putAll(assembledRecord.getListFields());
              record.getMapFields().putAll(assembledRecord.getMapFields());
            }
          }
        }
        break;
      default:
        break;
      }

      @SuppressWarnings("unchecked")
      T t = (T) HelixProperty.convertToTypedInstance(key.getTypeClass(), record);
      childValues.add(t);
    }

    return childValues;
  }
View Full Code Here

Examples of net.sourceforge.processdash.hier.PropertyKey

      foundErr = true;
    }

    DashHierarchy hier = harness.getDashboard().getHierarchy();
    for (int a = 0; a < 3; a++) {
      PropertyKey aKey = hier.getChildKey(PropertyKey.ROOT, a);
      for (int b = 0; b < 3; b++) {
        PropertyKey bKey = hier.getChildKey(aKey, b);
        for (int c = 0; c < 3; c++) {
          PropertyKey cKey = hier.getChildKey(bKey, c);
          if (!checkTimeData(cKey.path(), expectedTimes[a][b][c]))
            foundErr = true;
        }
      }
    }
    if (foundErr)
View Full Code Here

Examples of org.apache.beehive.controls.api.properties.PropertyKey

        }
        else
        {

            // Query the nested value in the property map
            PropertyKey key = new PropertyKey(_propertySet, method.getName());
            value = _propertyMap.getProperty(key);

            // If the returned value is itself a PropertyMap (i.e. a nested annotation type),
            // then wrap it in a PropertySetProxy instance before returning.
            if (value instanceof PropertyMap)
View Full Code Here

Examples of org.apache.helix.PropertyKey

      }
    }
    try
    {
      // Update the ZK current state of the node
      PropertyKey key = keyBuilder.currentState(instanceName,
                              sessionId,
                              resource,
                              bucketizer.getBucketName(partitionKey));
      if (!_message.getGroupMessageMode())
      {
View Full Code Here

Examples of org.apache.helix.PropertyKey

      }
      else
      {
       
        PropertyKey propertyKey =
            keyBuilder.stateTransitionStatus(instanceName,
                                             sessionId,
                                             statusUpdateSubPath,
                                             statusUpdateKey);

        ZNRecord statusUpdateRecord = createMessageLogRecord(message);

        // For now write participant StatusUpdates to log4j.
        // we are using restlet as another data channel to report to controller.
        if(_logger.isTraceEnabled()){
           _logger.trace("StatusUpdate path:" + propertyKey.getPath() + ", updates:"
              + statusUpdateRecord);
        }
        accessor.updateProperty(propertyKey, new StatusUpdate(statusUpdateRecord));
       
      }
      _recordedMessages.put(message.getMsgId(), message.getMsgId());
    }

    if (instanceName.equalsIgnoreCase("Controller"))
    {
      accessor.updateProperty(keyBuilder.controllerTaskStatus(statusUpdateSubPath,
                                                              statusUpdateKey),
                              new StatusUpdate(record));
    }
    else
    {
     
      PropertyKey propertyKey =
          keyBuilder.stateTransitionStatus(instanceName,
                                           sessionId,
                                           statusUpdateSubPath,
                                           statusUpdateKey);
      // For now write participant StatusUpdates to log4j.
      // we are using restlet as another data channel to report to controller.
      if(_logger.isTraceEnabled()){
        _logger.trace("StatusUpdate path:" + propertyKey.getPath() + ", updates:" + record);
      }
      accessor.updateProperty(propertyKey, new StatusUpdate(record));
    }

    // If the error level is ERROR, also write the record to "ERROR" ZNode
View Full Code Here

Examples of org.apache.helix.PropertyKey

    List<ZNRecord> children = _baseDataAccessor.get(paths, null, 0);

    // check if bucketized
    for (int i = 0; i < keys.size(); i++)
    {
      PropertyKey key = keys.get(i);
      ZNRecord record = children.get(i);

      PropertyType type = key.getType();
      String path = key.getPath();
      int options = constructOptions(type);
      // ZNRecord record = null;

      switch (type)
      {
      case CURRENTSTATES:
      case IDEALSTATES:
      case EXTERNALVIEW:
        // check if bucketized
        if (record != null)
        {
          HelixProperty property = new HelixProperty(record);

          int bucketSize = property.getBucketSize();
          if (bucketSize > 0)
          {
            List<ZNRecord> childRecords =
                _baseDataAccessor.getChildren(path, null, options);
            ZNRecord assembledRecord = new ZNRecordAssembler().assemble(childRecords);

            // merge with parent node value
            if (assembledRecord != null)
            {
              record.getSimpleFields().putAll(assembledRecord.getSimpleFields());
              record.getListFields().putAll(assembledRecord.getListFields());
              record.getMapFields().putAll(assembledRecord.getMapFields());
            }
          }
        }
        break;
      default:
        break;
      }

      @SuppressWarnings("unchecked")
      T t = (T) HelixProperty.convertToTypedInstance(key.getTypeClass(), record);
      childValues.add(t);
    }

    return childValues;
  }
View Full Code Here

Examples of org.apache.helix.PropertyKey

    int options = -1;
    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.PropertyKey

        new ArrayList<List<ZNRecord>>(Collections.<List<ZNRecord>> nCopies(keys.size(),
                                                                           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.PropertyKey

    Assert.assertEquals(instances.size(), 1, "Expecting one live instance");
    Assert.assertEquals(instances.get(0).getInstanceName(), manager.getInstanceName());
    // Update data in the live instance node, should trigger another live instance change
    // event
    HelixDataAccessor helixDataAccessor = manager.getHelixDataAccessor();
    PropertyKey propertyKey =
        helixDataAccessor.keyBuilder().liveInstance(manager.getInstanceName());
    LiveInstance instance = helixDataAccessor.getProperty(propertyKey);

    Map<String, String> map = new TreeMap<String, String>();
    map.put("k1", "v1");
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.