Package com.dotcms.repackage.org.jboss.cache

Examples of com.dotcms.repackage.org.jboss.cache.Fqn


    Cache cache = getCache(group);


    if(isDiskCache(group)){
      try {
        diskCache.remove(new Fqn(group));
      } catch (Exception e) {
        Logger.debug(DotGuavaCacheAdministratorImpl.class,e.getMessage(),e);
      }
    }
    cache.invalidateAll();
View Full Code Here


    key = key.toLowerCase();
    group = group.toLowerCase();
    Object j = null;
    if(isDiskCache(group)){
      try {
        Map m=diskCache.get(new Fqn(group, key));
        if(m!=null){
          j = m.get(key);
          if(j != null){
            Cache cache = getCache(group);
            cache.put(key, j);
View Full Code Here

    Cache cache = getCache(group);
    cache.put(key, content);

    if(isDiskCache(group)){
      try {
        diskCache.put(new Fqn(group, key), key, content);
      } catch (Exception e) {
        Logger.debug(DotGuavaCacheAdministratorImpl.class,e.getMessage(),e);
      }
    }
  }
View Full Code Here

        if(isDiskCache(g)){
          try {
            if(!UtilMethods.isSet(key)){
              Logger.error(this.getClass(), "Empty key passed in, clearing group " + group + " by mistake");
            }
            diskCache.remove(new Fqn(g, k), k.toLowerCase());
          } catch (Exception e) {
            Logger.error(DotGuavaCacheAdministratorImpl.class,e.getMessage(),e);
          }
        }
           }
View Full Code Here

  public Map<Fqn, ReentrantReadWriteLock> locks = new ConcurrentHashMap<Fqn, ReentrantReadWriteLock>();
  public Map<Fqn, Integer> counts = new ConcurrentHashMap<Fqn, Integer>();

  public void acquireLock(Fqn fqn, boolean exclusive) {
    if (!isTopLevel(fqn)) {
      Fqn parentFqn = getParent(fqn);
      ReentrantReadWriteLock parentLock = getLock(parentFqn);
      parentLock.readLock().lock();
    }
    ReentrantReadWriteLock lock = getLock(fqn);
View Full Code Here

  }

  public void releaseLock(Fqn fqn) {
    if (!isTopLevel(fqn)) {
      Fqn parentFqn = getParent(fqn);
      ReentrantReadWriteLock parentLock = getLock(getParent(fqn));
      parentLock.readLock().unlock();
      remove(parentFqn);

    }
View Full Code Here

    Logger.info(this, "Temporarily disabling on disk cache");
    enabled=false;
    Thread t=new Thread() {
      public void run() {
        boolean done=false;
        Fqn fqn=Fqn.fromString("");
        while (!done) {
          try {
            Thread.sleep(120000);
          } catch (InterruptedException e) {
          }
View Full Code Here

  public Set<String> getKeys(String group) throws Exception {
      Set<String> keys=new HashSet<String>();
      Connection conn = null;
      PreparedStatement smt = null;
     
      for(int db : getDBNumbers(new Fqn(group))) {
          try {
              conn=createConnection(true,db);
              smt=conn.prepareStatement("SELECT CACHE_KEY FROM `"+group+"`");
              smt.setFetchSize(1000);
              ResultSet rs=smt.executeQuery();
              while(rs.next()) {
                  Fqn fqn=Fqn.fromString(rs.getString(1));
                  keys.add(fqn.getLastElementAsString());
              }
              rs.close();
          }
          catch(Exception ex) {
              throw new Exception("couldn't get keys on group "+group+" db number"+db,ex);
View Full Code Here

    return instance._getGroups();
  }
 
  private String _getGroupCount(String group){
    long ret = 0;
    Fqn fqn = Fqn.fromElements(new String[]{group});
    Connection conn = null;
    int[] dbs = getDBNumbers(fqn);
    for (int i : dbs) {
      try{
        try {
View Full Code Here

  /* (non-Javadoc)
   * @see com.dotmarketing.business.DotCacheAdministrator#get(java.lang.String)
   */
  public Object get(String key, String group) throws DotCacheException {
    group = group.toUpperCase();
    Fqn fqn = Fqn.fromElements(new String[]{group,key});
    Object j = cache.get(fqn, key);
    return j;
  }
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.jboss.cache.Fqn

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.