Examples of MemoryManager


Examples of org.glassfish.grizzly.memory.MemoryManager

    @SuppressWarnings({ "unchecked" })
    public boolean doHandle(final FilterChainContext ctx, final Request request,
            final HttpRequestPacket requestPacket) throws IOException {

        final byte[] data = request.getByteData();
        final MemoryManager mm = ctx.getMemoryManager();
        final Buffer gBuffer = Buffers.wrap(mm, data);
        if (requestPacket.getContentLength() == -1) {
            requestPacket.setContentLengthLong(data.length);
        }
        final HttpContent content = requestPacket.httpContentBuilder()
View Full Code Here

Examples of org.glassfish.grizzly.memory.MemoryManager

        String charset = request.getBodyEncoding();
        if (charset == null) {
            charset = Charsets.ASCII_CHARSET.name();
        }
        final byte[] data = request.getStringData().getBytes(charset);
        final MemoryManager mm = ctx.getMemoryManager();
        final Buffer gBuffer = Buffers.wrap(mm, data);
        if (requestPacket.getContentLength() == -1) {
            requestPacket.setContentLengthLong(data.length);
        }
        final HttpContent content = requestPacket.httpContentBuilder()
View Full Code Here

Examples of org.glassfish.grizzly.memory.MemoryManager

        generator.setFeeder(new FeedableBodyGenerator.BaseFeeder(generator) {
            @Override
            public void flush() throws IOException {
                final Body bodyLocal = feedableBodyGenerator.createBody();
                try {
                    final MemoryManager mm = ctx.getMemoryManager();
                    boolean last = false;
                    while (!last) {
                        Buffer buffer = mm.allocate(BodyHandler.MAX_CHUNK_SIZE);
                        buffer.allowBufferDispose(true);
                        final long readBytes = bodyLocal.read(buffer.toByteBuffer());
                        if (readBytes > 0) {
                            buffer.position((int) readBytes);
                            buffer.trim();
View Full Code Here

Examples of org.glassfish.grizzly.memory.MemoryManager

            requestPacket.setContentLengthLong(len);
        } else {
            requestPacket.setChunked(true);
        }

        final MemoryManager mm = ctx.getMemoryManager();
        boolean last = false;

        while (!last) {
            Buffer buffer = mm.allocate(MAX_CHUNK_SIZE);
            buffer.allowBufferDispose(true);

            final long readBytes = bodyLocal.read(buffer.toByteBuffer());
            if (readBytes > 0) {
                buffer.position((int) readBytes);
View Full Code Here

Examples of org.hornetq.core.server.MemoryManager

      managementService = new ManagementServiceImpl(mbeanServer, configuration);

      if (configuration.getMemoryMeasureInterval() != -1)
      {
         memoryManager = new MemoryManager(configuration.getMemoryWarningThreshold(),
            configuration.getMemoryMeasureInterval());

         memoryManager.start();
      }
View Full Code Here

Examples of org.hornetq.core.server.MemoryManager

      managementService = new ManagementServiceImpl(mbeanServer, configuration);

      if (configuration.getMemoryMeasureInterval() != -1)
      {
         memoryManager = new MemoryManager(configuration.getMemoryWarningThreshold(),
            configuration.getMemoryMeasureInterval());

         memoryManager.start();
      }
View Full Code Here

Examples of org.hornetq.core.server.MemoryManager

      managementService = new ManagementServiceImpl(mbeanServer, configuration);

      if (configuration.getMemoryMeasureInterval() != -1)
      {
         memoryManager = new MemoryManager(configuration.getMemoryWarningThreshold(),
            configuration.getMemoryMeasureInterval());

         memoryManager.start();
      }
View Full Code Here

Examples of org.hornetq.core.server.MemoryManager

      managementService = new ManagementServiceImpl(mbeanServer, configuration);

      if (configuration.getMemoryMeasureInterval() != -1)
      {
         memoryManager = new MemoryManager(configuration.getMemoryWarningThreshold(),
            configuration.getMemoryMeasureInterval());

         memoryManager.start();
      }
View Full Code Here

Examples of org.hornetq.core.server.MemoryManager

      managementService = new ManagementServiceImpl(mbeanServer, configuration);

      if (configuration.getMemoryMeasureInterval() != -1)
      {
         memoryManager = new MemoryManager(configuration.getMemoryWarningThreshold(),
            configuration.getMemoryMeasureInterval());

         memoryManager.start();
      }
View Full Code Here

Examples of org.hornetq.core.server.MemoryManager

      managementService = new ManagementServiceImpl(mbeanServer, configuration);

      if (configuration.getMemoryMeasureInterval() != -1)
      {
         memoryManager = new MemoryManager(configuration.getMemoryWarningThreshold(),
            configuration.getMemoryMeasureInterval());

         memoryManager.start();
      }
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.