1 package org.shiftone.cache.policy.fifo; 2 3 4 5 import org.shiftone.cache.util.CacheNode; 6 import org.shiftone.cache.util.LinkedListNode; 7 8 9 16 class FifoNode implements CacheNode 17 { 18 19 Object key = null; 20 Object value = null; 21 LinkedListNode fifoNode = null; 22 long timeoutTime = 0; 23 24 public final boolean isExpired() 25 { 26 27 long timeToGo = timeoutTime - System.currentTimeMillis(); 28 29 return (timeToGo <= 0); 30 } 31 32 33 public final Object getValue() 34 { 35 return this.value; 36 } 37 38 39 public final void setValue(Object value) 40 { 41 this.value = value; 42 } 43 44 45 public String toString() 46 { 47 return "(fifo-" + String.valueOf(key) + ")"; 48 } 49 } 50 | Popular Tags |