Examples of CacheConfigImpl


Examples of net.sf.cache4j.impl.CacheConfigImpl

                    reference = reference.trim().toLowerCase();
                    if(!reference.equals("strong") && !reference.equals("soft") ) {
                        throw new CacheException("Unknown cache object reference:"+reference);
                    }

                    config = new CacheConfigImpl(id, desc, ttl, idle, maxMemorySize, maxSize, type, algorithm, reference);
                    ((ManagedCache)cache).setCacheConfig(config);

                    cf.addCache(cache);
                }
            }
View Full Code Here

Examples of net.sf.cache4j.impl.CacheConfigImpl

    /**
     * �������� ������ � ������ ��� �� ����.
     */
    public static boolean test_PUT_GET() throws Exception {
        SynchronizedCache cache = new SynchronizedCache();
        CacheConfig cacheConfig = new CacheConfigImpl("cacheId", null, 0, 0, 0, 0, null, "lru", "strong");
        cache.setCacheConfig(cacheConfig);

        Object key = "key";
        Object value = "value";
        cache.put(key, value);
View Full Code Here

Examples of net.sf.cache4j.impl.CacheConfigImpl

    /**
     * �������� ������. �������� null. ��������� ������ ���� null.
     */
    public static boolean test_PUT_OBJ_PUT_NULL_GET() throws Exception {
        SynchronizedCache cache = new SynchronizedCache();
        CacheConfig cacheConfig = new CacheConfigImpl("cacheId", null, 0, 0, 0, 0, null, "lru", "strong");
        cache.setCacheConfig(cacheConfig);

        Object key = "key";
        Object value = "value";

View Full Code Here

Examples of net.sf.cache4j.impl.CacheConfigImpl

    /**
     * �������� ������. ������� ������. ��������� ������ ���� null.
     */
    public static boolean test_PUT_REMOVE_GET() throws Exception {
        SynchronizedCache cache = new SynchronizedCache();
        CacheConfig cacheConfig = new CacheConfigImpl("cacheId", null, 0, 0, 0, 0, null, "lru", "strong");
        cache.setCacheConfig(cacheConfig);

        Object key = "key";
        Object value = "value";

View Full Code Here

Examples of net.sf.cache4j.impl.CacheConfigImpl

    /**
     * �������� ������. ������� ���. ��������� ������ ���� null.
     */
    public static boolean test_PUT_CLEAR_GET() throws Exception {
        SynchronizedCache cache = new SynchronizedCache();
        CacheConfig cacheConfig = new CacheConfigImpl("cacheId", null, 0, 0, 0, 0, null, "lru", "strong");
        cache.setCacheConfig(cacheConfig);

        Object key = "key";
        Object value = "value";

View Full Code Here

Examples of net.sf.cache4j.impl.CacheConfigImpl

     * ����������� ������ ���� ������������ ���������� ��������.
     */
    public static boolean test_MAXSIZE() throws Exception {
        SynchronizedCache cache = new SynchronizedCache();
        int maxSize = 100;
        CacheConfig cacheConfig = new CacheConfigImpl("cacheId", null, 0, 0, 0, maxSize, null, "lru", "strong");
        cache.setCacheConfig(cacheConfig);

        for (int i = 0, maxi = maxSize*2; i <maxi; i++) {
            cache.put(new Long(i), new Long(i));
        }
View Full Code Here

Examples of net.sf.cache4j.impl.CacheConfigImpl

     * ������������.
     */
    public static boolean test_MAXMEMORYSIZE() throws Exception {
        SynchronizedCache cache = new SynchronizedCache();
        int msxMemorySize = 1000;
        CacheConfig cacheConfig = new CacheConfigImpl("cacheId", null, 0, 0, msxMemorySize, 0, null, "lru", "strong");
        cache.setCacheConfig(cacheConfig);

        for (int i = 0; i <1000; i++) {
            cache.put(new Long(i), new Long(i));
        }
View Full Code Here

Examples of net.sf.cache4j.impl.CacheConfigImpl

     */
    public static boolean test_MAXSIZE_AND_MAXMEMORYSIZE() throws Exception {
        SynchronizedCache cache = new SynchronizedCache();
        int maxMemorySize = 1000;
        int maxSize = 1000;
        CacheConfig cacheConfig = new CacheConfigImpl("cacheId", null, 0, 0, maxMemorySize, maxSize, null, "lru", "strong");
        cache.setCacheConfig(cacheConfig);

        for (int i = 0; i <maxSize*2; i++) {
            cache.put(new Long(i), new Long(i));
        }
View Full Code Here

Examples of net.sf.cache4j.impl.CacheConfigImpl

     * ������������� ����� �� ����� ����������� ������������ �����.
     * � ���������� ��� ������ ������� null.
     */
    public static boolean test_TTL() throws Exception {
        SynchronizedCache cache = new SynchronizedCache();
        CacheConfig cacheConfig = new CacheConfigImpl("cacheId", null, 1, 0, 0, 0, null, "lru", "strong");
        cache.setCacheConfig(cacheConfig);

        Object key = "key";
        Object value = "value";

View Full Code Here

Examples of net.sf.cache4j.impl.CacheConfigImpl

     * ������������� ����� �� ����� ����������� ������������ �����.
     * � ���������� ��� ������ ������� null.
     */
    public static boolean test_IDLE() throws Exception {
        SynchronizedCache cache = new SynchronizedCache();
        CacheConfig cacheConfig = new CacheConfigImpl("cacheId", null, 0, 1, 0, 0, null, "lru", "strong");
        cache.setCacheConfig(cacheConfig);

        Object key = "key";
        Object value = "value";

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.