Package org.apache.directmemory.cache

Examples of org.apache.directmemory.cache.CacheService.dump()


        //Test retrieving an object added by an other bundle.
        Object result = cacheService.retrieve( "1" );
        assertNotNull( result );

        cacheService.scheduleDisposalEvery( Every.seconds( 1 ) );
        cacheService.dump();
        Monitor.dump( "cache" );

        Pointer p = cacheService.put( "2", obj );
        result = cacheService.retrieve( "2" );
        cacheService.dump();
View Full Code Here


        cacheService.dump();
        Monitor.dump( "cache" );

        Pointer p = cacheService.put( "2", obj );
        result = cacheService.retrieve( "2" );
        cacheService.dump();
        assertEquals( obj, result );
    }

    /**
     * This test basic cache operations(put,retrieve) inside OSGi using an object of an imported class (provided by an other bundle).
View Full Code Here

        SimpleObject obj1 = new SimpleObject( "2", "Object Two" );
        SimpleObject obj2 = new SimpleObject( "3", "Object Three" );

        CacheService cacheService = getOsgiService( CacheService.class );
        cacheService.scheduleDisposalEvery( Every.seconds( 1 ) );
        cacheService.dump();

        Pointer p1 = cacheService.put( "2", obj1 );
        Pointer p2 = cacheService.put( "3", obj2 );
        Object result1 = cacheService.retrieve( "2" );
        Object result2 = cacheService.retrieve( "3" );
View Full Code Here

        Pointer p1 = cacheService.put( "2", obj1 );
        Pointer p2 = cacheService.put( "3", obj2 );
        Object result1 = cacheService.retrieve( "2" );
        Object result2 = cacheService.retrieve( "3" );

        cacheService.dump();
        Monitor.dump( "cache" );

        assertEquals( obj1, result1 );
        assertEquals( obj2, result2 );
    }
View Full Code Here

        //Test retrieving an object added by an other bundle.
        Object result = cacheService.retrieve( "1" );
        assertNotNull( result );

        cacheService.scheduleDisposalEvery( Every.seconds( 1 ) );
        cacheService.dump();
        Monitor.dump( "cache" );

        Pointer p = cacheService.put( "2", obj );
        result = cacheService.retrieve( "2" );
        cacheService.dump();
View Full Code Here

        cacheService.dump();
        Monitor.dump( "cache" );

        Pointer p = cacheService.put( "2", obj );
        result = cacheService.retrieve( "2" );
        cacheService.dump();
        assertEquals( obj, result );
    }

    /**
     * This test basic cache operations(put,retrieve) inside OSGi using an object of an imported class (provided by an other bundle).
View Full Code Here

        SimpleObject obj1 = new SimpleObject( "2", "Object Two" );
        SimpleObject obj2 = new SimpleObject( "3", "Object Three" );

        CacheService cacheService = getOsgiService( CacheService.class );
        cacheService.scheduleDisposalEvery( Every.seconds( 1 ) );
        cacheService.dump();

        Pointer p1 = cacheService.put( "2", obj1 );
        Pointer p2 = cacheService.put( "3", obj2 );
        Object result1 = cacheService.retrieve( "2" );
        Object result2 = cacheService.retrieve( "3" );
View Full Code Here

        Pointer p1 = cacheService.put( "2", obj1 );
        Pointer p2 = cacheService.put( "3", obj2 );
        Object result1 = cacheService.retrieve( "2" );
        Object result2 = cacheService.retrieve( "3" );

        cacheService.dump();
        Monitor.dump( "cache" );

        assertEquals( obj1, result1 );
        assertEquals( obj2, result2 );
    }
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.