org.jboss.web.tomcat.service.session.distributedcache.impl.jbc
Class CacheListener

java.lang.Object
  extended by org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.CacheListenerBase
      extended by org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.CacheListener

public class CacheListener
extends CacheListenerBase

Listens for removals and modifications in the cache, notifying the session manager of significant events.

Author:
Brian Stansberry

Field Summary
 
Fields inherited from class org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.CacheListenerBase
BUDDY_BACKUP_ROOT_OWNER_SIZE, manager_, SESSION_ID_FQN_INDEX
 
Method Summary
static String getPojoKeyFromFqn(org.jboss.cache.Fqn<String> fqn, boolean isBuddy)
           
static boolean isPossibleInternalPojoFqn(org.jboss.cache.Fqn<String> fqn)
          Check if the fqn is big enough to be in the internal pojo area but isn't in the regular attribute area.
 void nodeModified(org.jboss.cache.notifications.event.NodeModifiedEvent event)
           
 void nodeRemoved(org.jboss.cache.notifications.event.NodeRemovedEvent event)
           
 
Methods inherited from class org.jboss.web.tomcat.service.session.distributedcache.impl.jbc.CacheListenerBase
getBuddyOwner, getIdFromFqn, isBuddyFqn, isFqnForOurWebapp, isFqnSessionRootSized
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

nodeRemoved

public void nodeRemoved(org.jboss.cache.notifications.event.NodeRemovedEvent event)

nodeModified

public void nodeModified(org.jboss.cache.notifications.event.NodeModifiedEvent event)

getPojoKeyFromFqn

public static String getPojoKeyFromFqn(org.jboss.cache.Fqn<String> fqn,
                                       boolean isBuddy)

isPossibleInternalPojoFqn

public static boolean isPossibleInternalPojoFqn(org.jboss.cache.Fqn<String> fqn)
Check if the fqn is big enough to be in the internal pojo area but isn't in the regular attribute area. Structure in the cache is: /JSESSION ++ /contextPath_hostname ++++ /sessionid ++++++ /ATTRIBUTE ++++++ /_JBossInternal_ ++++++++ etc etc If the Fqn size is big enough to be "etc etc" or lower, but the 4th level is not "ATTRIBUTE", it must be under _JBossInternal_. We discriminate based on != ATTRIBUTE to avoid having to code to the internal PojoCache _JBossInternal_ name.

Parameters:
fqn -
Returns:


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.