GigaSpaces XAP 8.0 API

org.openspaces.admin.alert.config
Class GarbageCollectionAlertConfigurer

java.lang.Object
  extended by org.openspaces.admin.alert.config.GarbageCollectionAlertConfigurer
All Implemented Interfaces:
AlertConfigurer, BeanConfigurer<AlertConfiguration>

public class GarbageCollectionAlertConfigurer
extends Object
implements AlertConfigurer

A Garbage Collection pause alert configurer. Specifies the thresholds for triggering an alert. There are two thresholds, long period and short period indicating how long a gc took. The garbage collection alert is raised if the gc took longer than the specified 'long' period. The garbage collection alert is resolved if gc took less than the specified 'short' period.

Use the call to create() to create a fully initialized GarbageCollectionAlertConfiguration configuration.

Since:
8.0
Author:
Moran Avigdor
See Also:
GarbageCollectionAlertConfiguration

Constructor Summary
GarbageCollectionAlertConfigurer()
          Constructs an empty garbage collection pause alert configuration.
 
Method Summary
 GarbageCollectionAlertConfiguration create()
          Get a fully configured garbage collection pause configuration (after all properties have been set).
 GarbageCollectionAlertConfigurer enable(boolean enabled)
          Enable an alert using this configuration.
 GarbageCollectionAlertConfigurer raiseAlertForGcDurationOf(long period, TimeUnit timeUnit)
          Raise an alert if gc took longer than the specified period of time.
 GarbageCollectionAlertConfigurer resolveAlertForGcDurationOf(long period, TimeUnit timeUnit)
          Resolve a previously raised alert if gc took less than the specified period of time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GarbageCollectionAlertConfigurer

public GarbageCollectionAlertConfigurer()
Constructs an empty garbage collection pause alert configuration.

Method Detail

enable

public GarbageCollectionAlertConfigurer enable(boolean enabled)
Description copied from interface: AlertConfigurer
Enable an alert using this configuration. By default an alert is disabled.

Specified by:
enable in interface AlertConfigurer
Parameters:
enabled - true to enable the alert using this configuration; false to disable the alert.
Returns:
this.
See Also:
AlertConfiguration.setEnabled(boolean)

raiseAlertForGcDurationOf

public GarbageCollectionAlertConfigurer raiseAlertForGcDurationOf(long period,
                                                                  TimeUnit timeUnit)
Raise an alert if gc took longer than the specified period of time.

Parameters:
period - period of time spent on GC.
timeUnit - the time unit of the specified period.
Returns:
this.
See Also:
GarbageCollectionAlertConfiguration.setLongGcPausePeriod(long, TimeUnit)

resolveAlertForGcDurationOf

public GarbageCollectionAlertConfigurer resolveAlertForGcDurationOf(long period,
                                                                    TimeUnit timeUnit)
Resolve a previously raised alert if gc took less than the specified period of time.

Parameters:
period - period of time spent on GC.
timeUnit - the time unit of the specified period.
Returns:
this.
See Also:
GarbageCollectionAlertConfiguration.setShortGcPausePeriod(long, TimeUnit)

create

public GarbageCollectionAlertConfiguration create()
Get a fully configured garbage collection pause configuration (after all properties have been set).

Specified by:
create in interface BeanConfigurer<AlertConfiguration>
Returns:
a fully configured alert bean configuration.

GigaSpaces XAP 8.0 API

Copyright © GigaSpaces.