Examples of StreamDefinition


Examples of org.wso2.carbon.databridge.commons.StreamDefinition

    private static final String DATA_STREAM_NAME = "stratos.lb.faulty.members";
    private static final String VERSION = "1.0.0";

    private static StreamDefinition createStreamDefinition() {
        try {
            StreamDefinition streamDefinition = new StreamDefinition(DATA_STREAM_NAME, VERSION);
            streamDefinition.setNickName("lb fault members");
            streamDefinition.setDescription("lb fault members");
            List<Attribute> payloadData = new ArrayList<Attribute>();
            // Payload definition
            payloadData.add(new Attribute("cluster_id", AttributeType.STRING));
            payloadData.add(new Attribute("member_id", AttributeType.STRING));
            streamDefinition.setPayloadData(payloadData);
            return streamDefinition;
        } catch (Exception e) {
            throw new RuntimeException("Could not create stream definition", e);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.databridge.commons.StreamDefinition

            throw new DataPublisherException("Monitoring server not active, data publishing is aborted");
        }

        // stream definition identifier = {log.publisher.<cluster id>}
        try {
            streamDefinition = new StreamDefinition(Constants.LOG_PUBLISHER_STREAM_PREFIX + CartridgeAgentConfiguration.getInstance().getClusterId(),
                    Constants.LOG_PUBLISHER_STREAM_VERSION);

        } catch (MalformedStreamDefinitionException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

Examples of org.wso2.carbon.databridge.commons.StreamDefinition

    private static final String DATA_STREAM_NAME = "cartridge_agent_health_stats";
    private static final String VERSION = "1.0.0";

    private static StreamDefinition createStreamDefinition() {
        try {
            StreamDefinition streamDefinition = new StreamDefinition(DATA_STREAM_NAME, VERSION);
            streamDefinition.setNickName("agent health stats");
            streamDefinition.setDescription("agent health stats");
            // Payload definition
            List<Attribute> payloadData = new ArrayList<Attribute>();
            payloadData.add(new Attribute("cluster_id", AttributeType.STRING));
            payloadData.add(new Attribute("network_partition_id", AttributeType.STRING));
            payloadData.add(new Attribute("member_id", AttributeType.STRING));
            payloadData.add(new Attribute("partition_id", AttributeType.STRING));
            payloadData.add(new Attribute("health_description", AttributeType.STRING));
            payloadData.add(new Attribute("value", AttributeType.DOUBLE));
            streamDefinition.setPayloadData(payloadData);
            return streamDefinition;
        } catch (Exception e) {
            throw new RuntimeException("Could not create stream definition", e);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.databridge.commons.StreamDefinition

      }
    }
  }

  private static StreamDefinition initializeStream() throws Exception {
    streamDefinition = new StreamDefinition( CartridgeConstants.STRATOS_MANAGER_EVENT_STREAM,
        stratosManagerEventStreamVersion);
    streamDefinition.setNickName("stratos.manager");
    streamDefinition.setDescription("Tenant Subscription Data");
    // Payload definition
    List<Attribute> payloadData = new ArrayList<Attribute>();
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.