public void run() { readCache.setMaxRow(conf._compress_read_cache_block_count); } });
public static void main(String[] args) throws Exception { CacheTable t = new CacheTable().setDefaultKeepTime(1000).setMaxRow(100); for (int i = 0; i < 100; i++) { // if (i % 5 == 0) { // t.put(i, i, 10000); // } else { t.put(i, i); // } } Enumeration e = t.keys(); System.out.println(t.get(0)); System.out.println(t.get(10)); System.out.println(t.get(99)); Thread.sleep(2000); // t.clearExpiredItems(); System.out.println("----->" + t.size()); System.out.println(t.getFirstValue()); }
public static void main(String[] args) throws Exception { CacheTable t = new CacheTable().setDefaultKeepTime(1000).setMaxRow(100); for (int i = 0; i < 100; i++) { // if (i % 5 == 0) { // t.put(i, i, 10000); // } else { t.put(i, i); // } } Enumeration e = t.keys(); System.out.println(t.get(0)); System.out.println(t.get(10)); System.out.println(t.get(99)); Thread.sleep(2000); // t.clearExpiredItems(); System.out.println("----->" + t.size()); System.out.println(t.getFirstValue()); }
public static void main(String[] args) throws Exception { CacheTable t = new CacheTable().setDefaultKeepTime(1000).setMaxRow(100); for (int i = 0; i < 100; i++) { // if (i % 5 == 0) { // t.put(i, i, 10000); // } else { t.put(i, i); // } } Enumeration e = t.keys(); System.out.println(t.get(0)); System.out.println(t.get(10)); System.out.println(t.get(99)); Thread.sleep(2000); // t.clearExpiredItems(); System.out.println("----->" + t.size()); System.out.println(t.getFirstValue()); }
public static void main(String[] args) throws Exception { CacheTable t = new CacheTable().setDefaultKeepTime(1000).setMaxRow(100); for (int i = 0; i < 100; i++) { // if (i % 5 == 0) { // t.put(i, i, 10000); // } else { t.put(i, i); // } } Enumeration e = t.keys(); System.out.println(t.get(0)); System.out.println(t.get(10)); System.out.println(t.get(99)); Thread.sleep(2000); // t.clearExpiredItems(); System.out.println("----->" + t.size()); System.out.println(t.getFirstValue()); }
public static void main(String[] args) throws Exception { CacheTable t = new CacheTable().setDefaultKeepTime(1000).setMaxRow(100); for (int i = 0; i < 100; i++) { // if (i % 5 == 0) { // t.put(i, i, 10000); // } else { t.put(i, i); // } } Enumeration e = t.keys(); System.out.println(t.get(0)); System.out.println(t.get(10)); System.out.println(t.get(99)); Thread.sleep(2000); // t.clearExpiredItems(); System.out.println("----->" + t.size()); System.out.println(t.getFirstValue()); }
public void run() { readCache.setMaxRow(conf._compress_read_cache_block_count); } });
public static void main(String[] args) throws Exception { CacheTable t = new CacheTable().setDefaultKeepTime(1000).setMaxRow(100); for (int i = 0; i < 100; i++) { // if (i % 5 == 0) { // t.put(i, i, 10000); // } else { t.put(i, i); // } } Enumeration e = t.keys(); System.out.println(t.get(0)); System.out.println(t.get(10)); System.out.println(t.get(99)); Thread.sleep(2000); // t.clearExpiredItems(); System.out.println("----->" + t.size()); System.out.println(t.getFirstValue()); }
public static void main(String[] args) throws Exception { CacheTable t = new CacheTable().setDefaultKeepTime(1000).setMaxRow(100); for (int i = 0; i < 100; i++) { // if (i % 5 == 0) { // t.put(i, i, 10000); // } else { t.put(i, i); // } } Enumeration e = t.keys(); System.out.println(t.get(0)); System.out.println(t.get(10)); System.out.println(t.get(99)); Thread.sleep(2000); // t.clearExpiredItems(); System.out.println("----->" + t.size()); System.out.println(t.getFirstValue()); }
public static void main(String[] args) throws Exception { CacheTable t = new CacheTable().setDefaultKeepTime(1000).setMaxRow(100); for (int i = 0; i < 100; i++) { // if (i % 5 == 0) { // t.put(i, i, 10000); // } else { t.put(i, i); // } } Enumeration e = t.keys(); System.out.println(t.get(0)); System.out.println(t.get(10)); System.out.println(t.get(99)); Thread.sleep(2000); // t.clearExpiredItems(); System.out.println("----->" + t.size()); System.out.println(t.getFirstValue()); }