net.ogdf.bin
Class OgdfServerPool

java.lang.Object
  extended by net.ogdf.bin.OgdfServerPool

public final class OgdfServerPool
extends Object

A pool for OGDF server process instances.

Rating red

Field Summary
static OgdfServerPool INSTANCE
          the singleton instance of the server pool.
 
Method Summary
 void dispose()
          Dispose all created server instances.
 OgdfServer fetch()
          Fetch an OGDF server process from the pool, creating one if necessary.
 void release(OgdfServer server)
          Release a previously created server process into the pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final OgdfServerPool INSTANCE
the singleton instance of the server pool.

Method Detail

fetch

public OgdfServer fetch()
Fetch an OGDF server process from the pool, creating one if necessary.

Returns:
an OGDF server process

release

public void release(OgdfServer server)
Release a previously created server process into the pool. Only instances that are still usable may be released. Process instances that lead to errors must be closed without releasing them.

Parameters:
server - an OGDf server process

dispose

public void dispose()
Dispose all created server instances.