Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.wlevs.ede
Interface Monitor

public interface Monitor

The Monitor service allows one to monitor the throughput and latency of Event Server application endpoints. An Event Server endpoint is either the entry or the exit point in an application stage. Clients can register at the Monitor service to receive events in the form of a MetricEvent that indicate the throughput and the latency metric of an endpoint as defined by the interval parameter. Even though the monitoring activities are processed separately from the application events, monitoring still adds some overhead to the system, hence it is disabled by default. To enable monitoring of an stage, a stage must be marked as 'manageable' in the application assembly and then it can be dynamically enabled or disabled for monitoring through the configuration system.

See Also:
  `Endpoint`, `Stage`, `MetricEvent`

Field Summary
`static String` | `SERVICE_FILTER`
`static String` | `SERVICE_ID`
`static String` | `STREAM_FILTER`
`static String` | `STREAM_ID`

Method Summary
`Endpoint` | `createEndpoint(String applicationId, String stageId, Endpoint.Stagepoint stagepoint)` Returns endpoint that represents a 'place' in the Event Server that can be monitored.
`boolean` | `isEnabled()` Returns if the Monitor service is enabled.
`Statement` | `monitorAvgLatency(Endpoint start, Endpoint end, long averageInterval, TimeUnit unit)` Monitor the average latency of events between two endpoints.
`String` | `monitorAvgLatency(Endpoint start, Endpoint end, long averageInterval, TimeUnit unit, EventSink listener)` Monitor the average latency of events between two endpoints.
`Statement` | `monitorAvgLatencyThreshold(Endpoint start, Endpoint end, long averageInterval, long threshold, TimeUnit unit)` Monitor if the average latency of events between two endpoints cross a threshold.
`String` | `monitorAvgLatencyThreshold(Endpoint start, Endpoint end, long averageInterval, long threshold, TimeUnit unit, EventSink listener)` Monitor if the average latency of events between two endpoints cross a threshold.
`Statement` | `monitorAvgThroughput(Endpoint endpoint, long throughputInterval, long averageInterval, TimeUnit unit)` Monitor the average throughput of events in an endpoint.
`String` | `monitorAvgThroughput(Endpoint endpoint, long throughputInterval, long averageInterval, TimeUnit unit, EventSink listener)` Monitor the average throughput of events in an endpoint.
`Statement` | `monitorMaxLatency(Endpoint start, Endpoint end, long maxInterval, TimeUnit unit)` Monitor the maximum latency of events between two endpoints.
`String` | `monitorMaxLatency(Endpoint start, Endpoint end, long averageInterval, TimeUnit unit, EventSink listener)` Monitor the average latency of events between two endpoints.
`void` | `setEnabled(boolean enabled)` Enables the Monitor service.

Field Detail

### SERVICE_ID

    public static final String SERVICE_ID

### SERVICE_FILTER

    public static final String SERVICE_FILTER

### STREAM_ID

    public static final String STREAM_ID

### STREAM_FILTER

    public static final String STREAM_FILTER

Method Detail

### setEnabled

    public void setEnabled(boolean enabled)

  Enables the Monitor service.

  Parameters:
    `enabled` -

### isEnabled

    public boolean isEnabled()

  Returns if the Monitor service is enabled. Note that enabling the Monitor service does not enable any particular stages for monitoring. One still has to explicitly enable the stages for monitoring.

  Returns:
    boolean - true if the Monitor service is enabled

### createEndpoint

    public Endpoint createEndpoint(String applicationId,
                                   String stageId,
                                   Endpoint.Stagepoint stagepoint)

  Returns endpoint that represents a 'place' in the Event Server that can be monitored.

  Returns:
    Endpoint - monitorable stage end-point

### monitorAvgThroughput

    public Statement monitorAvgThroughput(Endpoint endpoint,
                                          long throughputInterval,
                                          long averageInterval,
                                          TimeUnit unit)

  Monitor the average throughput of events in an endpoint. Throughput is defined as the number of events that goes through the endpoint per the throughputInterval parameter, defined in the unit parameter. Time unit must be either in SECS or MILLISECS, but not less. The average throughput is calculated by averaging the throughput across the averageInterval parameter A MetricEvent containing the average throughput is outputed at the end of every averageInterval.

  Parameters:
    `endpoint` - - Endpoint end-point to be monitored
    `throughputInterval` - - long throughput interval defined in TimeUnit unit
    `averageInterval` - - long average interval defined in TimeUnit unit
    `unit` - - TimeUnit time unit for throughput and average interval
  Returns:
    Statement - used to register for MetricEvents
  Throws:
    IllegalArgumentException - if unit is not in SECS or MILLISECS, if intervals are less than 100 MILLISECS, if throughput interval is greater than average interval

### monitorAvgThroughput

    public String monitorAvgThroughput(Endpoint endpoint,
                                       long throughputInterval,
                                       long averageInterval,
                                       TimeUnit unit,
                                       EventSink listener)

  Monitor the average throughput of events in an endpoint. Throughput is defined as the number of events that goes through the endpoint per the throughputInterval parameter, defined in the unit parameter. Time unit must be either in SECS or MILLISECS, but not less. The average throughput is calculated by averaging the throughput across the averageInterval parameter. A MetricEvent containing the average throughput is outputed at the end of every averageInterval.

  Parameters:
    `endpoint` - - Endpoint end-point to be monitored
    `throughputInterval` - - long throughput interval defined in TimeUnit unit
    `averageInterval` - - long average interval defined in TimeUnit unit
    `unit` - - TimeUnit time unit for throughput and average interval
    `listener` - - EventSink listener of MetricEvents that contain the average throughput metric
  Returns:
    String - id of underlying Statement created to monitor throughput.
  Throws:
    IllegalArgumentException - if unit is not in SECS or MILLISECS, if intervals are less than 100 MILLISECS, if throughput interval is greater than average interval

### monitorAvgLatency

    public Statement monitorAvgLatency(Endpoint start,
                                       Endpoint end,
                                       long averageInterval,
                                       TimeUnit unit)

  Monitor the average latency of events between two endpoints. Latency is defined as the time it takes a event to flow between two endpoints. The average latency is calculated by averaging the latency across the averageInterval parameter. A MetricEvent containing the average latency is outputed at the end of every averageInterval.

  Parameters:
    `start` - - Start end-point to be monitored
    `end` - - End end-point to be monitored
    `averageInterval` - - long average interval defined in TimeUnit unit
    `unit` - - TimeUnit time unit for throughput and average interval
  Returns:
    Statement - used to register for MetricEvents
  Throws:
    IllegalArgumentException - if unit is not in SECS or MILLISECS, if intervals are less than 100 MILLISECS,

### monitorAvgLatency

    public String monitorAvgLatency(Endpoint start,
                                    Endpoint end,
                                    long averageInterval,
                                    TimeUnit unit,
                                    EventSink listener)

  Monitor the average latency of events between two endpoints. Latency is defined as the time it takes a event to flow between two endpoints. The average latency is calculated by averaging the latency across the averageInterval parameter. A MetricEvent containing the average latency is outputed at the end of every averageInterval.

  Parameters:
    `start` - - Start end-point to be monitored
    `end` - - End end-point to be monitored
    `averageInterval` - - long average interval defined in TimeUnit unit
    `unit` - - TimeUnit time unit for throughput and average interval
    `listener` - - EventSink listener of MetricEvents that contain the average latency metric
  Returns:
    String - id of underlying Statement created to monitor throughput.
  Throws:
    IllegalArgumentException - if unit is not in SECS or MILLISECS, if intervals are less than 100 MILLISECS

### monitorAvgLatencyThreshold

    public Statement monitorAvgLatencyThreshold(Endpoint start,
                                                Endpoint end,
                                                long averageInterval,
                                                long threshold,
                                                TimeUnit unit)

  Monitor if the average latency of events between two endpoints cross a threshold. Latency is defined as the time it takes a event to flow between two endpoints. The average latency is calculated by averaging the latency across the averageInterval parameter. A MetricEvent containing the average latency is outputed at the end of every averageInterval if the average is above the threshold parameter.

  Parameters:
    `start` - - Start end-point to be monitored
    `end` - - End end-point to be monitored
    `averageInterval` - - long average interval defined in TimeUnit unit
    `threshold` - - long latency threshold used to emit MetricEvents when crossed
    `unit` - - TimeUnit time unit for throughput and average interval
  Returns:
    Statement - used to register for MetricEvents
  Throws:
    IllegalArgumentException - if unit is not in SECS or MILLISECS, if intervals are less than 100 MILLISECS,

### monitorAvgLatencyThreshold

    public String monitorAvgLatencyThreshold(Endpoint start,
                                             Endpoint end,
                                             long averageInterval,
                                             long threshold,
                                             TimeUnit unit,
                                             EventSink listener)

  Monitor if the average latency of events between two endpoints cross a threshold. Latency is defined as the time it takes a event to flow between two endpoints. The average latency is calculated by averaging the latency across the averageInterval parameter. A MetricEvent containing the average latency is outputed at the end of every averageInterval if the average is above the threshold parameter.

  Parameters:
    `start` - - Start end-point to be monitored
    `end` - - End end-point to be monitored
    `averageInterval` - - long average interval defined in TimeUnit unit
    `threshold` - - long latency threshold used to emit MetricEvents when crossed
    `listener` - - EventSink listener of MetricEvents that contain the average throughput metric
    `unit` - - TimeUnit time unit for throughput and average interval
  Returns:
    String - id of underlying Statement created to monitor throughput.
  Throws:
    IllegalArgumentException - if unit is not in SECS or MILLISECS, if intervals are less than 100 MILLISECS,

### monitorMaxLatency

    public Statement monitorMaxLatency(Endpoint start,
                                       Endpoint end,
                                       long maxInterval,
                                       TimeUnit unit)

  Monitor the maximum latency of events between two endpoints. Latency is defined as the time it takes a event to flow between two endpoints. The maximum latency is the highest latency to occur during the maxInterval parameter. A MetricEvent containing the max latency is outputed at the end of every maxInterval.

  Parameters:
    `start` - - Start end-point to be monitored
    `end` - - End end-point to be monitored
    `averageInterval` - - long average interval defined in TimeUnit unit
    `unit` - - TimeUnit time unit for throughput and average interval
  Returns:
    Statement - used to register for MetricEvents
  Throws:
    IllegalArgumentException - if unit is not in SECS or MILLISECS, if intervals are less than 100 MILLISECS

### monitorMaxLatency

    public String monitorMaxLatency(Endpoint start,
                                    Endpoint end,
                                    long averageInterval,
                                    TimeUnit unit,
                                    EventSink listener)

  Monitor the average latency of events between two endpoints. Latency is defined as the time it takes a event to flow between two endpoints. The average latency is calculated by averaging the latency across the averageInterval parameter. A MetricEvent containing the max latency is outputed at the end of every maxInterval.

  Parameters:
    `start` - - Start end-point to be monitored
    `end` - - End end-point to be monitored
    `averageInterval` - - long average interval defined in TimeUnit unit
    `unit` - - TimeUnit time unit for throughput and average interval
    `listener` - - EventSink listener of MetricEvents that contain the average latency metric
  Returns:
    String - id of underlying Statement created to monitor throughput.
  Throws:
    IllegalArgumentException - if unit is not in SECS or MILLISECS, if intervals are less than 100 MILLISECS

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD