public synchronized void cache(int hash, String value) { entries.put(hash, value); if (entries.size() > limit){ entries.removeFirst(); } } }
private void check() { while (headers.size() >= conf._compress_dailycount_header_cache_size - 1) { try { headers.removeFirst().close(); } catch (Exception e) { } } } public CountBoard getCountBoard(String date) {
public void flush() { if (writingBlockTable.size() == 0) return; LinkedMap<String, Block> blocks = writingBlockTable; writingBlockTable = new LinkedMap(); while (blocks.size() > 0) { Block bk = blocks.removeFirst(); IOChannel.getInstance().store(bk); } } public void shutdown() {
if (bk != null) { while (writingBlockTable.size() >= conf._compress_write_buffer_block_count) { Block bb = writingBlockTable.removeFirst(); IOChannel.getInstance().store(bb);
public synchronized void cache(int hash, String value) { entries.put(hash, value); if (entries.size() > limit){ entries.removeFirst(); } } }
private void check() { while (headers.size() >= conf._compress_dailycount_header_cache_size - 1) { try { headers.removeFirst().close(); } catch (Exception e) { } } } public CountBoard getCountBoard(String date) {
public void flush() { if (writingBlockTable.size() == 0) return; LinkedMap<String, Block> blocks = writingBlockTable; writingBlockTable = new LinkedMap(); while (blocks.size() > 0) { Block bk = blocks.removeFirst(); IOChannel.getInstance().store(bk); } } public void shutdown() {
if (bk != null) { while (writingBlockTable.size() >= conf._compress_write_buffer_block_count) { Block bb = writingBlockTable.removeFirst(); IOChannel.getInstance().store(bb);