J avolution v3.7 (J2SE 1.5+)

javolution.realtime
Class RealtimeObject.Factory<T extends RealtimeObject>

java.lang.Object
  extended by javolution.realtime.ObjectFactory<T>
      extended by javolution.realtime.RealtimeObject.Factory<T>
Enclosing class:
RealtimeObject

public abstract static class RealtimeObject.Factory<T extends RealtimeObject>
extends ObjectFactory<T>

This abstract class represents the factory responsible for the creation of RealtimeObject instances.


Constructor Summary
protected RealtimeObject.Factory()
          Default constructor.
 
Method Summary
protected  ObjectPool<T> newPool()
          Returns a new local pool for this object factory.
 T object()
          Returns a new or recycled object from this factory.
 
Methods inherited from class javolution.realtime.ObjectFactory
cleanup, create, currentPool, heapPool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RealtimeObject.Factory

protected RealtimeObject.Factory()
Default constructor.

Method Detail

object

public final T object()
Returns a new or recycled object from this factory.

Overrides:
object in class ObjectFactory<T extends RealtimeObject>
Returns:
an object from the local stack or from the heap if not executing in a pool context.

newPool

protected ObjectPool<T> newPool()
Description copied from class: ObjectFactory
Returns a new local pool for this object factory. Sub-classes may override this method in order to use specialized pools.

Overrides:
newPool in class ObjectFactory<T extends RealtimeObject>
Returns:
a new pool for stack allocation.

J avolution v3.7 (J2SE 1.5+)

Copyright © 2006 Javolution.