Examples of HumanReadableSize


Examples of com.alibaba.citrus.util.HumanReadableSize

    public void setSizeMax(HumanReadableSize sizeMax) {
        this.sizeMax = assertNotNull(sizeMax, "sizeMax");
    }

    public void setSizeMax(long sizeMax) {
        setSizeMax(new HumanReadableSize(sizeMax));
    }
View Full Code Here

Examples of com.alibaba.citrus.util.HumanReadableSize

    public void setFileSizeMax(HumanReadableSize fileSizeMax) {
        this.fileSizeMax = assertNotNull(fileSizeMax, "fileSizeMax");
    }

    public void setFileSizeMax(long fileSizeMax) {
        setFileSizeMax(new HumanReadableSize(fileSizeMax));
    }
View Full Code Here

Examples of com.alibaba.citrus.util.HumanReadableSize

    public void setSizeThreshold(HumanReadableSize sizeThreshold) {
        this.sizeThreshold = assertNotNull(sizeThreshold, "sizeThreshold");
    }

    public void setSizeThreshold(int sizeThreshold) {
        this.sizeThreshold = new HumanReadableSize(sizeThreshold);
    }
View Full Code Here

Examples of com.alibaba.citrus.util.HumanReadableSize

        verifyMocks();
    }

    @Test
    public void checkCookieHeaderValue_setMaxSetCookieSize() {
        filter.setMaxSetCookieSize(new HumanReadableSize(20));
        assertEquals(20, filter.getMaxSetCookieSize().getValue());

        responseMock.addHeader("Set-Cookie", "test=value");
        responseMock.addHeader("Set-Cookie", "");
        replayMocks();
View Full Code Here

Examples of com.alibaba.citrus.util.HumanReadableSize

        } catch (IllegalArgumentException e) {
            assertThat(e, exception("maxSize"));
        }

        // set values
        v.setMinSize(new HumanReadableSize(123));
        v.setMaxSize(new HumanReadableSize(456));

        assertEquals(123, v.getMinSize().getValue());
        assertEquals(456, v.getMaxSize().getValue());
    }
View Full Code Here

Examples of com.alibaba.citrus.util.HumanReadableSize

        verifyMocks();
    }

    @Test
    public void checkCookieHeaderValue_setMaxSetCookieSize() {
        filter.setMaxSetCookieSize(new HumanReadableSize(20));
        assertEquals(20, filter.getMaxSetCookieSize().getValue());

        responseMock.addHeader("Set-Cookie", "test=value");
        responseMock.addHeader("Set-Cookie", "");
        replayMocks();
View Full Code Here

Examples of com.alibaba.citrus.util.HumanReadableSize

            keyValuesComponent.visitTemplate(context, keyValues);
        }

        private String formatMemory(long memory) {
            return String.format("%s (%,d)", new HumanReadableSize(memory), memory);
        }
View Full Code Here

Examples of com.alibaba.citrus.util.HumanReadableSize

    public void setSizeMax(HumanReadableSize sizeMax) {
        this.sizeMax = assertNotNull(sizeMax, "sizeMax");
    }

    public void setSizeMax(long sizeMax) {
        setSizeMax(new HumanReadableSize(sizeMax));
    }
View Full Code Here

Examples of com.alibaba.citrus.util.HumanReadableSize

    public void setFileSizeMax(HumanReadableSize fileSizeMax) {
        this.fileSizeMax = assertNotNull(fileSizeMax, "fileSizeMax");
    }

    public void setFileSizeMax(long fileSizeMax) {
        setFileSizeMax(new HumanReadableSize(fileSizeMax));
    }
View Full Code Here

Examples of com.alibaba.citrus.util.HumanReadableSize

    public void setSizeThreshold(HumanReadableSize sizeThreshold) {
        this.sizeThreshold = assertNotNull(sizeThreshold, "sizeThreshold");
    }

    public void setSizeThreshold(int sizeThreshold) {
        this.sizeThreshold = new HumanReadableSize(sizeThreshold);
    }
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.