Class FixedSizeCache

  • All Implemented Interfaces:
    Cache

    public class FixedSizeCache
    extends java.lang.Object
    implements Cache
    Cache which stores up to limit Objects.
    Since:
    1.1
    Author:
    Thomas Down
    • Constructor Summary

      Constructors 
      Constructor Description
      FixedSizeCache​(int limit)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getLimit()  
      CacheReference makeReference​(java.lang.Object o)
      Construct a temporary reference to an object.
      void setLimit​(int limit)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • makeReference

        public CacheReference makeReference​(java.lang.Object o)
        Description copied from interface: Cache
        Construct a temporary reference to an object. The reference persists until it becomes dereferenced itself, it is explicitly cleared by the user, or the cache determines that it is a candidate for disposal.
        Specified by:
        makeReference in interface Cache
      • setLimit

        public void setLimit​(int limit)