[jboss-dev-forums] [Design of JBossCache] - Pass event type to EvictionPolicy.canIgnoreEvents
bstansberry@jboss.com
do-not-reply at jboss.com
Thu Oct 5 14:08:21 EDT 2006
When we moved to EvictionInterceptor from a TreeCacheListener-based approach, one thing we lost is the ability for custom policies to prevent certain kinds of events going into the eviction queue. For example, a customer wants to prevent node modifications and visits from going in the queue as they are far too numerous for his app; he just wants adds (and maybe removes) so he can evict solely based on maxNodeAge.
Currently the only hook we provide to prevent an event going into the queue is EvictionPolicy.canIgnoreEvent(Fqn). But, when this call is made, we know the event type and even have a bunch of int constants identifying the valid types. So, for 2.0 I propose 1) create a proper JDK5 Enum of the event types, and 2) change the EvictionPolicy interface to:
boolean canIgnoreEvent(Fqn fqn, NodeEventType eventType)
The existing policies would just ignore the second parameter.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976378#3976378
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976378
More information about the jboss-dev-forums
mailing list