Package org.mule.api.store

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


    public void partitionObjectStoreDoesNotCollide() throws Exception
    {
        ObjectStore os = objectStoreFactory.createObjectStore("myOs");
        ObjectStore os2 = objectStoreFactory.createObjectStore("myOs2");
        os.store(OBJECT_KEY, OBJECT_KEY_VALUE_1);
        os2.store(OBJECT_KEY, OBJECT_KEY_VALUE_2);
        assertThat(os.contains(OBJECT_KEY), is(true));
        assertThat((String) os.retrieve(OBJECT_KEY), is(OBJECT_KEY_VALUE_1));
        assertThat(os2.contains(OBJECT_KEY),is(true));
        assertThat((String) os2.retrieve(OBJECT_KEY), is(OBJECT_KEY_VALUE_2));
        assertThat((String) os.remove(OBJECT_KEY), is(OBJECT_KEY_VALUE_1));
View Full Code Here


        final int maxEntries = 5;
        final ObjectStore os = objectStoreFactory.createObjectStore("myOs", 5, 0, expirationInterval);

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

        PollingProber prober = new PollingProber(expirationInterval * 5, expirationInterval);
        prober.check(new JUnitProbe()
        {
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.