Package org.apache.uima.aae

Examples of org.apache.uima.aae.InProcessCache$CacheEntry


    try {
      boolean cacheNotEmpty = true;
      boolean shownOnce = false;
      final Object localMux = new Object();
      while (cacheNotEmpty) {
        InProcessCache cache = getInProcessCache();
        if (!shownOnce) {
          shownOnce = true;
          cache.dumpContents(getComponentName());
        }

        if (cache.isEmpty()) {
          cacheNotEmpty = false;
        } else {
          synchronized (localMux) {
            localMux.wait(10);
          }
View Full Code Here


    try {
      boolean cacheNotEmpty = true;
      boolean shownOnce = false;
      final Object localMux = new Object();
      while (cacheNotEmpty) {
        InProcessCache cache = getInProcessCache();
        if (!shownOnce) {
          shownOnce = true;
          cache.dumpContents(getComponentName());
        }

        if (cache.isEmpty()) {
          cacheNotEmpty = false;
        } else {
          synchronized (localMux) {
            localMux.wait(10);
          }
View Full Code Here

    try {
      boolean cacheNotEmpty = true;
      boolean shownOnce = false;
      final Object localMux = new Object();
      while (cacheNotEmpty) {
        InProcessCache cache = getInProcessCache();
        if (!shownOnce) {
          shownOnce = true;
          cache.dumpContents(getComponentName());
        }

        if (cache.isEmpty()) {
          cacheNotEmpty = false;
        } else {
          synchronized (localMux) {
            localMux.wait(10);
          }
View Full Code Here

    {
      boolean cacheNotEmpty = true;
      boolean shownOnce = false;
      while (cacheNotEmpty)
      {
        InProcessCache cache = getInProcessCache();
        if (!shownOnce)
        {
          shownOnce = true;
          cache.dumpContents();
        }

        if (cache.isEmpty())
        {
          cacheNotEmpty = false;
        }
        else
        {
          synchronized (cache)
          {
            cache.wait(10);
          }
        }
      }
    }
    catch ( Exception e)
View Full Code Here

      // post-processing CAS.
      if ( !endpoint.getServerURI().startsWith("vm:"))
      {
        // Message was fully processed, remove state info related to the
        // previous CAS from the cache
        InProcessCache cache = getInProcessCache();
       
        dropCAS(aCasReferenceId, true);
      }
    }
  }
View Full Code Here

    try {
      boolean cacheNotEmpty = true;
      boolean shownOnce = false;
      final Object localMux = new Object();
      while (cacheNotEmpty) {
        InProcessCache cache = getInProcessCache();
        if (!shownOnce) {
          shownOnce = true;
          cache.dumpContents(getComponentName());
        }

        if (cache.isEmpty()) {
          cacheNotEmpty = false;
        } else {
          synchronized (localMux) {
            localMux.wait(10);
          }
View Full Code Here

    if (delegateStatMap != null) {
      delegateStatMap.clear();
    }

    InProcessCache cache = getInProcessCache();
    if (cache != null) {
      cache.destroy();
    }
  }
View Full Code Here

    try {
      boolean cacheNotEmpty = true;
      boolean shownOnce = false;
      final Object localMux = new Object();
      while (cacheNotEmpty) {
        InProcessCache cache = getInProcessCache();
        if (!shownOnce) {
          shownOnce = true;
          cache.dumpContents(getComponentName());
        }

        if (cache.isEmpty()) {
          cacheNotEmpty = false;
        } else {
          synchronized (localMux) {
            localMux.wait(10);
          }
View Full Code Here

    if (delegateStatMap != null) {
      delegateStatMap.clear();
    }

    InProcessCache cache = getInProcessCache();
    if (cache != null) {
      cache.destroy();
    }
  }
View Full Code Here

*/
public class LeastRecentlyUsedEvictionAlgorithm implements EvictionAlgorithm {

    @SuppressWarnings("unchecked")
    public void evict(CacheImpl cache) {
        CacheEntry lruCacheEntry = null;
        for (Object o : cache.getAll()) {
            CacheEntry cacheEntry = (CacheEntry) o;
            if (lruCacheEntry == null) {
                lruCacheEntry = cacheEntry;
            } else if (lruCacheEntry.getLastAccessed() > cacheEntry.getLastAccessed()) {
                lruCacheEntry = cacheEntry;
            }
        }
        if (lruCacheEntry != null) {
            cache.evict(lruCacheEntry.getKey());
View Full Code Here

TOP

Related Classes of org.apache.uima.aae.InProcessCache$CacheEntry

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.