Package io.netty.buffer

Examples of io.netty.buffer.ByteBuf.release()


        } catch (Throwable cause) {
            PlatformDependent.throwException(cause);
            return -1;
        finally {
            if (free) {
                buffer.release();
            }
        }
    }

    @Override
View Full Code Here


                    readMessages ++;
                } catch (Throwable cause) {
                    PlatformDependent.throwException(cause);
                finally {
                    if (free) {
                        buffer.release();
                    }
                }
            }
        } finally {
            reableKeys.clear();
View Full Code Here

        } catch (Throwable cause) {
            PlatformDependent.throwException(cause);
            return -1;
        finally {
            if (free) {
                buffer.release();
            }
        }
    }

    @Override
View Full Code Here

                } else {
                    exchangeBuf.remove();
                    try {
                        out.writeBytes(data);
                    } finally {
                        data.release();
                    }
                }
            }
        }
View Full Code Here

        final int receivedMessageSize = byteBuf.writeBytes(javaChannel(),
                maximumMessageSize);

        if (receivedMessageSize <= 0) {
            byteBuf.release();
            return 0;
        }

        if (receivedMessageSize >= maximumMessageSize) {
            javaChannel().close();
View Full Code Here

        } catch (Throwable cause) {
            PlatformDependent.throwException(cause);
            return -1;
        } finally {
            if (free) {
                buffer.release();
            }
        }
    }

    @Override
View Full Code Here

        passToConnection(data);
      } finally {
        if (data.isReadable()) {
          remainder = data;
        } else {
          data.release();
        }
      }
      return;
    }
View Full Code Here

                bodyOffset += out.snapshotLength;
            }
            while (metaBuffer.readableBytes() > 0) {
                metaBuffer.readBytes(openWriteFile, metaBuffer.readableBytes());
            }
            metaBuffer.release();
            /* write bytes for each stream id */
            for (TempData out : streamsWithData) {
                synchronized (out.stream) {     // need less confusing variable names for concurrency
                    int toWrite = out.snapshotLength;
                    while (toWrite > 0) {
View Full Code Here

                bodyOffset += out.snapshotLength;
            }
            while (metaBuffer.readableBytes() > 0) {
                metaBuffer.readBytes(openWriteFile, metaBuffer.readableBytes());
            }
            metaBuffer.release();
            /* write bytes for each stream id */
            for (TempData out : streamsWithData) {
                synchronized (out.stream) {     // need less confusing variable names for concurrency
                    int toWrite = out.snapshotLength;
                    while (toWrite > 0) {
View Full Code Here

            }

            decode(ctx, buffer);

        } finally {
            input.release();
        }
    }

    protected void decode(ChannelHandlerContext ctx, ByteBuf buffer) throws InterruptedException {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.