public void flush() throws IOException { int chunk_number=getChunkNumber(); String key=name + ".#" + chunk_number; byte[] val=new byte[local_index]; System.arraycopy(current_buffer, 0, val, 0, local_index); cache.put(key, val, repl_count, 0); if(log.isTraceEnabled()) log.trace("put(): index=" + index + ", key=" + key + ": " + val.length + " bytes"); file.setLength(index); }
public void flush() throws IOException { int chunk_number=getChunkNumber(); String key=name + ".#" + chunk_number; byte[] val=new byte[local_index]; System.arraycopy(current_buffer, 0, val, 0, local_index); cache.put(key, val, repl_count, 0); if(log.isTraceEnabled()) log.trace("put(): index=" + index + ", key=" + key + ": " + val.length + " bytes"); file.setLength(index); }