Examples of CacheEntry


Examples of org.apache.hadoop.oncrpc.RpcCallCache.CacheEntry

    }
   
    // Check for duplicate requests in the cache for non-idempotent requests
    boolean idempotent = rpcCallCache != null && !isIdempotent(rpcCall);
    if (idempotent) {
      CacheEntry entry = rpcCallCache.checkOrAddToCache(client, rpcCall.getXid());
      if (entry != null) { // in ache
        if (entry.isCompleted()) {
          LOG.info("Sending the cached reply to retransmitted request "
              + rpcCall.getXid());
          return entry.getResponse();
        } else { // else request is in progress
          LOG.info("Retransmitted request, transaction still in progress "
              + rpcCall.getXid());
          // TODO: ignore the request?
        }
View Full Code Here

Examples of org.apache.lucene.search.FieldCache.CacheEntry

    // any keys that we know result in more then one valId
    final Set<ReaderField> valMismatchKeys = new HashSet<ReaderField>();

    // iterate over all the cacheEntries to get the mappings we'll need
    for (int i = 0; i < cacheEntries.length; i++) {
      final CacheEntry item = cacheEntries[i];
      final Object val = item.getValue();

      if (val instanceof FieldCache.CreationPlaceholder)
        continue;

      final ReaderField rf = new ReaderField(item.getReaderKey(),
                                            item.getFieldName());

      final Integer valId = Integer.valueOf(System.identityHashCode(val));

      // indirect mapping, so the MapOfSet will dedup identical valIds for us
      valIdToItems.put(valId, item);
View Full Code Here

Examples of org.apache.lucene.search.FieldCache.CacheEntry

  public NamedList getStatistics() {
    NamedList stats = new SimpleOrderedMap();
    CacheEntry[] entries = FieldCache.DEFAULT.getCacheEntries();
    stats.add("entries_count", entries.length);
    for (int i = 0; i < entries.length; i++) {
      CacheEntry e = entries[i];
      stats.add("entry#" + i, e.toString());
    }

    Insanity[] insanity = checker.check(entries);

    stats.add("insanity_count", insanity.length);
View Full Code Here

Examples of org.apache.marmotta.ldcache.model.CacheEntry

    public CacheEntry getEntry(URI resource) {
        try {
            try(LDCachingKiWiPersistenceConnection dbcon = persistence.getConnection()) {

                // load cache entry from database
                CacheEntry ce = dbcon.getCacheEntry(resource.stringValue());

                // if entry exists, load triples for the resource from the cache context of the repository
                if(ce != null) {
                    SailConnection con = store.getConnection();
                    try {
                        con.begin();

                        Model triples = new TreeModel();
                        ModelCommons.add(triples,con.getStatements(resource,null,null,true,store.getValueFactory().createURI(cacheContext)));
                        ce.setTriples(triples);

                        con.commit();
                    } catch(SailException ex) {
                        con.rollback();
                    } finally {
View Full Code Here

Examples of org.apache.naming.resources.CacheEntry

        // (the "toUpperCase()" avoids problems on Windows systems)
        if (path.toUpperCase().startsWith("/WEB-INF") ||
            path.toUpperCase().startsWith("/META-INF"))
            return;

        CacheEntry cacheEntry = resources.lookupCache(path);

        generatedXML.writeElement(null, "response", XMLWriter.OPENING);
        String status = new String("HTTP/1.1 " + WebdavStatus.SC_OK + " "
                                   + WebdavStatus.getStatusText
                                   (WebdavStatus.SC_OK));
View Full Code Here

Examples of org.apache.naming.resources.CacheEntry

            else
                log("DefaultServlet.serveResource:  Serving resource '" +
                    path + "' headers only");
        }

        CacheEntry cacheEntry = resources.lookupCache(path);

        if (!cacheEntry.exists) {
            // Check if we're included so we can return the appropriate
            // missing resource name in the error
            String requestUri = (String) request.getAttribute(
View Full Code Here

Examples of org.apache.naming.resources.CacheEntry

                if (trimmed.equalsIgnoreCase("WEB-INF") ||
                    trimmed.equalsIgnoreCase("META-INF") ||
                    trimmed.equalsIgnoreCase(localXsltFile))
                    continue;

                CacheEntry childCacheEntry =
                    resources.lookupCache(cacheEntry.name + resourceName);
                if (!childCacheEntry.exists) {
                    continue;
                }
View Full Code Here

Examples of org.apache.naming.resources.CacheEntry

                String trimmed = resourceName/*.substring(trim)*/;
                if (trimmed.equalsIgnoreCase("WEB-INF") ||
                    trimmed.equalsIgnoreCase("META-INF"))
                    continue;

                CacheEntry childCacheEntry =
                    resources.lookupCache(cacheEntry.name + resourceName);
                if (!childCacheEntry.exists) {
                    continue;
                }

View Full Code Here

Examples of org.apache.naming.resources.CacheEntry

        // Exclude any resource in the /WEB-INF and /META-INF subdirectories
        if (isSpecialPath(path))
            return;

        CacheEntry cacheEntry = resources.lookupCache(path);
        if (!cacheEntry.exists) {
          // File is in directory listing but doesn't appear to exist
          // Broken symlink or odd permission settings?
          return;
        }
View Full Code Here

Examples of org.apache.naming.resources.CacheEntry

            else
                log("DefaultServlet.serveResource:  Serving resource '" +
                    path + "' headers only");
        }

        CacheEntry cacheEntry = resources.lookupCache(path);

        if (!cacheEntry.exists) {
            // Check if we're included so we can return the appropriate
            // missing resource name in the error
            String requestUri = (String) request.getAttribute(
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.