[jboss-dev-forums] [Design of JBossCache] - Re: CacheListener callbacks for block/unblock
jason.greene@jboss.com
do-not-reply at jboss.com
Fri Jun 8 13:00:34 EDT 2007
"bstansberry at jboss.com" wrote : Yeah, I agree it's not normal. My only concern here is you can't really add it later. CacheListener is an interface people actually implement themselves, so "an added method isn't an API change" thinking breaks down.
|
Right instead you have to introduce a new interface (ExtendedCacheListner or BlockCacheListener).
One thing I was toying with in POJO Cache, that I might introduce at a later date is an annotation driven listener, which is more flexible and extensible:
| @AttachNotificationListener
| @DetachNotificationListener
| @ListModifyNotificationListener
| public myMethod(Notification notification)
| {
| ....
| }
|
or they could do (both would work)
| @AttachNotificationListener
| public void myMethod(AttachNotification notification)
| {
| ....
| }
|
| @DetachNotificationListener
| public void myMethod(DetachNotification notification)
| {
| ....
| }
|
-Jason
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052673#4052673
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052673
More information about the jboss-dev-forums
mailing list