Package org.apache.cayenne.event

Examples of org.apache.cayenne.event.DefaultEventManager


        final boolean[] cacheShutdown = new boolean[1];

        DataRowStore cache = new DataRowStore(
                "Y",
                Collections.EMPTY_MAP,
                new DefaultEventManager()) {

            @Override
            public void shutdown() {
                cacheShutdown[0] = true;
            }
View Full Code Here


        catch (CayenneRuntimeException e) {
            // expected
        }

        try {
            new ClientChannel(connection, false, new DefaultEventManager(2), false);
            fail("Channel didn't throw on broken EventBridge");
        }
        catch (CayenneRuntimeException e) {
            // expected
        }

        try {
            new ClientChannel(connection, false, new DefaultEventManager(2), true);
        }
        catch (CayenneRuntimeException e) {
            fail("Channel threw on broken EventBridge");
        }
    }
View Full Code Here

    public void testDefaultConstructor() {
        DataRowStore cache = new DataRowStore(
                "cacheXYZ",
                Collections.EMPTY_MAP,
                new DefaultEventManager());
        assertEquals("cacheXYZ", cache.getName());
        assertNotNull(cache.getSnapshotEventSubject());
        assertTrue(cache.getSnapshotEventSubject().getSubjectName().contains("cacheXYZ"));

        assertEquals(DataRowStore.REMOTE_NOTIFICATION_DEFAULT, cache
View Full Code Here

                .valueOf(!DataRowStore.REMOTE_NOTIFICATION_DEFAULT));

        DataRowStore cache = new DataRowStore(
                "cacheXYZ",
                props,
                new DefaultEventManager());
        assertEquals("cacheXYZ", cache.getName());
        assertEquals(!DataRowStore.REMOTE_NOTIFICATION_DEFAULT, cache
                .isNotifyingRemoteListeners());
    }
View Full Code Here

    public void testNotifyingRemoteListeners() {
        DataRowStore cache = new DataRowStore(
                "cacheXYZ",
                Collections.EMPTY_MAP,
                new DefaultEventManager());

        assertEquals(DataRowStore.REMOTE_NOTIFICATION_DEFAULT, cache
                .isNotifyingRemoteListeners());

        cache.setNotifyingRemoteListeners(!DataRowStore.REMOTE_NOTIFICATION_DEFAULT);
View Full Code Here

        props.put(DataRowStore.SNAPSHOT_CACHE_SIZE_PROPERTY, String.valueOf(2));

        DataRowStore cache = new DataRowStore(
                "cacheXYZ",
                props,
                new DefaultEventManager());
        assertEquals(2, cache.maximumSize());
        assertEquals(0, cache.size());

        ObjectId key1 = new ObjectId("Artist", Artist.ARTIST_ID_PK_COLUMN, 1);
        Map<Object, Object> diff1 = new HashMap<Object, Object>();
View Full Code Here

TOP

Related Classes of org.apache.cayenne.event.DefaultEventManager

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.