Top Fields Constructors Methods
org.glassfish.pfl.tf.timer.impl

public abstract Class ControllableBase

extends NamedBaseImpl
implements Controllable
Class Inheritance
All Implemented Interfaces
org.glassfish.pfl.tf.timer.spi.Controllable, org.glassfish.pfl.tf.timer.spi.Named
Known Direct Subclasses
org.glassfish.pfl.tf.timer.impl.TimerGroupImpl, org.glassfish.pfl.tf.timer.impl.TimerImpl
Imports
java.util.Collections, .HashSet, .Set, org.glassfish.pfl.tf.timer.spi.Controllable

Field Summary

Modifier and TypeField and Description
private String
private static final Set<ControllableBase>
private int
private boolean

Constructor Summary

AccessConstructor and Description
protected
ControllableBase(int id, String name, String description, TimerFactoryImpl factory)

Method Summary

Modifier and TypeMethod and Description
public Set<ControllableBase>
contents()

Implements org.glassfish.pfl.tf.timer.spi.Controllable.contents.

Return an unmodifiable set of the contents of this Controllable.

public String
description()

Implements org.glassfish.pfl.tf.timer.spi.Controllable.description.

A longer description giving some details of the meaning of this Controllable.

pack-priv void
description(String description)

public void
disable()

Implements org.glassfish.pfl.tf.timer.spi.Controllable.disable.

Disable this controllable.

public void
enable()

Implements org.glassfish.pfl.tf.timer.spi.Controllable.enable.

Enable this controllable.

public int
id()

Implements org.glassfish.pfl.tf.timer.spi.Controllable.id.

A small id for this controllable.

public final boolean
isEnabled()

Implements org.glassfish.pfl.tf.timer.spi.Controllable.isEnabled.

Return true if enable() was called, otherwise false if enable() was never called, or disable() was last called.

pack-priv void
Inherited from org.glassfish.pfl.tf.timer.impl.NamedBaseImpl:
factory

Field Detail

descriptionback to summary
private String description
emptyContentback to summary
private static final Set<ControllableBase> emptyContent
idback to summary
private int id
isEnabledback to summary
private boolean isEnabled

Constructor Detail

ControllableBaseback to summary
protected ControllableBase(int id, String name, String description, TimerFactoryImpl factory)

Method Detail

contentsback to summary
public Set<ControllableBase> contents()

Implements org.glassfish.pfl.tf.timer.spi.Controllable.contents.

Doc from org.glassfish.pfl.tf.timer.spi.Controllable.contents.

Return an unmodifiable set of the contents of this Controllable. May always be empty for some subclasses of Controllable.

Annotations
@Override
descriptionback to summary
public String description()

Implements org.glassfish.pfl.tf.timer.spi.Controllable.description.

Doc from org.glassfish.pfl.tf.timer.spi.Controllable.description.

A longer description giving some details of the meaning of this Controllable.

Annotations
@Override
descriptionback to summary
pack-priv void description(String description)
disableback to summary
public void disable()

Implements org.glassfish.pfl.tf.timer.spi.Controllable.disable.

Doc from org.glassfish.pfl.tf.timer.spi.Controllable.disable.

Disable this controllable.

Annotations
@Override
enableback to summary
public void enable()

Implements org.glassfish.pfl.tf.timer.spi.Controllable.enable.

Doc from org.glassfish.pfl.tf.timer.spi.Controllable.enable.

Enable this controllable. All Timers that are either enabled, or reachable via contents() from an enabled Controllable are activated, and will cause TimerEvents to be generated when passed to the TimerEventController enter and exit methods.

Annotations
@Override
idback to summary
public int id()

Implements org.glassfish.pfl.tf.timer.spi.Controllable.id.

Doc from org.glassfish.pfl.tf.timer.spi.Controllable.id.

A small id for this controllable. Each controllable created from the same TimerFactory will have a unique ID. All ids will be small integers starting at 0 (so indexing tables by timer ID is supported).

Annotations
@Override
isEnabledback to summary
public final boolean isEnabled()

Implements org.glassfish.pfl.tf.timer.spi.Controllable.isEnabled.

Doc from org.glassfish.pfl.tf.timer.spi.Controllable.isEnabled.

Return true if enable() was called, otherwise false if enable() was never called, or disable() was last called.

Annotations
@Override
transitiveClosureback to summary
pack-priv void transitiveClosure(Set<ControllableBase> result)