dhuang in JBossCache

Marking a node as in use will prevent it from being evicted. Only LRU has a fully tested implementation right now. The others will have this feature post 1.4.0.

Element Eviction. Still evicts on the nodes but counts the # of elements in a node.

    • -0
    • +133
    /core/trunk/etc/META-INF/local-elementsize-eviction-service.xml
    • -0
    • +219
    /core/trunk/src/org/jboss/cache/eviction/ElementSizeQueue.java
  1. … 8 more files in changeset.
no message

fix a unit test case

    • -222
    • +228
    /core/trunk/src/org/jboss/cache/TreeCache.java
Added functionality to keep track of the # of elements being held per cache region.

  1. … 13 more files in changeset.
cvs ignore to ignore test output files.

Added boolean to indicate if cache is using eviction policies or not. Eviction policies are configuration backwards compatible therefore the logic to check if eviction is in use, is a bit complex. It is not feasible to duplicate the same eviction enabled logic check across all callers that need to know. The InterceptorChainFactory was updated to use this boolean.

    • -721
    • +730
    /core/trunk/src/org/jboss/cache/TreeCacheMBean.java
Correct a unit test.

Eviction refactored into an EvictionInterceptor. # of elements changes is also recorded for now. EvictionAlgorithm changes to support maxElements will follow shortly.

    • -210
    • +297
    /core/trunk/src/org/jboss/cache/TreeCache.java
    • -64
    • +118
    /core/trunk/src/org/jboss/cache/aop/PojoCache.java
  1. /core/trunk/src/org/jboss/cache/aop/interceptors
  2. … 3 more files in changeset.
Added deprecated methods back into LRUPolicy/Region/RegionManager to support API compatibility for EJB3 class extensions of JBossCache

    • -748
    • +787
    /core/trunk/src/org/jboss/cache/TreeCache.java
Fix implemented for JBCACHE-373. Also made adding and removing regions to the eviction region manager threadsafe.

AReplace one off XML parsing with usage of XmlHelper in unit tests.

Add unit test case where no eviction is configured for TreeCache.

updated documentation for the new eviction policy providers as well as the refactoring/new eviction policy architecture.

    • binary
    /core/trunk/docs/TreeCache/en/images/EvictionUML.png
    • -166
    • +1003
    /core/trunk/docs/TreeCache/en/master.xml
Reduce sleep time for local-aop-eviction-service from 5 seconds to 3 seconds. This allows the unit tests to run faster.

support for 1.3 eviction configuration. Each region can have a different policy. Still supports 1.2.x backwards compatibility where there is 1 policy class for the entire cache instance. Also supports 'mixed mode' where 1 policy is defined for the entire cache but each region can override with a different eviction policy.

Unit tests included to test policy per region, mixed mode and legacy configurations.

    • -0
    • +133
    /core/trunk/etc/META-INF/mixedPolicy-eviction-service.xml
    • -1416
    • +1869
    /core/trunk/src/org/jboss/cache/TreeCache.java
Make Eviction Policy unit tests run faster. The actual logic of the test remains unchanged. The Thread sleep times were changed so the tests spend more time actually running rather than sleeping.

Fixes the broken unit test in LFUAlgorithmTest.

This test was proper and prevented a bug where the removal queue was not being pruned by the LFUQueue class.

Eviction policy refactoring to support 1 Policy per Region.

Refactoring of Eviction Policies to allow for easier user extension.

Introduce EvictionQueue and EvictionConfiguration interfaces.

New Eviction Policies for MRU and LFU.

Allow configuration of EvictionPolicies at runtime.

References JIRA tasks:

JBCACHE-314

JBCACHE-313

JBCACHE-312

JBCACHE-286

JBCACHE-225

JBCACHE-213

    • -19
    • +21
    /core/trunk/docs/design/EvictionPolicy.txt
    • binary
    /core/trunk/docs/design/evictionUML.png
    • -0
    • +130
    /core/trunk/etc/META-INF/local-fifo-eviction-service.xml
    • -0
    • +129
    /core/trunk/etc/META-INF/local-lfu-eviction-service.xml
    • -0
    • +139
    /core/trunk/etc/META-INF/local-lru-eviction-service.xml
    • -0
    • +127
    /core/trunk/etc/META-INF/local-mru-eviction-service.xml
    • -4
    • +10
    /core/trunk/src/org/jboss/cache/Fqn.java
  1. … 56 more files in changeset.
Added .cvsignore files to avoid checking in built code or documentation by accident.

    • -0
    • +1
    /core/trunk/docs/TreeCache/.cvsignore
    • -0
    • +1
    /core/trunk/docs/TreeCacheAop/.cvsignore
    • -0
    • +1
    /core/trunk/docs/faq/.cvsignore
    • -0
    • +1
    /core/trunk/docs/index/.cvsignore
    • -0
    • +1
    /core/trunk/docs/tutorial/.cvsignore
JIRA JBCACHE-202 implementation.

Ditched the submitted patch as it was doing some questionnable inheritance and instead reimplemented the changes on top of existing JBCache code.

A new field maxAgeSeconds is added to a region to determine how long an object lives in cache regardless of its last idle time. It is part of the LRUPolicy and LRUAlgorithm. If it is set to 0, the maxAgeSeconds field is ignored.

    • -1
    • +10
    /core/trunk/docs/TreeCache/en/master.xml