Package org.apache.jcs.engine.control.group

Examples of org.apache.jcs.engine.control.group.GroupAttrName


    JcsCachingModel model = (JcsCachingModel) keyAndModel.model;

    String cacheName = model.getCacheName();
    CompositeCache cache = cacheManager.getCache(cacheName);
    GroupId groupId = new GroupId(cacheName, model.getGroup());
    GroupAttrName groupAttrName = new GroupAttrName(groupId, keyAndModel.key);
    return cache.get(groupAttrName);
  }
View Full Code Here


  public void testGetKeyWithGroupName() {
    cachingModel.setGroup("empire");
    Serializable key = "Vader";
    GroupId groupId = new GroupId(CACHE_NAME, cachingModel.getGroup());
    GroupAttrName expected = new GroupAttrName(groupId, key);
    Serializable actual = jcsFacade.getKey(key, cachingModel);
    assertEquals(expected, actual);
  }
View Full Code Here

    Serializable key = cacheEntry.key;
    String group = cacheEntry.group;

    if (StringUtils.hasText(group)) {
      GroupId groupId = new GroupId(CACHE_NAME, group);
      GroupAttrName groupAttrName = new GroupAttrName(groupId, key);
      key = groupAttrName;
    }

    ICacheElement cacheElement = new CacheElement(CACHE_NAME, key,
        cacheEntry.value);
View Full Code Here

    Serializable newKey = key;

    String group = model.getGroup();
    if (StringUtils.hasText(group)) {
      GroupId groupId = new GroupId(model.getCacheName(), group);
      newKey = new GroupAttrName(groupId, key);
    }

    return newKey;
  }
View Full Code Here

    }

    private GroupAttrName getGroupAttrName(String group, Object name)
    {
        GroupId gid = new GroupId(cacheControl.getCacheName(), group);
        return new GroupAttrName(gid, name);
    }
View Full Code Here

    }

    /** Description of the Method */
    public void remove( Object name, String group )
    {
        GroupAttrName key = getGroupAttrName( group, name );
        cacheControl.remove(key);           
    }
View Full Code Here

     * @return GroupAttrName
     */
    private GroupAttrName getGroupAttrName( String group, Object name )
    {
        GroupId gid = new GroupId( this.cacheControl.getCacheName(), group );
        return new GroupAttrName( gid, name );
    }
View Full Code Here

     * @param name
     * @param group
     */
    public void remove( Object name, String group )
    {
        GroupAttrName key = getGroupAttrName( group, name );
        this.cacheControl.remove( key );
    }
View Full Code Here

        // remove matches.
        Iterator itToRemove = itemsToRemove.iterator();
        while ( itToRemove.hasNext() )
        {
            GroupAttrName keyToRemove = (GroupAttrName) itToRemove.next();
            IndexedDiskElementDescriptor ded = (IndexedDiskElementDescriptor) keyHash.get( keyToRemove );
            addToRecycleBin( ded );
            performSingleKeyRemoval( keyToRemove );
            removed = true;
        }
View Full Code Here

                log.error( "key class=" + key.getClass() );
                log.error( "key hashcode=" + key.hashCode() );
                log.error( "key toString=" + key.toString() );
                if ( key instanceof GroupAttrName )
                {
                    GroupAttrName name = (GroupAttrName) key;
                    log.error( "GroupID hashcode=" + name.groupId.hashCode() );
                    log.error( "GroupID.class=" + name.groupId.getClass() );
                    log.error( "AttrName hashcode=" + name.attrName.hashCode() );
                    log.error( "AttrName.class=" + name.attrName.getClass() );
                }
View Full Code Here

TOP

Related Classes of org.apache.jcs.engine.control.group.GroupAttrName

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.