BufferObjectDataOutput pop() { BufferObjectDataOutput out = outputPool.poll(); if (out == null) { out = inputOutputFactory.createOutput(outputBufferSize, this); } return out; }
public void destroy() { active = false; for (SerializerAdapter serializer : typeMap.values()) { serializer.destroy(); } typeMap.clear(); idMap.clear(); global.set(null); constantTypesMap.clear(); for (BufferObjectDataOutput output : outputPool) { IOUtil.closeResource(output); } outputPool.clear(); }
void push(BufferObjectDataOutput out) { if (out != null) { out.clear(); outputPool.offer(out); } }