Package org.exolab.castor.jdo

Examples of org.exolab.castor.jdo.CacheManager


    private void expire(final boolean byType) {
        log("expiring cache...");

        Object[] identityArray = null;
        try {
            CacheManager cacheManager = _db.getCacheManager();
            if (byType) {
                Class[] typeArray = new Class[2];
                typeArray[0] = ManyGroup.class;
                typeArray[1] = ManyPerson.class;
                cacheManager.expireCache(typeArray);
            } else {
                identityArray = new Object[4];
                identityArray[0] = new Integer(_groupAId);
                identityArray[1] = new Integer(_groupBId);
                identityArray[2] = new Integer(_groupCId);
                identityArray[3] = new Integer(_groupDId);
                cacheManager.expireCache(ManyGroup.class, identityArray);
            }
        } catch (Exception e) {
            log("expireCache: exception encountered clearing cache: " + e.getMessage());
        }
    }
View Full Code Here


    /**
     * {@inheritDoc}
     */
    public CacheManager getCacheManager() {
        if (_cacheManager == null) {
            _cacheManager = new CacheManager(this, _ctx, getLockEngine());
        }
        return _cacheManager;
    }
View Full Code Here

     */
    private void expire(final boolean byType) {
        LOG.info("expiring cache...");

        try {
            CacheManager cacheManager = _db.getCacheManager();
            if (byType) {
                Class[] typeArray = new Class[5];
                typeArray[0] = LazyContract.class;
                typeArray[1] = LazyContractCategory.class;
                typeArray[2] = LazyPayRoll.class;
                typeArray[3] = LazyAddress.class;
                typeArray[4] = LazyEmployee.class;
                cacheManager.expireCache(typeArray);
            } else {
                Object[] identityArray = new Object[1];
                identityArray[0] = new Identity("First", "Person");
                cacheManager.expireCache(LazyEmployee.class, identityArray);
            }
        } catch (Exception e) {
            LOG.error("expireCache: exception encountered clearing cache", e);
        }
    }
View Full Code Here

    try
    {
        Class[] types = {c};
      Class[] ids = {null};
      CacheManager manager = db.getCacheManager();
      manager.expireCache(types);
      //db.expireCache(types, null);
    }
    catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here

    Database db = CastorDatabaseService.getDatabase();

    try
    {
      CacheManager manager = db.getCacheManager();
      manager.expireCache(c, id);
     
    }
    catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here

        logger.info("Skipping clear of " + type);
      }
      else
      {
        logger.info("Clearing " + type);
          CacheManager manager = db.getCacheManager();
          manager.expireCache(type, ids);
          //Class[] types = {type};
          //db.expireCache(types, ids);
      }
     
        if(type.getName().equalsIgnoreCase(SmallContentImpl.class.getName()) ||
View Full Code Here

      logger.info("Skipping clear of " + type);
    }
    else
    {
      logger.info("Clearing for real: " + type);
        CacheManager manager = db.getCacheManager();
        manager.expireCache(type, ids);
        //Class[] types = {type};
        //db.expireCache(types, ids);
    }
   
      if(type.getName().equalsIgnoreCase(SmallContentImpl.class.getName()) ||
View Full Code Here

    }
    else
    {
      logger.info("Clearing for real: " + c);
      Class[] types = {c};
      CacheManager manager = db.getCacheManager();
      manager.expireCache(types);
      //db.expireCache(types, null);
    }
   
      if(c.getName().equalsIgnoreCase(SmallContentImpl.class.getName()) ||
        c.getName().equalsIgnoreCase(SmallishContentImpl.class.getName()) ||
View Full Code Here

    try
    {
        Class[] types = {c};
      Class[] ids = {null};
      CacheManager manager = db.getCacheManager();
      manager.expireCache(types);
      //db.expireCache(types, null);
    }
    catch(Exception e)
    {
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of org.exolab.castor.jdo.CacheManager

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.