try
{
// update the attribute.
//updateCaches(key, val, attrE, INCLUDE_REMOTE_CACHE);
CacheElement ce = new CacheElement( this.getCacheName(), key, val );
ce.setElementAttributes( attrE );
if ( log.isDebugEnabled() )
{
log.debug( "putGAN( gan,val,attr,boolean invocation) > updating group attribute via super" );
}
// SEND THE ELEMENT IF THE INVOCATION WAS LOCAL
// decide what to do with this item
boolean updateRemote = false;
if ( invocation == ICache.LOCAL_INVOKATION )
{
updateRemote = ICache.INCLUDE_REMOTE_CACHE;
}
else
{
updateRemote = ICache.EXCLUDE_REMOTE_CACHE;
}
super.update( ce, updateRemote );
// UPDATE THE ATTRIBUTENAME LIST, get it first
GroupId groupId = new GroupId( this.getCacheName(), key.groupId );
HashSet attrNameSet = null;
attrNameSet = ( HashSet ) systemGroupIdCache.get( groupId.key, false );
if ( attrNameSet == null )
{
attrNameSet = new HashSet();
}
attrNameSet.add( key.attrName );
if ( log.isDebugEnabled() )
{
log.debug( "putGAN( gan,val,attr,boolean invocation) > attrNameSet.size() = " + attrNameSet.size() );
}
CacheElement ceID = new CacheElement( this.getCacheName(), groupId.key, attrNameSet );
ceID.setElementAttributes( attrE );
// DO NOT SEND THE UPDATE LIST REMOTELY
// THE ELEMENT WILL BE SENT AND THE LIST MAINTAINED REMOTELY
systemGroupIdCache.updateExclude( ceID, EXCLUDE_REMOTE_CACHE );
// could use the updateGroupAttr method?