public final void releaseConcatBuffer(char[] buf) { if (buf != null) { if (buf != _concatCBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _concatCBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.CONCAT_BUFFER, buf); } }
public final void releaseTokenBuffer(char[] buf) { if (buf != null) { if (buf != _tokenCBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _tokenCBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.TOKEN_BUFFER, buf); } }
public final void releaseNameCopyBuffer(char[] buf) { if (buf != null) { if (buf != _nameCopyBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _nameCopyBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.NAME_COPY_BUFFER, buf); } } }
/** * Method called to indicate that the underlying buffers should now * be recycled if they haven't yet been recycled. Although caller * can still use this text buffer, it is not advisable to call this * method if that is likely, since next time a buffer is needed, * buffers need to reallocated. * Note: calling this method automatically also clears contents * of the buffer. */ public void releaseBuffers() { if (_allocator == null) { resetWithEmpty(); } else { if (_currentSegment != null) { // First, let's get rid of all but the largest char array resetWithEmpty(); // And then return that array char[] buf = _currentSegment; _currentSegment = null; _allocator.releaseCharBuffer(BufferRecycler.CharBufferType.TEXT_BUFFER, buf); } } }
public final void releaseNameCopyBuffer(char[] buf) { if (buf != null) { if (buf != _nameCopyBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _nameCopyBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.NAME_COPY_BUFFER, buf); } } }
public final void releaseTokenBuffer(char[] buf) { if (buf != null) { if (buf != _tokenCBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _tokenCBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.TOKEN_BUFFER, buf); } }
public final void releaseConcatBuffer(char[] buf) { if (buf != null) { if (buf != _concatCBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _concatCBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.CONCAT_BUFFER, buf); } }
/** * Method called to indicate that the underlying buffers should now * be recycled if they haven't yet been recycled. Although caller * can still use this text buffer, it is not advisable to call this * method if that is likely, since next time a buffer is needed, * buffers need to reallocated. * Note: calling this method automatically also clears contents * of the buffer. */ public void releaseBuffers() { if (_allocator == null) { resetWithEmpty(); } else { if (_currentSegment != null) { // First, let's get rid of all but the largest char array resetWithEmpty(); // And then return that array char[] buf = _currentSegment; _currentSegment = null; _allocator.releaseCharBuffer(BufferRecycler.CharBufferType.TEXT_BUFFER, buf); } } }
public void releaseTokenBuffer(char[] buf) { if (buf != null) { if (buf != _tokenBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _tokenBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.TOKEN_BUFFER, buf); } }
public final void releaseTokenBuffer(char[] buf) { if (buf != null) { if (buf != _tokenCBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _tokenCBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.TOKEN_BUFFER, buf); } }
public void releaseNameCopyBuffer(char[] buf) { if (buf != null) { if (buf != _nameCopyBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _nameCopyBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.NAME_COPY_BUFFER, buf); } } }
public final void releaseTokenBuffer(char[] buf) { if (buf != null) { if (buf != _tokenCBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _tokenCBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.TOKEN_BUFFER, buf); } }
public void releaseConcatBuffer(char[] buf) { if (buf != null) { if (buf != _concatBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _concatBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.CONCAT_BUFFER, buf); } }
public final void releaseConcatBuffer(char[] buf) { if (buf != null) { if (buf != _concatCBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _concatCBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.CONCAT_BUFFER, buf); } }
public final void releaseNameCopyBuffer(char[] buf) { if (buf != null) { if (buf != _nameCopyBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _nameCopyBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.NAME_COPY_BUFFER, buf); } } }
public final void releaseConcatBuffer(char[] buf) { if (buf != null) { if (buf != _concatCBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _concatCBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.CONCAT_BUFFER, buf); } }
public final void releaseNameCopyBuffer(char[] buf) { if (buf != null) { if (buf != _nameCopyBuffer) { throw new IllegalArgumentException("Trying to release buffer not owned by the context"); } _nameCopyBuffer = null; _bufferRecycler.releaseCharBuffer(BufferRecycler.CharBufferType.NAME_COPY_BUFFER, buf); } } }
/** * Method called to indicate that the underlying buffers should now * be recycled if they haven't yet been recycled. Although caller * can still use this text buffer, it is not advisable to call this * method if that is likely, since next time a buffer is needed, * buffers need to reallocated. * Note: calling this method automatically also clears contents * of the buffer. */ public void releaseBuffers() { if (_allocator != null && _currentSegment != null) { // First, let's get rid of all but the largest char array resetWithEmpty(); // And then return that array char[] buf = _currentSegment; _currentSegment = null; _allocator.releaseCharBuffer(BufferRecycler.CharBufferType.TEXT_BUFFER, buf); } }
/** * Method called to indicate that the underlying buffers should now * be recycled if they haven't yet been recycled. Although caller * can still use this text buffer, it is not advisable to call this * method if that is likely, since next time a buffer is needed, * buffers need to reallocated. * Note: calling this method automatically also clears contents * of the buffer. */ public void releaseBuffers() { if (_allocator == null) { resetWithEmpty(); } else { if (_currentSegment != null) { // First, let's get rid of all but the largest char array resetWithEmpty(); // And then return that array char[] buf = _currentSegment; _currentSegment = null; _allocator.releaseCharBuffer(BufferRecycler.CharBufferType.TEXT_BUFFER, buf); } } }
/** * Method called to indicate that the underlying buffers should now * be recycled if they haven't yet been recycled. Although caller * can still use this text buffer, it is not advisable to call this * method if that is likely, since next time a buffer is needed, * buffers need to reallocated. * Note: calling this method automatically also clears contents * of the buffer. */ public void releaseBuffers() { if (_allocator == null) { resetWithEmpty(); } else { if (_currentSegment != null) { // First, let's get rid of all but the largest char array resetWithEmpty(); // And then return that array char[] buf = _currentSegment; _currentSegment = null; _allocator.releaseCharBuffer(BufferRecycler.CharBufferType.TEXT_BUFFER, buf); } } }