// update the attribute name set.
// Note: necessary to use super.get to avoid read lock within the current write lock.
GroupId groupId = new GroupId( this.getCacheName(), key.groupId );
HashSet attrNameSet = null;
CacheElement ce = null;
try
{
ce = ( CacheElement ) systemGroupIdCache.get( groupId.key, true, invocation );
}
catch ( IOException ioe )
{
}
// IF THE NAME SET IS FOUND
// TODO: move -- INITIAL INSERTION IS CURRENTLY DONE BY THE PUT
if ( ce != null )
{
attrNameSet = ( HashSet ) ce.val;
// HANDLE NON REMOVAL SCENARIOS
if ( attrNameSet != null || !remove )
{
// THE GROUP HAS BEEN CREATED BUT NOTHING IS IN IT
if ( attrNameSet == null )
{
attrNameSet = new HashSet();
}
if ( remove )
{
attrNameSet.remove( key.attrName );
}
else
{
attrNameSet.add( key.attrName );
}
if ( attrNameSet.size() > 0 )
{
// update the changed name set.
try
{
CacheElement ceID = new CacheElement( this.getCacheName(), groupId.key, attrNameSet );
ceID.setElementAttributes( ce.attr );
if ( log.isDebugEnabled() )
{
log.debug( "updateGroupAttrNameSet((groupAttrname)key,invocation,remove) > calling systemGroupIdCache.update( ceID, EXCLUDE_REMOTE_CACHE )" );
}
// ALWAYS EXCLUDE THE REMOTE CACHE