Examples of fixedSerializationSize()


Examples of com.foundationdb.server.types.TClass.fixedSerializationSize()

                    attribute2 = attrs.next().name();
                }
                if (attrs.hasNext()) {
                    attribute3 = attrs.next().name();
                }
                Long size = tClass.hasFixedSerializationSize() ? (long)tClass.fixedSerializationSize() : null;
               
                Integer jdbcTypeID = tClass.jdbcType();
               
                return new ValuesRow (rowType,
                        name,
View Full Code Here

Examples of com.foundationdb.server.types.TClass.fixedSerializationSize()

    public final static int MAX_STORAGE_SIZE_CAP = 1024 * 1024 - 1024;

    public long computeStorageSize(boolean average) {
        TClass tclass = TInstance.tClass(type);
        if (tclass.hasFixedSerializationSize(type)) {
            return tclass.fixedSerializationSize(type);
        }
        else {
            long maxBytes = tclass.variableSerializationSize(type, average);
            return Math.min(MAX_STORAGE_SIZE_CAP, maxBytes) + prefixSize(maxBytes);
        }
View Full Code Here

Examples of com.foundationdb.server.types.TClass.fixedSerializationSize()

       
        short length = -1;
        int modifier = -1;

        if (tClass.hasFixedSerializationSize())
            length = (short)tClass.fixedSerializationSize();

        if (type.hasAttributes(StringAttribute.class)) {
            // VARCHAR(n).
            modifier = type.attribute(StringAttribute.MAX_LENGTH) + 4;
        }
View Full Code Here

Examples of com.foundationdb.server.types.TClass.fixedSerializationSize()

        TClass tclass = column.getType().typeClass();
        if (tclass.hasFixedSerializationSize()) {
            if (tclass instanceof MNumeric) {
                return 8;       // TODO: For compatibility with existing tests.
            }
            return tclass.fixedSerializationSize();
        }
        if (tclass instanceof TString) {
            int length = ((TString)tclass).getFixedLength();
            if (length < 0) {
                return (int)(column.getAverageStorageSize() * PLAUSIBLE_AVERAGE_VAR_USAGE);
 
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.