Examples of expandCapacity()


Examples of com.alibaba.fastjson.serializer.SerializeWriter.expandCapacity()

        StringWriter writer = new StringWriter();
        out.writeTo(writer);
        Assert.assertEquals("abc", writer.toString());

        out.expandCapacity(128);
    }

    public void test_12() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
        out.append("abc");
View Full Code Here

Examples of com.alibaba.fastjson.serializer.SerializeWriter.expandCapacity()

        StringWriter writer = new StringWriter();
        out.writeTo(writer);
        Assert.assertEquals("abc", writer.toString());

        out.expandCapacity(128);
    }

    public void test_12() throws Exception {
        SerializeWriter out = new SerializeWriter(1);
        out.append("abc");
View Full Code Here

Examples of krati.core.array.AddressArray.expandCapacity()

            initLevel = _maxLevel;
        }
       
        // Expand address array length upon first-time creation
        if(!found) {
            addrArray.expandCapacity((_unitCapacity << initLevel) - 1);
            _log.info("capacity initialized to " + addrArray.length());
        }
       
        // Create underlying segment manager
        String segmentHome = _homeDir.getCanonicalPath() + File.separator + "segs";
View Full Code Here

Examples of krati.core.array.AddressArray.expandCapacity()

                _config.getNumSyncBatches(),
                _config.getIndexesCached());
       
        // Expand address array length upon first-time creation
        if(!found) {
            addrArray.expandCapacity(initialCapacity - 1);
            _log.info("capacity initialized to " + addrArray.length());
        }
       
        _unitCapacity = DynamicConstants.SUB_ARRAY_SIZE;
       
View Full Code Here

Examples of krati.core.array.AddressArray.expandCapacity()

                                              int batchSize,
                                              int numSyncBatches,
                                              boolean indexesCached) throws Exception {
        AddressArrayFactory factory = new AddressArrayFactory(indexesCached);
        AddressArray addrArray = factory.createDynamicAddressArray(homeDir, batchSize, numSyncBatches);
        addrArray.expandCapacity(length - 1);
       
        if(length != addrArray.length()) {
            _log.warn("array file length " + addrArray.length() + " is different from specified " + length);
        }
       
View Full Code Here

Examples of krati.core.array.AddressArray.expandCapacity()

            initLevel = _maxLevel;
        }
       
        // Expand address array length upon first-time creation
        if(!found) {
            addrArray.expandCapacity((_unitCapacity << initLevel) - 1);
            _log.info("capacity initialized to " + addrArray.length());
        }
       
        // Create underlying segment manager
        String segmentHome = _homeDir.getCanonicalPath() + File.separator + "segs";
View Full Code Here

Examples of krati.core.array.AddressArray.expandCapacity()

                _config.getNumSyncBatches(),
                _config.getIndexesCached());
       
        // Expand address array length upon first-time creation
        if(!found) {
            addrArray.expandCapacity(initialCapacity - 1);
            _log.info("capacity initialized to " + addrArray.length());
        }
        _unitCapacity = DynamicConstants.SUB_ARRAY_SIZE;
       
        // Create underlying segment manager
View Full Code Here

Examples of krati.core.array.AddressArray.expandCapacity()

                                            int batchSize,
                                            int numSyncBatches,
                                            boolean indexesCached) throws Exception {
        AddressArrayFactory factory = new AddressArrayFactory(indexesCached);
        AddressArray addrArray = factory.createDynamicAddressArray(getHomeDir(), batchSize, numSyncBatches);
        addrArray.expandCapacity(length - 1);
        return addrArray;
    }
   
    public final File getHomeDir() {
        return _config.getHomeDir();
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.