Package org.javasimon

Examples of org.javasimon.Split.stop()


      if (entry.expired()) {
        remove(entry.key);
      }
    }
   
    split.stop();
 
 
  private void moveEntriesOffHeap(int entries2move) {
    if (entries2move < 1) return;
   
View Full Code Here


        Stopwatch stopWatch = SimonManager.getStopwatch("detail.disposeHeapOverflow");
    Split split = stopWatch.start();
   
    moveEntriesOffHeap(lruQueue.size() - entriesLimit);

    split.stop();
  }
 
  public void disposeOffHeapOverflow() {
        Stopwatch stopWatch = SimonManager.getStopwatch("detail.disposeOffHeapOverflow");
    Split split = stopWatch.start();
View Full Code Here

    Split split = stopWatch.start();
    int bytes2free = usedMemory.get()-(pageSize*pages);
   
    moveEntriesToDisk(bytes2free);
   
    split.stop();
  }
   
  private void moveEntriesToDisk(int bytes2free) {
    int freedBytes = 0;
    while (freedBytes < bytes2free) {
View Full Code Here

 
  public void askSupervisorForDisposal() {
        Stopwatch stopWatch = SimonManager.getStopwatch("detail.disposeOverflow");
    Split split = stopWatch.start();
    supervisor.disposeOverflow(this);
    split.stop();
  }
 

 
//  protected void moveOffheap(CacheEntry entry) {
View Full Code Here

      e.printStackTrace();
    } catch (IllegalAccessException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    split.stop();
  }
 
//  private CacheEntry forceRoomFor(CacheEntry entry) {
//        Stopwatch stopWatch = SimonManager.getStopwatch("detail.forceMakeRoomFor");
//    Split split = stopWatch.start();
View Full Code Here

    entry.key = key;
    entry.object = object;
    entries.put(key, entry);
    lruQueue.add(entry);
    askSupervisorForDisposal();
    split.stop();
    return entry;
  }
 
  public CacheEntry getEntry(String key) {
    CacheEntry entry = entries.get(key);
View Full Code Here

  public Object get(String key) {
        Stopwatch stopWatch = SimonManager.getStopwatch("cache.get");
    Split split = stopWatch.start();
    CacheEntry entry = getEntry(key);
    askSupervisorForDisposal();
    split.stop();
    if (entry == null) {
      return null;
    } else {
      return entry.object;
    }
View Full Code Here

      lruOffheapQueue.remove(entry);
      slots.add(entry);
      logger.debug("added slot of " + entry.size + " bytes");
    }
    askSupervisorForDisposal();
    split.stop();
    return entry;
  }
 
  public CacheEntry removeLast() {
        Stopwatch stopWatch = SimonManager.getStopwatch("detail.removelast");
View Full Code Here

  public CacheEntry removeLast() {
        Stopwatch stopWatch = SimonManager.getStopwatch("detail.removelast");
    Split split = stopWatch.start();
    CacheEntry next = lruQueue.peek();
    if (next.size > slots.last().size) {
      split.stop();
      return null;
    }
    CacheEntry last = lruQueue.poll();
    entries.remove(last.key);
    split.stop();
View Full Code Here

      split.stop();
      return null;
    }
    CacheEntry last = lruQueue.poll();
    entries.remove(last.key);
    split.stop();
    return last;
  }
 
  public CacheEntry removeLastOffHeap() {
        Stopwatch stopWatch = SimonManager.getStopwatch("detail.removelastoffheap");
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.