jp.co.nec.orb
クラス ObjectPooling

java.lang.Object
  |
  +--jp.co.nec.orb.ObjectPooling

public class ObjectPooling
extends java.lang.Object

The function of this class is pooling objects.
This class uses an array of objects as a ring buffer.

関連項目:
ObjectPooling

コンストラクタの概要
ObjectPooling(int x)
          This constructor specifies the maximum storage number of Objects, and allocates an array of objects
 
メソッドの概要
 int count()
          This method counts the number of object and returns it.
 java.lang.Object get()
          get a object from a ring buffer as a returned value
 java.lang.Object noSyncGet()
          get a object from a ring buffer as a returned value
WITHOUT USE "synchronized"
#The caller must take the responsibility on synchronous control.
 void noSyncPut(java.lang.Object elem)
          put a object to a ring buffer
WITHOUT USE "synchronized"
#The caller must take the responsibility on synchronous control.
 void put(java.lang.Object elem)
          put a object to a ring buffer
 
クラス java.lang.Object から継承したメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

ObjectPooling

public ObjectPooling(int x)
This constructor specifies the maximum storage number of Objects, and allocates an array of objects
パラメータ:
x - -the maximum storage number of Objects
関連項目:
ObjectPooling
メソッドの詳細

count

public int count()
This method counts the number of object and returns it.
戻り値:
_num_of_elem -the number of objects(elements) in this array.
関連項目:
ObjectPooling

put

public void put(java.lang.Object elem)
put a object to a ring buffer
パラメータ:
elem - -the object to put
関連項目:
ObjectPooling

get

public java.lang.Object get()
get a object from a ring buffer as a returned value
戻り値:
elem -the object to get
null -this means the ring buffer has no object
関連項目:
ObjectPooling

noSyncPut

public void noSyncPut(java.lang.Object elem)
put a object to a ring buffer
WITHOUT USE "synchronized"
#The caller must take the responsibility on synchronous control.
パラメータ:
elem - -the object to put
関連項目:
ObjectPooling

noSyncGet

public java.lang.Object noSyncGet()
get a object from a ring buffer as a returned value
WITHOUT USE "synchronized"
#The caller must take the responsibility on synchronous control.
戻り値:
elem -the object to get
null -this means the ring buffer has no object
関連項目:
ObjectPooling