Examples of DiskCache


Examples of com.google.gwt.dev.util.DiskCache

    this.module = module;
    this.genDir = genDir;
    this.generatorResourcesDir = generatorResourcesDir;
    this.allGeneratedArtifacts = allGeneratedArtifacts;
    if (genDir == null && diskCache == null) {
      diskCache = new DiskCache();
    }
  }
View Full Code Here

Examples of com.google.gwt.dev.util.DiskCache

    types.add(new JClassType(SourceOrigin.UNKNOWN, typeName, false, true));
  }

  @Override
  public CachedCompilationUnit asCachedCompilationUnit() {
    DiskCache diskCache = DiskCache.INSTANCE;
    long astToken = diskCache.writeByteArray(Util.getBytes("Dummy AST data"));
    return new CachedCompilationUnit(this, astToken);
  }
View Full Code Here

Examples of com.google.gwt.dev.util.DiskCache

    this.module = module;
    this.genDir = genDir;
    this.generatorResourcesDir = generatorResourcesDir;
    this.allGeneratedArtifacts = allGeneratedArtifacts;
    if (genDir == null && diskCache == null) {
      diskCache = new DiskCache();
    }
  }
View Full Code Here

Examples of org.fjank.jcache.persistence.DiskCache

        if (parentCacheObject.contains(name)) {
            object = parentCacheObject.get(name);
        } else if (name instanceof Serializable) {
            //second, check the disk cache.
            try {
                DiskCache diskCache = CacheImpl.getCache().getDiskCache();
                if (diskCache != null) {
                    object = diskCache.getObject((Serializable) name);
                    if (object == null) {
                        return null;
                    }
                }
            } catch (DiskCacheException e) {
View Full Code Here

Examples of org.fjank.jcache.persistence.DiskCache

        CacheObject o = new CacheObject(name, object, objGr, region, CacheImpl.getCache().getReferenceQueue());
        o.setAttributes(attributes);
        int maxObjects = CacheImpl.getCache().getAttributes().getMaxObjects();
        int currentObjectCount = getCurrentObjectCount();
        if (currentObjectCount >= maxObjects) {
            DiskCache diskCache = CacheImpl.getCache().getDiskCache();
            if (diskCache == null) {
                //no disk, and memory is full.
                this.lastException = CacheFullException.class;
                this.lastMessage = "The maximum number of objects in the cache has been reached.";
                return false;
            }
            boolean updated = diskCache.update(o);
            if (!updated) {
                this.lastException = CacheFullException.class;
                this.lastMessage = "The maximum size for the diskCache has been reached.";
            }
            return updated;
        }
        if ((attributes != null) && (attributes.getSize() != 0)) {
            if ((region.getCurrentSize() + attributes.getSize()) > (CacheImpl.getCache().getAttributes().getMemoryCacheSize() * 1024 * 1024)) {
                DiskCache diskCache = CacheImpl.getCache().getDiskCache();
                if (diskCache == null) {
                    //no disk, and memory is full.
                    this.lastException = CacheFullException.class;
                    this.lastMessage = "The maximum size for the memory cache has been reached.";
                    return false;
                }
                boolean updated = diskCache.update(o);
                if (!updated) {
                    this.lastException = CacheFullException.class;
                    this.lastMessage = "The maximum size for the diskCache has been reached.";
                }
                return updated;
View Full Code Here

Examples of org.fjank.jcache.persistence.DiskCache

                this.attributes = attributes;
                attributes.registerCache(this);
                startServiceThreads();
                if (attributes.getDiskPath() != null) {
                     try {
                        diskCache = new DiskCache(attributes);
                    } catch (DiskCacheException e) {
                        throw new CacheNotAvailableException(e);
                    }
                }
                if (attributes.isDistributed()) {
View Full Code Here

Examples of org.python.pydev.core.cache.DiskCache

     * @throws MisconfigurationException
     */
    protected void init() throws MisconfigurationException {
        File persistingFolder = getCompleteIndexPersistingFolder();

        completeIndex = new DiskCache(persistingFolder, ".v1_indexcache", readFromFileMethod, toFileMethod);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.