@Test public void testGet() throws Exception { System.out.println("get"); Assert.assertEquals("", FifoMap.getInstance().get("testget")); FifoMap.getInstance().put("testget", "testget"); FifoMap.getInstance().put("testget1", "testget1"); Assert.assertEquals("testget", FifoMap.getInstance().get("testget")); }
public Object get(String fifoName) { BlockingQueue<Object> fifo = getFifo(fifoName); Object value; value = fifo.peek(); return value == null ? "" : value; }
FifoMap extends ConcurrentHashMap<String, BlockingQueue<Object>> { public Object get(String fifoName) { BlockingQueue<Object> fifo = getFifo(fifoName); Object value; value = fifo.peek(); return value == null ? "" : value; } }
FifoMap extends ConcurrentHashMap<String, BlockingQueue<Object>> { public Object get(String fifoName) { BlockingQueue<Object> fifo = getFifo(fifoName); Object value; value = fifo.peek(); return value == null ? "" : value; } private  FifoMap(); }
FifoMap extends ConcurrentHashMap<String, BlockingQueue<Object>> { public Object get(String fifoName) { BlockingQueue<Object> fifo = getFifo(fifoName); Object value; value = fifo.peek(); return value == null ? "" : value; } private  FifoMap(); static FifoMap getInstance(); Object get(String fifoName); Object pop(String fifoName, long timeout); Object pop(String fifoName); int length(String fifoName); void put(String fifoName, Object v); }
FifoMap extends ConcurrentHashMap<String, BlockingQueue<Object>> { public Object get(String fifoName) { BlockingQueue<Object> fifo = getFifo(fifoName); Object value; value = fifo.peek(); return value == null ? "" : value; } private  FifoMap(); static FifoMap getInstance(); Object get(String fifoName); Object pop(String fifoName, long timeout); Object pop(String fifoName); int length(String fifoName); void put(String fifoName, Object v); static final String TIMEOUT_PROP; static final String CAPACITY_PROP; }