Package java.util

Examples of java.util.UUID$Holder



    public void testCreateAndRemoveObject() throws Exception
    {
        _store.configureConfigStore(_virtualHost, _recoveryHandler);
        final UUID queueId = new UUID(0, 1);
        final String queueType = Queue.class.getSimpleName();
        Map<String,Object> queueAttr = Collections.singletonMap("name", (Object) "q1");

        _store.create(queueId, queueType, queueAttr);
View Full Code Here


    }

    public void testTwoObjectsWithSameId() throws Exception
    {
        _store.configureConfigStore(_virtualHost, _recoveryHandler);
        final UUID id = UUID.randomUUID();
        _store.create(id, "Queue", Collections.<String, Object>emptyMap());
        try
        {
            _store.create(id, "Exchange", Collections.<String, Object>emptyMap());
            fail("Should not be able to create two objects with same id");
View Full Code Here


    public void testChangeTypeOfObject() throws Exception
    {
        _store.configureConfigStore(_virtualHost, _recoveryHandler);
        final UUID id = UUID.randomUUID();
        _store.create(id, "Queue", Collections.<String, Object>emptyMap());
        _store.close();
        _store.configureConfigStore(_virtualHost, _recoveryHandler);

        try
View Full Code Here

    public void testCreatedNestedObjects() throws Exception
    {

        _store.configureConfigStore(_virtualHost, _recoveryHandler);
        final UUID queueId = new UUID(0, 1);
        final UUID queue2Id = new UUID(1, 1);

        final Map<String, Object> EMPTY_ATTR = Collections.emptyMap();
        final UUID exchangeId = new UUID(0, 2);
        final Map<String, Object> bindingAttributes = new HashMap<String, Object>();
        bindingAttributes.put(Binding.EXCHANGE, exchangeId);
        bindingAttributes.put(Binding.QUEUE, queueId);
        final Map<String, Object> binding2Attributes = new HashMap<String, Object>();
        binding2Attributes.put(Binding.EXCHANGE, exchangeId);
        binding2Attributes.put(Binding.QUEUE, queue2Id);

        final UUID bindingId = new UUID(0, 3);
        final UUID binding2Id = new UUID(1, 3);

        _store.create(queueId, "Queue", EMPTY_ATTR);
        _store.create(queue2Id, "Queue", EMPTY_ATTR);
        _store.create(exchangeId, "Exchange", EMPTY_ATTR);
        _store.update(true,
View Full Code Here

        verify(_recoveryHandler).configuredObject(eq(_queueId), eq(QUEUE), eq(queueAttributes));
    }

    private Exchange createTestAlternateExchange()
    {
        UUID exchUuid = UUID.randomUUID();
        Exchange alternateExchange = mock(Exchange.class);
        when(alternateExchange.getId()).thenReturn(exchUuid);
        return alternateExchange;
    }
View Full Code Here

        verify(_dtxRecordRecoveryHandler, times(1)).dtxRecord(1l, globalId, branchId, enqueues, dequeues);
    }

    private Record getTestRecord(long messageNumber)
    {
        UUID queueId1 = UUIDGenerator.generateRandomUUID();
        TransactionLogResource queue1 = mock(TransactionLogResource.class);
        when(queue1.getId()).thenReturn(queueId1);
        EnqueableMessage message1 = mock(EnqueableMessage.class);
        when(message1.isPersistent()).thenReturn(true);
        when(message1.getMessageNumber()).thenReturn(messageNumber);
View Full Code Here

    public void testRemove()
    {
        Map<String, Object> virtualHostAttributes = new HashMap<String, Object>();
        virtualHostAttributes.put(VirtualHost.NAME, getName());
        virtualHostAttributes.put(VirtualHost.CONFIG_PATH, "/path/to/phantom/virtualhost/config");
        UUID virtualHostId = UUID.randomUUID();
        addConfiguration(virtualHostId, VirtualHost.class.getSimpleName(), virtualHostAttributes);

        assertNotNull("Virtual host with id " + virtualHostId + " should exist", _store.getEntry(virtualHostId));

        _store.remove(virtualHostId);
View Full Code Here

    public void testRemoveMultipleEntries()
    {
        Map<String, Object> virtualHost1Attributes = new HashMap<String, Object>();
        virtualHost1Attributes.put(VirtualHost.NAME, "test1");
        virtualHost1Attributes.put(VirtualHost.CONFIG_PATH, "/path/to/phantom/virtualhost/config1");
        UUID virtualHost1Id = UUID.randomUUID();
        addConfiguration(virtualHost1Id, VirtualHost.class.getSimpleName(), virtualHost1Attributes);

        Map<String, Object> virtualHost2Attributes = new HashMap<String, Object>();
        virtualHost2Attributes.put(VirtualHost.NAME, "test1");
        virtualHost2Attributes.put(VirtualHost.CONFIG_PATH, "/path/to/phantom/virtualhost/config2");
        UUID virtualHost2Id = UUID.randomUUID();
        addConfiguration(virtualHost2Id, VirtualHost.class.getSimpleName(), virtualHost2Attributes);

        assertNotNull("Virtual host with id " + virtualHost1Id + " should exist", _store.getEntry(virtualHost1Id));
        assertNotNull("Virtual host with id " + virtualHost2Id + " should exist", _store.getEntry(virtualHost2Id));
View Full Code Here

    public void testSaveNewVirtualHost()
    {
        Map<String, Object> virtualHostAttributes = new HashMap<String, Object>();
        virtualHostAttributes.put(VirtualHost.NAME, "test1");
        virtualHostAttributes.put(VirtualHost.CONFIG_PATH, "/path/to/phantom/virtualhost/config1");
        UUID virtualHostId = UUID.randomUUID();
        ConfigurationEntry hostEntry = new ConfigurationEntry(virtualHostId, VirtualHost.class.getSimpleName(), virtualHostAttributes,
                Collections.<UUID> emptySet(), _store);

        _store.save(hostEntry);
View Full Code Here

        assertEquals("Unexpected virtual host children found", updatedEntry.getChildrenIds(), newHostEntry.getChildrenIds());
    }

    public void testSaveNewAuthenticationProvider()
    {
        UUID authenticationProviderId = UUID.randomUUID();
        Map<String, Object> authenticationProviderAttributes = new HashMap<String, Object>();
        authenticationProviderAttributes.put(AuthenticationProvider.NAME, "authenticationProvider1");
        authenticationProviderAttributes.put(AuthenticationManagerFactory.ATTRIBUTE_TYPE, ExternalAuthenticationManager.class.getSimpleName());
        ConfigurationEntry providerEntry = new ConfigurationEntry(authenticationProviderId, AuthenticationProvider.class.getSimpleName(),
                authenticationProviderAttributes, Collections.<UUID> emptySet(), _store);
View Full Code Here

TOP

Related Classes of java.util.UUID$Holder

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.