Examples of capacity()


Examples of org.hsqldb.persist.DataFileCache.capacity()

        while (caches.hasNext()) {
            cache = (DataFileCache) caches.next();
            row   = t.getEmptyRowData();
            row[icache_file] = FileUtil.getFileUtil().canonicalOrAbsolutePath(
                cache.getFileName());
            row[imax_cache_sz]    = ValuePool.getLong(cache.capacity());
            row[imax_cache_bytes] = ValuePool.getLong(cache.bytesCapacity());
            row[icache_size] = ValuePool.getLong(cache.getCachedObjectCount());
            row[icache_length] =
                ValuePool.getLong(cache.getTotalCachedBlockSize());
            row[ifree_bytes] =
View Full Code Here

Examples of org.hsqldb_voltpatches.persist.DataFileCache.capacity()

            cache = (DataFileCache) caches.next();
            row   = t.getEmptyRowData();
            row[icache_file] =
                FileUtil.getDefaultInstance().canonicalOrAbsolutePath(
                    cache.getFileName());
            row[imax_cache_sz]    = ValuePool.getInt(cache.capacity());
            row[imax_cache_bytes] = ValuePool.getLong(cache.bytesCapacity());
            row[icache_size] = ValuePool.getInt(cache.getCachedObjectCount());
            row[icache_length] =
                ValuePool.getLong(cache.getTotalCachedBlockSize());
            row[ifree_bytes] = ValuePool.getInt(cache.getTotalFreeBlockSize());
View Full Code Here

Examples of org.jboss.netty.buffer.ChannelBuffer.capacity()

    }
     
    @Override
    public Object nextChunk() throws Exception {
      ChannelBuffer cb = (ChannelBuffer)super.nextChunk();
      int length = cb.capacity();
      ChannelBuffer prefix = wrappedBuffer(new byte[2]);
      prefix.setShort(0, (short)length);
      if (!hasNextChunk()) {
        //append a 0 short
        return wrappedBuffer(prefix, cb, wrappedBuffer(new byte[2]));
View Full Code Here

Examples of org.jboss.netty.buffer.CompositeChannelBuffer.capacity()

    }

    private static void checkContentBuffer(HttpMessage aggregatedMessage) {
        CompositeChannelBuffer buffer = (CompositeChannelBuffer) aggregatedMessage.getContent();
        assertEquals(2, buffer.numComponents());
        List<ChannelBuffer> buffers = buffer.decompose(0, buffer.capacity());
        assertEquals(2, buffers.size());
        for (ChannelBuffer buf: buffers) {
            // This should be false as we decompose the buffer before to not have deep hierarchy
            assertFalse(buf instanceof CompositeChannelBuffer);
        }
View Full Code Here

Examples of org.jgroups.util.BlockingInputStream.capacity()

   
    public void testCreation() throws IOException {
        BlockingInputStream in=new BlockingInputStream(2000);
        System.out.println("in = " + in);
        assert in.available() == 0 && in.capacity() == 2000;

        in.write(new byte[]{'b', 'e', 'l', 'a'});
        System.out.println("in = " + in);
        assert in.available() == 4 && in.capacity() == 2000;
    }
View Full Code Here

Examples of org.jgroups.util.ByteArrayDataInputStream.capacity()

        byte[] buf=new byte[100];
        buf[0]='B'; buf[1]='e'; buf[2]='l'; buf[3]='a';
        ByteArrayDataInputStream in=new ByteArrayDataInputStream(buf);
        assert in.position() == 0;
        assert in.limit() == buf.length;
        assert in.capacity() == buf.length;

        in=new ByteArrayDataInputStream(buf, 0, 4);
        assert in.position() == 0;
        assert in.limit() == 4;
        assert in.capacity() == buf.length;
View Full Code Here

Examples of org.jgroups.util.Digest.capacity()

    protected boolean isJoinResponseValid(final JoinRsp rsp) {
        if(rsp.getFailReason() != null)
            throw new SecurityException(rsp.getFailReason());

        Digest tmp_digest=rsp.getDigest();
        if(tmp_digest == null || tmp_digest.capacity() == 0) {
            log.warn("%s: digest is empty: digest=%s", gms.local_addr, rsp.getDigest());
            return false;
        }

        if(!tmp_digest.contains(gms.local_addr)) {
View Full Code Here

Examples of org.jgroups.util.MessageBatch.capacity()

        for(Message msg: msgs)
            batch.add(msg);
        System.out.println("batch = " + batch);
        assert batch.size() == prev_size;
        assert batch.capacity() == prev_size;
    }

    public void testRemoveWithFilter() {
        Filter<Message> filter=new Filter<Message>() {
            public boolean accept(Message msg) {return msg != null && msg.isTransientFlagSet(Message.TransientFlag.OOB_DELIVERED);}
View Full Code Here

Examples of org.jgroups.util.MutableDigest.capacity()

    }


    public void testConstructor1() {
        Digest dd=new MutableDigest(members);
        Assert.assertEquals(dd.capacity(),members.length);
    }

    public void testConstructor2() {
        d=new Digest(members, new long[]{1,2,3,4,5,6});
        System.out.println("d = " + d);
View Full Code Here

Examples of org.jgroups.util.RetransmitTable.capacity()

        addAndGet(table, 20, "20");
        addAndGet(table, 29, "29");
        System.out.println("table: " + table.dump());
        assert table.size() == 9;
        assert table.size() == table.computeSize();
        assert table.capacity() == 30;
    }


    public static void testAdditionWithOffset() {
        RetransmitTable table=new RetransmitTable(3, 10, 100);
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.