Examples of release()


Examples of io.netty.handler.codec.http.LastHttpContent.release()

      vertx.runOnContext(new VoidHandler() {
        @Override
        protected void handle() {
          handleEnd(theTrailer);
          // release the buffer after process it
          theTrailer.release();
        }
      });
      hasPausedEnd = false;
      pausedTrailer = null;
    }
View Full Code Here

Examples of io.netty.handler.codec.http.multipart.InterfaceHttpData.release()

                if (data != null) {
                    try {
                        // new value
                        writeHttpData(data);
                    } finally {
                        data.release();
                    }
                }
            }
        } catch (EndOfDataDecoderException e1) {
            // end
View Full Code Here

Examples of io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame.release()

        assertEquals(300, newFrame.content().readableBytes());

        byte[] finalPayload = new byte[300];
        newFrame.content().readBytes(finalPayload);
        assertTrue(Arrays.equals(finalPayload, payload));
        newFrame.release();
    }

    @Test
    public void testFramementedFrame() {
        EmbeddedChannel encoderChannel = new EmbeddedChannel(new PerFrameDeflateEncoder(9, 15, false));
View Full Code Here

Examples of io.netty.handler.codec.http.websocketx.TextWebSocketFrame.release()

            ((CloseWebSocketFrame)msg).release();
        } else if (msg instanceof TextWebSocketFrame) {
            TextWebSocketFrame frame = (TextWebSocketFrame) msg;
            WebSocketClient client = channelId2Client.get(ctx.channel());
            ctx.pipeline().fireChannelRead(new PacketsMessage(client, frame.content()));
            frame.release();
        } else if (msg instanceof FullHttpRequest) {
            FullHttpRequest req = (FullHttpRequest) msg;
            QueryStringDecoder queryDecoder = new QueryStringDecoder(req.getUri());
            String path = queryDecoder.path();
            if (path.startsWith(this.path)) {
View Full Code Here

Examples of io.netty.handler.codec.memcache.MemcacheContent.release()

        assertThat(content1.content().readableBytes(), is(3));
        assertThat(content2.content().readableBytes(), is(5));

        content1.release();
        content2.release();
    }

    /**
     * This test makes sure that even when more requests arrive in the same batch, they
     * get emitted as separate messages.
View Full Code Here

Examples of io.vertx.core.shareddata.Lock.release()

    getVertx().sharedData().getLock("foo", ar -> {
      assertTrue(ar.succeeded());
      long start = System.currentTimeMillis();
      Lock lock = ar.result();
      vertx.setTimer(1000, tid -> {
        lock.release();
      });
      getVertx().sharedData().getLock("foo", ar2 -> {
        assertTrue(ar2.succeeded());
        // Should be delayed
        assertTrue(System.currentTimeMillis() - start >= 1000);
View Full Code Here

Examples of it.eng.spago.presentation.PublisherConfiguration.release()

                        "AdapterPortlet::doView: ",
                        ex);
                } // catch (Excpetion ex) try   
                finally {
                    // Allow better garbage collection
                    publisher.release();
                }
              } // if (publisherType.equalsIgnoreCase(Constants.LOOP_PUBLISHER_TYPE)
                // || publisherType.equalsIgnoreCase(SERVLET_PUBLISHER_TYPE) ||
                // publisherType.equalsIgnoreCase(JSP_PUBLISHER_TYPE))
              else {
View Full Code Here

Examples of java.nio.channels.FileLock.release()

                writable = false;
            } finally {
                if (lock != null) {
                    writable = true;
                    try {
                        lock.release();
                    } catch (IOException e) {
                        log.warn("Error while releasing the lock on file: " + file.getName(), e);
                        writable = false;
                    }
                } else {
View Full Code Here

Examples of java.util.concurrent.Semaphore.release()

                if(i == 0)
                    channels[i]=new ConcurrentStartupChannel(names[i], semaphore);
                else
                    channels[i]=new ConcurrentStartupChannel((JChannel)channels[0].getChannel(), names[i], semaphore);
                channels[i].start();
                semaphore.release(1);
                if(i == 0)
                    Util.sleep(1500); // sleep after the first node to educe the chances of a merge
            }

            // Make sure everyone is in sync
View Full Code Here

Examples of javax.enterprise.context.spi.CreationalContext.release()

            return dao;
        } catch (Exception e) {
            logger.error("Unable to construct {}. Creating the object directly.", classToInstantiate.getName());
            return classToInstantiate.newInstance();
        } finally {
            if (cc != null) cc.release();
        }
    }

    public String toString() {
        return "CDI ObjectFactory";
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.