Package net.sf.ehcache

Examples of net.sf.ehcache.Element


         * candidate id is an alias, if so we reject it since aliases should
         * not be returned.
         */
        if ( db.getAliasCache() != null )
        {
            Element element = db.getAliasCache().get( id );
           
            if ( element != null )
            {
                if ( element.getValue() != null )
                {
                    Dn dn = (Dn)element.getValue();
                   
                    return false;
                }
            }
        }
View Full Code Here


        Dn aliasedBase = null;


        if ( db.getAliasCache() != null )
        {
            Element aliasBaseElement = db.getAliasCache().get( baseId );

            if ( aliasBaseElement != null )
            {
                aliasedBase = (Dn)(aliasBaseElement).getObjectValue();
            }
View Full Code Here

                    if ( members != null )
                    {
                        Set<String> memberSet = new HashSet<String>( members.size() );
                        addMembers( memberSet, members );

                        Element cacheElement = new Element( groupDn.getNormName(), memberSet );
                        ehCache.put( cacheElement );
                    }
                    else
                    {
                        LOG.warn( "Found group '{}' without any member or uniqueMember attributes", groupDn.getName() );
View Full Code Here

        }

        Set<String> memberSet = new HashSet<String>( members.size() );
        addMembers( memberSet, members );

        Element cacheElement = new Element( name.getNormName(), memberSet );
        ehCache.put( cacheElement );

        if ( IS_DEBUG )
        {
            LOG.debug( "group cache contents after adding '{}' :\n {}", name.getName(),
View Full Code Here

        for ( Modification modification : mods )
        {
            if ( memberAttr.getOid() == modification.getAttribute().getId() )
            {
                Element memSetElement = ehCache.get( name.getNormName() );

                if ( memSetElement != null )
                {
                    Set<String> memberSet = ( Set<String> ) memSetElement.getValue();
                    modify( memberSet, modification.getOperation(), modification.getAttribute() );
                }

                break;
            }
View Full Code Here

        // read the explanation at the above DN_CACHE variable declaration
        // for the reason for performing this check
        if ( dnCache != null )
        {
            Element dnCacheEntry = dnCache.get( dn );

            if ( dnCacheEntry != null )
            {
                cachedDn = ( Dn ) dnCacheEntry.getObjectValue();
            }
        }

        if ( cachedDn == null )
        {
            LOG.debug( "Dn {} not found in the cache, creating", dn );

            cachedDn = new Dn( schemaManager, dn );

            if ( dnCache != null )
            {
                dnCache.put( new Element( dn, cachedDn ) );
            }

            if ( enableStats )
            {
                missCount++;
View Full Code Here

        if ( members == null )
        {
            return;
        }

        Element memSetElement = ehCache.get( name.getNormName() );

        if ( memSetElement != null )
        {
            Set<String> memberSet = ( Set<String> ) memSetElement.getValue();
            modify( memberSet, modOp, members );
        }

        if ( IS_DEBUG )
        {
View Full Code Here

        if ( principalDn.getNormName().equals( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED ) )
        {
            return true;
        }

        Element cacheElement = ehCache.get( administratorsGroupDn.getNormName() );

        if ( cacheElement == null )
        {
            LOG.warn( "What do you mean there is no administrators group? This is bad news." );
            return false;
        }
        else
        {
            Set<String> members = ( Set<String> ) cacheElement.getValue();
            return members.contains( principalDn.getNormName() );
        }
    }
View Full Code Here

        Set<Dn> memberGroups = null;

        for ( Object obj : ehCache.getKeys() )
        {
            String group = ( String ) obj;
            Element element = ehCache.get( group );

            if ( element == null )
            {
                continue;
            }

            Set<String> members = ( Set<String> ) element.getValue();

            if ( members == null )
            {
                continue;
            }
View Full Code Here

    }


    public boolean groupRenamed( Dn oldName, Dn newName )
    {
        Element membersElement = ehCache.get( oldName.getNormName() );

        if ( membersElement != null )
        {
            Set<String> members = ( Set<String> ) membersElement.getValue();

            ehCache.remove( oldName.getNormName() );

            Element cacheElement = new Element( newName.getNormName(), members );
            ehCache.put( cacheElement );

            if ( IS_DEBUG )
            {
                LOG.debug( "group cache contents after renaming '{}' :\n{}", oldName.getName(),
View Full Code Here

TOP

Related Classes of net.sf.ehcache.Element

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.