com.neeve.util
Class UtlPoolRegistry

java.lang.Object
  extended by com.neeve.util.UtlPoolRegistry

public final class UtlPoolRegistry
extends Object

Stores operating object pool objects.

The pool registry is a singleton class that stores operating pool objects in an X Platform application. Each pool is uniquely identified in the system by a type and name which together form unique system-wide pool key. The pool is added to the registry when the pool is created and is never removed from the registry for the lifetime of the application.

The purpose of the pool statistics registry is to enable a user to query for pools by name and get information from the pool or start and stop the periodic output of the pool's statistical information in a human readble string format.

This class IS NOT intended to be used by end users.

Threading:
This class is safe for concurrent access by multiple threads.

Nested Class Summary
static interface UtlPoolRegistry.EventHandler
          Identifies a pool registry event handler The pool registry dispatches registry through handlers of this type.
 
Method Summary
 UtlPool<?> get(String name)
          Get a pool from the registry.
static UtlPoolRegistry getInstance()
          Return the singleton pool registry instance
 cern.colt.list.ObjectArrayList getValues(UtlPoolRegistry.EventHandler eventHandler)
          Return a list containing the set of pool objects in the registry.
 void removeHandler(UtlPoolRegistry.EventHandler eventHandler)
          Removes a previously registered event handler.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static UtlPoolRegistry getInstance()
Return the singleton pool registry instance

Returns:
Returns the pool registry
Threading:
This method is safe for concurrent access by multiple threads

get

public final UtlPool<?> get(String name)
Get a pool from the registry.

Parameters:
name - The fully qualified name of the pool.
Threading:
This method is safe for concurrent access by multiple threads

getValues

public final cern.colt.list.ObjectArrayList getValues(UtlPoolRegistry.EventHandler eventHandler)
Return a list containing the set of pool objects in the registry.

Parameters:
eventHandler - Installs the provided event handler to receive notifications for pools added after this call returns. This parameter can be null.
Returns:
Returns the list of pool objects in the registry.

This method returns a copy of the set of pool objects in the registry and, optionally, installs a handler to watch for new objects.

Threading:
This method is safe for concurrent access by multiple threads

removeHandler

public final void removeHandler(UtlPoolRegistry.EventHandler eventHandler)
Removes a previously registered event handler.

Parameters:
eventHandler - Removes a previously registered event handler.
Threading:
This method is safe for concurrent access by multiple threads


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.