Package railo.runtime.cache.util

Examples of railo.runtime.cache.util.WildCardFilter


 
  public static Array call(PageContext pc, String filter, String cacheName) throws PageException {
    try {
      Cache cache = Util.getCache(pc,cacheName,ConfigImpl.CACHE_DEFAULT_OBJECT);
     
      List<String> keys = isFilter(filter)?cache.keys(new WildCardFilter(filter,true)):cache.keys();
      Iterator<String> it = keys.iterator();
      Array arr = new ArrayImpl();
      while(it.hasNext()){
        arr.append(it.next());
      }
View Full Code Here


  }
 
  public static Struct call(PageContext pc,String filter, String cacheName) throws PageException {
    try {
      Cache cache = Util.getCache(pc,cacheName,ConfigImpl.CACHE_DEFAULT_OBJECT);
      List<CacheEntry> entries = CacheGetAllIds.isFilter(filter)?cache.entries(new WildCardFilter(filter,true)):cache.entries();
      Iterator<CacheEntry> it=entries.iterator();
      Struct sct = new StructImpl();
      CacheEntry entry;
      while(it.hasNext()){
        entry= it.next();
View Full Code Here

  }
  public static double call(PageContext pc,String strFilter, String cacheName) throws PageException {
    try {
      CacheKeyFilter f=filter;
      if(CacheGetAllIds.isFilter(strFilter))
        f=new WildCardFilter(strFilter,true);
      return Util.getCache(pc,cacheName,ConfigImpl.CACHE_DEFAULT_OBJECT).remove(f);
    } catch (Exception e) {
      throw Caster.toPageException(e);
    }
  }
View Full Code Here

    return cache.contains(key);
  }

  public int flush(String key, String filter) throws MalformedPatternException, IOException {
    if(!Util.isEmpty(key)) return cache.remove(key)?1:0;
    if(!Util.isEmpty(filter)) return cache.remove(new WildCardFilter(filter,false));
    return cache.remove(CacheKeyFilterAll.getInstance());
  }
View Full Code Here

  public Array keys(String filter) {
    try {
      List keys;
      if(Util.isEmpty(filter)) keys=cache.keys();
      else keys=cache.keys(new WildCardFilter(filter,false));
      return Caster.toArray(keys);
    }
    catch (Exception e) {}
    return new ArrayImpl();
  }
View Full Code Here

   
    Struct sct=new StructImpl();
    try {
      List entries;
      if(Util.isEmpty(filter)) entries=cache.entries();
      else entries=cache.entries(new WildCardFilter(filter,false));
     
      Iterator it = entries.iterator();
      CacheEntry entry;
      while(it.hasNext()){
        entry=(CacheEntry) it.next();
View Full Code Here

  public static void _flushAll(PageContext pc, Cache cache) throws IOException {
    cache.remove(CacheKeyFilterAll.getInstance());
  }

  public static void _flush(PageContext pc, Cache cache, String expireurl) throws MalformedPatternException, IOException {
    cache.remove(new WildCardFilter(expireurl,true));
  }
View Full Code Here

TOP

Related Classes of railo.runtime.cache.util.WildCardFilter

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.