org.abora.white.cache
Class InstanceCache

java.lang.Object
  |
  +--org.abora.white.xpp.basic.Heaper
        |
        +--org.abora.white.cache.InstanceCache

public class InstanceCache
extends Heaper

InstanceCache is intended to store a small number of frequently used objects with the intent of reducing memory allocation traffic.


Field Summary
protected  PtrArray myArray
           
protected  int myTop
           
 
Constructor Summary
protected InstanceCache(int size)
           
 
Method Summary
 int actualHashForEqual()
          Defined by subclasses to produce the value returned by hashForEqual.
 Heaper fetch()
           
 boolean isEqual(Heaper other)
          Return true if the two objects are equal.
static InstanceCache make(int size)
           
 boolean store(Heaper object)
           
 
Methods inherited from class org.abora.white.xpp.basic.Heaper
destroy, destruct, equals, hashForEqual, printContentsOn, printOn, sendSelfTo, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myArray

protected PtrArray myArray

myTop

protected int myTop
Constructor Detail

InstanceCache

protected InstanceCache(int size)
Method Detail

make

public static InstanceCache make(int size)

fetch

public Heaper fetch()

store

public boolean store(Heaper object)

actualHashForEqual

public int actualHashForEqual()
Description copied from class: Heaper
Defined by subclasses to produce the value returned by hashForEqual.

Overrides:
actualHashForEqual in class Heaper

isEqual

public boolean isEqual(Heaper other)
Description copied from class: Heaper
Return true if the two objects are equal.

Specified by:
isEqual in class Heaper


Copyright © 2003 David G Jones. All Rights Reserved.
Original Udanax-Gold - Copyright © 1979-1999 Udanax.com. All rights reserved.