Package org.mule.api.store

Examples of org.mule.api.store.ListableObjectStore.store()


        int expirationInterval = 100;
        final ListableObjectStore os = objectStoreFactory.createObjectStore("myOs", maxEntries, entryTTL, expirationInterval);

        for (int i = 0; i < maxEntries; i++)
        {
            os.store(i,i);
        }

        PollingProber prober = new PollingProber(1000, expirationInterval);
        prober.check(new JUnitProbe()
        {
View Full Code Here


        int entryTTL = 10000;
        ListableObjectStore os = objectStoreFactory.createObjectStore("myOs", maxEntries, entryTTL,100);

        for (int i = 0; i < maxEntries; i++)
        {
            os.store(i,i);
        }

        os.store(OBJECT_KEY, OBJECT_KEY_VALUE_1);

        Thread.sleep(entryTTL/5);
View Full Code Here

        for (int i = 0; i < maxEntries; i++)
        {
            os.store(i,i);
        }

        os.store(OBJECT_KEY, OBJECT_KEY_VALUE_1);

        Thread.sleep(entryTTL/5);

        assertThat(os.allKeys().size(), is(maxEntries));
View Full Code Here

        final ListableObjectStore os = objectStoreFactory.createObjectStore("myOs", maxEntries, entryTTL, 1000);

        for (int i = 0; i < maxEntries + 1; i++)
        {
            os.store(i, i);
        }

        PollingProber prober = new PollingProber(5000000, 1000);
        prober.check(new JUnitProbe()
        {
View Full Code Here

        StringBuilder bigKey = new StringBuilder();
        for (int i = 0; i < 50; i++)
        {
            bigKey.append("abcdefghijklmnopqrstuvwxyz");
        }
        os.store(bigKey.toString(),1);
        assertThat((Integer) os.retrieve(bigKey.toString()), Is.is(1));
    }


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.