本文整理了Java中org.glassfish.grizzly.Buffer.tryDispose()
方法的一些代码示例,展示了Buffer.tryDispose()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Buffer.tryDispose()
方法的具体详情如下:
包路径:org.glassfish.grizzly.Buffer
类名称:Buffer
方法名:tryDispose
[英]Try to dispose Buffer if it's allowed.
[中]如果允许,尝试处置缓冲区。
代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server
/**
* {@inheritDoc}
*/
@Override
public void release(final Buffer buffer) {
buffer.tryDispose();
}
代码示例来源:origin: javaee/grizzly
/**
* {@inheritDoc}
*/
@Override
public void release(final Buffer buffer) {
buffer.tryDispose();
}
代码示例来源:origin: javaee/grizzly
@Override
public void release() {
if (!isClosed) {
isClosed = true;
buffer.tryDispose();
}
}
}
代码示例来源:origin: javaee/grizzly
@Override
public void release() {
if (!isClosed) {
isClosed = true;
buffer.tryDispose();
}
}
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-core
/**
* {@inheritDoc}
*/
@Override
public void release(final Buffer buffer) {
buffer.tryDispose();
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core
/**
* {@inheritDoc}
*/
@Override
public void release(final Buffer buffer) {
buffer.tryDispose();
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server
@Override
public void release() {
if (!isClosed) {
isClosed = true;
buffer.tryDispose();
}
}
}
代码示例来源:origin: javaee/grizzly
@Override
public void release() {
if (!isClosed) {
isClosed = true;
buffer.tryDispose();
}
}
}
代码示例来源:origin: javaee/grizzly
/**
* {@inheritDoc}
*/
@Override
public void release(final Buffer buffer) {
buffer.tryDispose();
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core
static Buffer move(final MemoryManager memoryManager,
final Buffer buffer) {
final Buffer tmpBuf = copy(memoryManager, buffer);
buffer.tryDispose();
return tmpBuf;
}
代码示例来源:origin: javaee/grizzly
static Buffer move(final MemoryManager memoryManager,
final Buffer buffer) {
final Buffer tmpBuf = copy(memoryManager, buffer);
buffer.tryDispose();
return tmpBuf;
}
代码示例来源:origin: javaee/grizzly
static Buffer move(final MemoryManager memoryManager,
final Buffer buffer) {
final Buffer tmpBuf = copy(memoryManager, buffer);
buffer.tryDispose();
return tmpBuf;
}
代码示例来源:origin: javaee/grizzly
static Buffer move(final MemoryManager memoryManager,
final Buffer buffer) {
final Buffer tmpBuf = copy(memoryManager, buffer);
buffer.tryDispose();
return tmpBuf;
}
代码示例来源:origin: javaee/grizzly
@SuppressWarnings("MethodMayBeStatic")
protected Buffer wrapAll(final FilterChainContext ctx,
final SSLConnectionContext sslCtx) throws SSLException {
final Buffer input = ctx.getMessage();
final Buffer output = sslCtx.wrapAll(input, OUTPUT_BUFFER_ALLOCATOR);
input.tryDispose();
return output;
}
代码示例来源:origin: javaee/grizzly
@SuppressWarnings("MethodMayBeStatic")
protected Buffer wrapAll(final FilterChainContext ctx,
final SSLConnectionContext sslCtx) throws SSLException {
final Buffer input = ctx.getMessage();
final Buffer output = sslCtx.wrapAll(input, OUTPUT_BUFFER_ALLOCATOR);
input.tryDispose();
return output;
}
代码示例来源:origin: javaee/grizzly
public void decode(final DecodingCallback callback) {
if (inBuffer != null) {
hpackDecoder.decode(inBuffer, !isProcessingHeaders(), callback);
inBuffer.tryDispose();
inBuffer = null;
}
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core
public void decode(final DecodingCallback callback) {
if (inBuffer != null) {
hpackDecoder.decode(inBuffer, !isProcessingHeaders(), callback);
inBuffer.tryDispose();
inBuffer = null;
}
}
代码示例来源:origin: javaee/grizzly
protected void updateInputContentBuffer(final Buffer buffer) {
buffer.allowBufferDispose(true);
if (inputContentBuffer == null) {
inputContentBuffer = buffer;
} else if (inputContentBuffer.hasRemaining()
|| readAheadLimit > 0) { // if the stream is marked - we can't dispose the inputContentBuffer, even if it's been read off
toCompositeInputContentBuffer().append(buffer);
} else {
inputContentBuffer.tryDispose();
inputContentBuffer = buffer;
}
}
代码示例来源:origin: javaee/grizzly
protected void updateInputContentBuffer(final Buffer buffer) {
buffer.allowBufferDispose(true);
if (inputContentBuffer == null) {
inputContentBuffer = buffer;
} else if (inputContentBuffer.hasRemaining()
|| readAheadLimit > 0) { // if the stream is marked - we can't dispose the inputContentBuffer, even if it's been read off
toCompositeInputContentBuffer().append(buffer);
} else {
inputContentBuffer.tryDispose();
inputContentBuffer = buffer;
}
}
代码示例来源:origin: javaee/grizzly
protected void updateInputContentBuffer(final Buffer buffer) {
buffer.allowBufferDispose(true);
if (inputContentBuffer == null) {
inputContentBuffer = buffer;
} else if (inputContentBuffer.hasRemaining()
|| readAheadLimit > 0) { // if the stream is marked - we can't dispose the inputContentBuffer, even if it's been read off
toCompositeInputContentBuffer().append(buffer);
} else {
inputContentBuffer.tryDispose();
inputContentBuffer = buffer;
}
}
内容来源于网络,如有侵权,请联系作者删除!