Package com.opensymphony.oscache.base

Examples of com.opensymphony.oscache.base.CacheEntry


                /** OpenSymphony BEGIN */
                if (!unlimitedDiskCache && !overflowPersistence) {
                    persistRemove(e.key);
                    // If we have a CacheEntry, update the groups
                    if (oldValue instanceof CacheEntry) {
                      CacheEntry oldEntry = (CacheEntry)oldValue;
                      removeGroupMappings(oldEntry.getKey(),
                          oldEntry.getGroups(), true);
                }
                } else {
                  // only remove from memory groups
                  if (oldValue instanceof CacheEntry) {
                    CacheEntry oldEntry = (CacheEntry)oldValue;
                    removeGroupMappings(oldEntry.getKey(),
                        oldEntry.getGroups(), false);
                  }
                }

                if (overflowPersistence && ((size() + 1) >= maxEntries)) {
                    persistStore(key, oldValue);
                    // add key to persistent groups but NOT to the memory groups
                    if (oldValue instanceof CacheEntry) {
                      CacheEntry oldEntry = (CacheEntry)oldValue;
                      addGroupMappings(oldEntry.getKey(), oldEntry.getGroups(), true, false);
                    }
                }

                if (invokeAlgorithm) {
                    itemRemoved(key);
View Full Code Here


                    /** OpenSymphony BEGIN */
                    if (forcePersist || (!unlimitedDiskCache && !overflowPersistence)) {
                        persistRemove(e.key);
                        // If we have a CacheEntry, update the group lookups
                        if (oldValue instanceof CacheEntry) {
                          CacheEntry oldEntry = (CacheEntry) oldValue;
                            removeGroupMappings(oldEntry.getKey(),
                                oldEntry.getGroups(), true);
                        }
                    } else {
            // only remove from memory groups
            if (oldValue instanceof CacheEntry) {
              CacheEntry oldEntry = (CacheEntry) oldValue;
              removeGroupMappings(oldEntry.getKey(), oldEntry
                  .getGroups(), false);
            }
                    }

                    if (!forcePersist && overflowPersistence && ((size() + 1) >= maxEntries)) {
                        persistStore(key, oldValue);
                        // add key to persistent groups but NOT to the memory groups
                        if (oldValue instanceof CacheEntry) {
                          CacheEntry oldEntry = (CacheEntry) oldValue;
                          addGroupMappings(oldEntry.getKey(), oldEntry.getGroups(), true, false);
                        }
                    }

                    if (invokeAlgorithm) {
                        itemRemoved(key);
                    }

                    // introduced to fix bug CACHE-255
                    if (oldValue instanceof CacheEntry) {
                      CacheEntry oldEntry = (CacheEntry) oldValue;
                      oldValue = oldEntry.getContent();
                    }

                    /** OpenSymphony END */
                    Entry head = e.next;

View Full Code Here

                if( log.isDebugEnabled() )
                {
                    log.debug( "attachment cache entry removed: " + aEvent.getKey() );
                }
               
                CacheEntry e = aEvent.getEntry();
               
                if( e != null )
                {
                    Attachment item = (Attachment) e.getContent();

                    if( item != null )
                    {
                        m_allItems.remove( item.getName() );
                    }
View Full Code Here

                if( log.isDebugEnabled() )
                {
                    log.debug( "attachment cache entry removed: " + aEvent.getKey() );
                }
               
                CacheEntry e = aEvent.getEntry();
               
                if( e != null )
                {
                    Attachment item = (Attachment) e.getContent();

                    if( item != null )
                    {
                        m_allItems.remove( item.getName() );
                    }
View Full Code Here

                if( log.isDebugEnabled() )
                {
                    log.debug( "attachment cache entry removed: " + aEvent.getKey() );
                }
               
                CacheEntry e = aEvent.getEntry();
               
                if( e != null )
                {
                    Attachment item = (Attachment) e.getContent();

                    if( item != null )
                    {
                        m_allItems.remove( item.getName() );
                    }
View Full Code Here

          {
            this.cacheMap = ((GeneralCacheAdministrator)this.cache).getCache().cacheMap;
          }
        }
     
      CacheEntry ce = null;

      Iterator ceIterator = ((GeneralCacheAdministrator)cache).getCache().cacheMap.values().iterator();
      while(ceIterator.hasNext())
      {
        ce = (CacheEntry)ceIterator.next();
        if(ce.getKey().equals(this.cacheKey))
        {
          break;
        }
      }
      getResponse().setContentType("text/plain");

      StringBuilder sb = new StringBuilder();
     
      if(ce != null && ce.getGroups() != null)
      {
        List<String> groups = new ArrayList<String>();
        groups.addAll(ce.getGroups());
        Collections.sort(groups);
        for(Object group : groups)
        {
          sb.append("" + group + "\n");
        }
View Full Code Here

TOP

Related Classes of com.opensymphony.oscache.base.CacheEntry

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.