Package com.alibaba.fastjson.util

Examples of com.alibaba.fastjson.util.ThreadLocalCache


import com.alibaba.fastjson.util.ThreadLocalCache;

public class ThreadLocalCacheTest extends TestCase {

    public void test() throws Exception {
        new ThreadLocalCache();

        ThreadLocalCache.clearChars();
        Assert.assertEquals(ThreadLocalCache.getChars(0).length, 1024);
        Assert.assertEquals(ThreadLocalCache.getChars(1024).length, 1024);
        Assert.assertEquals(ThreadLocalCache.getChars(2048).length, 2048);
View Full Code Here


        ThreadLocalCache.clearChars();

    }

    public void testBytes() throws Exception {
        new ThreadLocalCache();

        ThreadLocalCache.clearBytes();
        Assert.assertEquals(ThreadLocalCache.getBytes(0).length, 1024);
        Assert.assertEquals(ThreadLocalCache.getBytes(1024).length, 1024);
        Assert.assertEquals(ThreadLocalCache.getBytes(2048).length, 2048);
View Full Code Here

import com.alibaba.fastjson.util.ThreadLocalCache;

public class ThreadLocalCacheTest extends TestCase {

    public void test() throws Exception {
        new ThreadLocalCache();

        ThreadLocalCache.clearChars();
        Assert.assertEquals(ThreadLocalCache.getChars(0).length, 1024);
        Assert.assertEquals(ThreadLocalCache.getChars(1024).length, 1024);
        Assert.assertEquals(ThreadLocalCache.getChars(2048).length, 2048);
View Full Code Here

        ThreadLocalCache.clearChars();

    }

    public void testBytes() throws Exception {
        new ThreadLocalCache();

        ThreadLocalCache.clearBytes();
        Assert.assertEquals(ThreadLocalCache.getBytes(0).length, 1024);
        Assert.assertEquals(ThreadLocalCache.getBytes(1024).length, 1024);
        Assert.assertEquals(ThreadLocalCache.getBytes(2048).length, 2048);
View Full Code Here

TOP

Related Classes of com.alibaba.fastjson.util.ThreadLocalCache

Copyright © 2018 www.massapicom. 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.