History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CACHE-78
Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Andres March
Reporter: Martin Heitz
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
OSCache

Determining used cache algorithm

Created: 10/Feb/04 04:20 AM   Updated: 13/Mar/05 02:50 PM
Component/s: Base Classes
Affects Version/s: 2.0.2
Fix Version/s: 3.0

Environment: does not apply


 Description  « Hide
It would be great to have some way to assert, that the selected cache algorithm (as provided in the constructor of Cache) was really instantiated. This might become a problem if making programming errors like providing a negative capacity in the Cache constructor (because my cache algorithm ignores it like UnlimitedCache does) and then the logics in the Cache class does not instantiate my cache algorithm but UnlimitedCache (without me noticing this - not even logging that it chose another than the specified algorithm!).

Therefore a method in Cache like
public final String getCacheAlgorithm() {
  return this.cacheMap.getClass().getName();
}
would be helpful, then I could use a JDK1.4 - assertion to verify correct behaviour.


 All   Comments   Change History      Sort Order:
There are no comments yet on this issue.