Examples of QueueKey


Examples of org.mule.util.queue.QueueKey

    }

    @Override
    protected Serializable createKey()
    {
        return new QueueKey("theQueue", UUID.getUUID());
    }
View Full Code Here

Examples of org.mule.util.queue.QueueKey

        QueuePersistenceObjectStore<Serializable> store = getObjectStore();

        List<Serializable> allKeys = store.allKeys();
        assertEquals(1, allKeys.size());

        QueueKey key = (QueueKey)allKeys.get(0);
        assertEquals(id, key.id);
    }
View Full Code Here

Examples of org.mule.util.queue.QueueKey

        QueuePersistenceObjectStore<Serializable> store = getObjectStore();

        String id = UUID.getUUID();
        createAndPopulateStoreFile(id, TEST_MESSAGE);

        QueueKey key = new QueueKey(QUEUE_NAME, id);
        Serializable value = store.retrieve(key);
        assertEquals(TEST_MESSAGE, value);
    }
View Full Code Here

Examples of org.mule.util.queue.QueueKey

        QueuePersistenceObjectStore<Serializable> store = getObjectStore();

        String id = UUID.getUUID();
        File storeFile = createAndPopulateStoreFile(id, TEST_MESSAGE);

        QueueKey key = new QueueKey(QUEUE_NAME, id);
        store.remove(key);

        assertFalse(storeFile.exists());
    }
View Full Code Here

Examples of org.mule.util.queue.QueueKey

                id = id.substring(beginIndex, length);

                String queue = id.substring(0, id.indexOf(File.separator));
                id = id.substring(queue.length() + 1);

                keys.add(new QueueKey(queue, id));
            }
        }
    }
View Full Code Here

Examples of org.mule.util.queue.QueueKey

        return deserialize(file);
    }

    protected File createStoreFile(Serializable key) throws ObjectStoreException
    {
        QueueKey queueKey = (QueueKey) key;

        String filename = queueKey.id + FILE_EXTENSION;
        String path = queueKey.queueName + File.separator + filename;

        try
View Full Code Here

Examples of org.mule.util.queue.objectstore.QueueKey

        // the key is built in way to prevent UntilSuccessful workers across a
        // cluster to compete for the same
        // events over a shared object store
        String key = muleEvent.getFlowConstruct() + "-" + muleEvent.getMuleContext().getClusterId() + "-"
                     + muleEvent.getId();
        return new QueueKey(QueuePersistenceObjectStore.DEFAULT_QUEUE_STORE, key);
    }
View Full Code Here

Examples of org.mule.util.queue.objectstore.QueueKey

    }

    @Override
    protected Serializable createKey()
    {
        return new QueueKey("theQueue", UUID.getUUID());
    }
View Full Code Here

Examples of org.mule.util.queue.objectstore.QueueKey

        createAndPopulateStoreFile(id, TEST_MESSAGE);

        List<Serializable> allKeys = store.allKeys();
        assertEquals(1, allKeys.size());

        QueueKey key = (QueueKey)allKeys.get(0);
        assertEquals(id, key.id);
    }
View Full Code Here

Examples of org.mule.util.queue.objectstore.QueueKey

        QueuePersistenceObjectStore<Serializable> store = getObjectStore();

        String id = UUID.getUUID();
        createAndPopulateStoreFile(id, TEST_MESSAGE);

        QueueKey key = new QueueKey(QUEUE_NAME, id);
        Serializable value = store.retrieve(key);
        assertEquals(TEST_MESSAGE, 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.