|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.Listeners
public class Listeners
Provide a simple, efficient, and thread-safe implementation of a list of event listeners. The implementation is optimized based on the assumption that listeners are added and removed relatively rarely, and that the list of listeners is requested relatively often. Thread safety is implemented by synchronizing on all methods that modify any data member of the class. Read-only methods are not synchronized.
Constructor Summary | |
---|---|
Listeners() Default constructor. |
Method Summary | |
---|---|
void |
add(java.util.EventListener listener) Add a listener. |
void |
addAll(Listeners listeners) Add all listeners from another Listeners object. |
boolean |
contains(java.util.EventListener listener) Check if a listener is in the list of listeners. |
java.util.EventListener[] |
getAsynchronousListeners() Get the array of asynchronous event listeners. |
Filter[] |
getFilters() Return the array of filters associated with this Listeners object. |
java.util.EventListener[] |
getSynchronousListeners() Get the array of synchronous event listeners. |
boolean |
isEmpty() Check if there are no listeners. |
java.util.EventListener[] |
listeners() Get the array of event listeners. |
void |
remove(java.util.EventListener listener) Remove a listener. |
void |
removeAll() Remove all listeners. |
void |
setFilters(Filter[] aFilter) Set the array of filters associated with this Listeners object. |
java.lang.String |
toString() Return a string representation of the Listeners object. |
Constructor Detail |
---|
public Listeners()
Method Detail |
---|
public void add(java.util.EventListener listener)
listener
- the EventListener to addpublic void remove(java.util.EventListener listener)
listener
- the EventListener to removepublic void addAll(Listeners listeners)
listeners
- the Listeners to addpublic void removeAll()
public boolean isEmpty()
public boolean contains(java.util.EventListener listener)
listener
- the EventListener to search forpublic java.util.EventListener[] listeners()
public java.util.EventListener[] getAsynchronousListeners()
public java.util.EventListener[] getSynchronousListeners()
public void setFilters(Filter[] aFilter)
aFilter
- the array of associated filterspublic Filter[] getFilters()
public java.lang.String toString()
|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |