Package net.sf.ehcache

Examples of net.sf.ehcache.Element


        if ( entryCache == null )
        {
            return null;
        }

        Element el = entryCache.get( id );

        if ( el != null )
        {
            return ( Entry ) el.getValue();
        }

        return null;
    }
View Full Code Here


        if ( entry instanceof ClonedServerEntry )
        {
            entry = ( ( ClonedServerEntry ) entry ).getOriginalEntry();
        }

        entryCache.put( new Element( id, entry ) );
    }
View Full Code Here

                if ( entry instanceof ClonedServerEntry )
                {
                    entry = ( ( ClonedServerEntry ) entry ).getOriginalEntry();
                }

                entryCache.replace( new Element( id, entry ) );
            }
            else if ( ( opCtx instanceof MoveOperationContext ) ||
                ( opCtx instanceof MoveAndRenameOperationContext ) ||
                ( opCtx instanceof RenameOperationContext ) )
            {
View Full Code Here

    {
      if (key == null)
        return null;
      else
      {
        Element element = cache.get(key);
        if (element != null)
          return element.getObjectValue();
      }
      return null;
    }
    catch (net.sf.ehcache.CacheException e)
    {
View Full Code Here

   */
  public void put(Object key, Object value) throws CacheException
  {
    try
    {
      Element element = new Element(key, value);
      cache.put(element);
    }
    catch (IllegalArgumentException e)
    {
      throw new CacheException(e);
View Full Code Here

        this.cacheEventListenersMap = new HashMap<JetspeedCacheEventListener, CacheEventListener>();
     }

    public CacheElement get(Object key)
    {
        Element element = ehcache.get(key);
        if (element == null)
            return null;
        return new EhCacheElementImpl(element);
    }
View Full Code Here

      }
    }

    public boolean remove(Object key)
    {
        Element element = ehcache.get(key);
        if (element == null)
            return false;
        boolean isRemoved = ehcache.remove(key);
        return isRemoved;
    }
View Full Code Here

        return isRemoved;
    }
   
    public boolean removeQuiet(Object key)
    {
        Element element = ehcache.get(key);
        if (element == null)
            return false;
        return ehcache.removeQuiet(key);
    }  
View Full Code Here

        if ( key == null )
        {
            return null;
        }

        Element elem = ehcache.get( key );
        if ( elem == null )
        {
            return null;
        }
        return (T) elem.getObjectValue();
    }
View Full Code Here

        return overflowToDisk;
    }

    public void register( V key, T value )
    {
        ehcache.put( new Element( key, value ) );
    }
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.