Mercurial Hosting > luan
comparison src/luan/modules/ThreadLuan.java @ 814:95cbe23a96fb
minor
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 09 Sep 2016 10:37:37 -0600 |
parents | f16c77ef0f4f |
children | 0d884377e923 |
comparison
equal
deleted
inserted
replaced
813:f8f7cb485c25 | 814:95cbe23a96fb |
---|---|
82 } | 82 } |
83 } | 83 } |
84 | 84 |
85 public long timeout = 60000L; // one minute | 85 public long timeout = 60000L; // one minute |
86 private Map<String,Value> map = new LinkedHashMap<String,Value>() { | 86 private Map<String,Value> map = new LinkedHashMap<String,Value>() { |
87 protected boolean removeEldestEntry(Map.Entry<String,Value> eldest) { | 87 @Override protected boolean removeEldestEntry(Map.Entry<String,Value> eldest) { |
88 return eldest.getValue().time < System.currentTimeMillis() - timeout; | 88 return eldest.getValue().time < System.currentTimeMillis() - timeout; |
89 } | 89 } |
90 }; | 90 }; |
91 | 91 |
92 public synchronized String get(String key) { | 92 public synchronized String get(String key) { |