Package com.dotmarketing.business

Examples of com.dotmarketing.business.DotCacheAdministrator


    cache.put(getPrimaryGroup() + inode, fields,getPrimaryGroup());
        cache.put(getPrimaryGroup() + st.getVelocityVarName(), fields, getPrimaryGroup());
  }
   
    public static List<Field> getFieldsByStructureInode(String inode){
      DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
      List<Field> fields = null;
      try{
        fields = (List<Field>) cache.get(getPrimaryGroup() + inode, getPrimaryGroup());
      }catch (DotCacheException e) {
      Logger.debug(FieldsCache.class, "Cache Entry not found", e);
    }
        if (fields == null) {
            Structure st = StructureCache.getStructureByInode(inode);
View Full Code Here


     *
     *
     */
    @SuppressWarnings("unchecked")
  public static List<Field> getFieldsByStructureVariableName(String velocityVarName){
      DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
      List<Field> fields = null;
        try{
          fields = (List<Field>) cache.get(getPrimaryGroup() + velocityVarName, getPrimaryGroup());
        }catch (DotCacheException e) {
      Logger.debug(FieldsCache.class,"Cache Entry not found", e);
        }
        if (fields == null) {
          synchronized (velocityVarName.intern()){
                try{
                  fields = (List<Field>) cache.get(getPrimaryGroup() + velocityVarName, getPrimaryGroup());
                }catch (DotCacheException e) {
              Logger.debug(FieldsCache.class,"Cache Entry not found", e);
                }
            if(fields ==null){
                Structure st = StructureCache.getStructureByVelocityVarName(velocityVarName);
View Full Code Here

    /*public boolean hasFieldsByStructureInode (long inode) {
        return getFieldsByStructureInode(inode) != null;
    }*/
   
    public static void removeFields(Structure st){
      DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
        String inode = st.getInode();
        cache.remove(getPrimaryGroup() + inode, getPrimaryGroup());
        cache.remove(getPrimaryGroup() + st.getVelocityVarName(), getPrimaryGroup());
        cache.remove(getPrimaryGroup() + st.getVelocityVarName(), getPrimaryGroup());
        StructureCache.clearURLMasterPattern();
    }
View Full Code Here

        cache.remove(getPrimaryGroup() + st.getVelocityVarName(), getPrimaryGroup());
        StructureCache.clearURLMasterPattern();
    }

  public static void clearCache(){
    DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
      cache.flushGroup(getPrimaryGroup());
      StructureCache.clearURLMasterPattern();
  }
View Full Code Here

    public static String getFieldsVarGroup() {
      return "FieldsVarCache";
    }
   
    public static void addField(Field f){
      DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();   
    String inode = f.getInode();
    cache.put(getPrimaryGroup() + inode, f, getPrimaryGroup());       
  }
View Full Code Here

    String inode = f.getInode();
    cache.put(getPrimaryGroup() + inode, f, getPrimaryGroup());       
  }
   
  public static Field getField(String id) {
    DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
      Field field = null;
      try{
        field = (Field) cache.get(getPrimaryGroup() + id, getPrimaryGroup());
      }catch (DotCacheException e) {
      Logger.debug(FieldsCache.class, "Cache Entry not found", e);
    }
        if (field == null) {
            field = FieldFactory.getFieldByInode(id);
View Full Code Here

        }
        return field;
  }
 
  public static void removeField(Field field) {
      DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
        String id = field.getInode();
        cache.remove(getPrimaryGroup() + id,getPrimaryGroup());
        removeFieldVariables(field);
    }
View Full Code Here

        cache.remove(getPrimaryGroup() + id,getPrimaryGroup());
        removeFieldVariables(field);
    }
   
  public static List<FieldVariable> getFieldVariables(Field field) {
      DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
        String key = getFieldsVarGroup() + field.getInode();
       
       
        try {
      return (List<FieldVariable>) cache.get(key,getFieldsVarGroup());
    } catch (DotCacheException e) {
      return null;
    }
    }
View Full Code Here

      return null;
    }
    }
   
  public static void addFieldVariables(Field field, List<FieldVariable> vars) {
      DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
        String key = getFieldsVarGroup() + field.getInode();
        cache.put(key, vars, getFieldsVarGroup());

    }
View Full Code Here

    }
 
 
  public static void removeFieldVariables(Field field) {
      DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
        String key = getFieldsVarGroup() + field.getInode();

    cache.remove(key,getFieldsVarGroup());

    }
View Full Code Here

TOP

Related Classes of com.dotmarketing.business.DotCacheAdministrator

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.