Package com.sun.sgs.auth

Examples of com.sun.sgs.auth.Identity


    @Test
    public void testGetIdentitiesMultiple() throws Exception {
        addNodes(null);
       
        final int MAX = 8;
        Identity ids[] = new Identity[MAX];
        for (int i = 0; i < MAX; i++ ) {
            ids[i] = new IdentityImpl("dummy" + i);
            nodeMappingService.assignNode(NodeMappingService.class, ids[i]);
        }
           
View Full Code Here


        }, taskOwner);
    }
   
    @Test
    public void testSetStatusRemove() throws Exception {
        Identity id = new IdentityImpl("first");
        nodeMappingService.assignNode(NodeMappingService.class, id);
        GetNodeTask task = new GetNodeTask(id);
        txnScheduler.runTask(task, taskOwner);
        Node node = task.getNode();
       
View Full Code Here

        }
    }
   
    @Test
    public void testSetStatusMultRemove() throws Exception {
        Identity id = new IdentityImpl("first");
        nodeMappingService.assignNode(NodeMappingService.class, id);
        GetNodeTask task = new GetNodeTask(id);
        txnScheduler.runTask(task, taskOwner);
        Node node = task.getNode();
       
View Full Code Here

     * Regression test for sgs-server issue #140, node mapping server
     * is logging at too high a level in a particular scenario.
     */
    @Test
    public void testSetStatusQuickMultRemove() throws Exception
        Identity id = new IdentityImpl("something");
        nodeMappingService.assignNode(NodeMappingService.class, id);
        GetNodeTask task = new GetNodeTask(id);
        txnScheduler.runTask(task, taskOwner);
        Node node = task.getNode();
       
View Full Code Here

        }
    }
       
    @Test
    public void testSetStatusNoRemove() throws Exception {
        Identity id = new IdentityImpl("first");
        nodeMappingService.assignNode(NodeMappingService.class, id);
        GetNodeTask task = new GetNodeTask(id);
        try {
            txnScheduler.runTask(task, taskOwner);
        } catch (UnknownIdentityException e) {
View Full Code Here

    @Test
    public void testListenersOnMove() throws Exception {  
        // We need some additional nodes for this test to work correctly.
        addNodes(null);
       
        Identity id = new IdentityImpl("first");
        nodeMappingService.assignNode(NodeMappingService.class, id);

        GetNodeTask task = new GetNodeTask(id);
        txnScheduler.runTask(task, taskOwner);
        Node firstNode = task.getNode();
View Full Code Here

        // Add id relocation listeners to each node, and keep a map of them.
        Map<Long, TestRelocationListener> moveMap =
                new HashMap<Long, TestRelocationListener>();
        addRelocationListeners(false, moveMap);

        Identity id = new IdentityImpl("first");
        nodeMappingService.assignNode(NodeMappingService.class, id);

        GetNodeTask task = new GetNodeTask(id);
        txnScheduler.runTask(task, taskOwner);
        Node firstNode = task.getNode();
View Full Code Here

        // Add id relocation listeners to each node, and keep a map of them.
        Map<Long, TestRelocationListener> moveMap =
                new HashMap<Long, TestRelocationListener>();
        addRelocationListeners(true, moveMap);

        Identity id = new IdentityImpl("first");
        nodeMappingService.assignNode(NodeMappingService.class, id);

        GetNodeTask task = new GetNodeTask(id);
        txnScheduler.runTask(task, taskOwner);;
        long firstNodeId = task.getNodeId();
View Full Code Here

        // Add id relocation listeners to each node, and keep a map of them.
        Map<Long, TestRelocationListener> moveMap =
                new HashMap<Long, TestRelocationListener>();
        addRelocationListeners(true, moveMap);

        Identity id = new IdentityImpl("first");
        nodeMappingService.assignNode(NodeMappingService.class, id);

        GetNodeTask task = new GetNodeTask(id);
        txnScheduler.runTask(task, taskOwner);;
        long firstNodeId = task.getNodeId();
View Full Code Here

        // Add id relocation listeners to each node, and keep a map of them.
        Map<Long, TestRelocationListener> moveMap =
                new HashMap<Long, TestRelocationListener>();
        addRelocationListeners(true, moveMap);

        Identity id = new IdentityImpl("first");
        nodeMappingService.assignNode(NodeMappingService.class, id);

        GetNodeTask task = new GetNodeTask(id);
        txnScheduler.runTask(task, taskOwner);;
        long firstNodeId = task.getNodeId();
View Full Code Here

TOP

Related Classes of com.sun.sgs.auth.Identity

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.