Examples of IdentityImpl


Examples of com.sun.sgs.impl.auth.IdentityImpl

        addNodes(null);
       
        final int MAX = 25;
        Identity ids[] = new Identity[MAX];
        for (int i = 0; i < MAX; i++) {
            ids[i] = new IdentityImpl("identity" + i);        
            nodeMappingService.assignNode(NodeMappingService.class, ids[i]);
               
            verifyMapCorrect(ids[i]);
        }
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

        watchdogService.reportHealth(
                                serverNode.getDataService().getLocalNodeId(),
                                Health.YELLOW, "A");

        long nodeId = nodeMappingService.assignNode(NodeMappingService.class,
                                                    new IdentityImpl("first"));

        if (nodeId >= 0) {
            fail("Expected assignNode to fail (-1), got: " + nodeId);
        }
    }
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

        addNodes(null);

        Map<Identity, Long> idMap = new HashMap<Identity, Long>();
        // Assign an identity on each of our nodes
        for (int i = 0; i < NUM_NODES; i++) {
            Identity id = new IdentityImpl("Identity" + i);
            additionalNodes[i].getNodeMappingService().
                                        assignNode(DataService.class, id);
            idMap.put(id, additionalNodes[i].getNodeId());
        }
       
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

    @Test (expected = IllegalStateException.class)
    public void testAssignNodeInTransaction() throws Exception {
        txnScheduler.runTask(new TestAbstractKernelRunnable() {
            public void run() {
                nodeMappingService.assignNode(NodeMappingService.class,
                                              new IdentityImpl("first"));
            }
        }, taskOwner);
    }
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

    @Test(expected = UnknownIdentityException.class)
    public void testGetNodeBadIdentity() throws Exception {
        txnScheduler.runTask(
                new TestAbstractKernelRunnable() {
                    public void run() throws Exception {
                        nodeMappingService.getNode(new IdentityImpl("first"));
                    }
            }, taskOwner);
    }
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

            }, taskOwner);
    }
  
    @Test
    public void testGetNode() {
        final Identity id = new IdentityImpl("first");
        nodeMappingService.assignNode(NodeMappingService.class, id);
        try {
            txnScheduler.runTask(
                    new TestAbstractKernelRunnable() {
                        public void run() throws Exception {
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

    // and that any caching of identities in transaction works.
    @Test
    public void testGetNodeMultiple() throws Exception {
        // A better test would have another thread racing to change
        // the identity.
        Identity id = new IdentityImpl("first");
        nodeMappingService.assignNode(NodeMappingService.class, id);
       
        GetNodeTask task = new GetNodeTask(id);
        txnScheduler.runTask(task, taskOwner);
        Node node1 = task.getNode();
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

            }, taskOwner);
    }
  
    @Test
    public void testGetIdentities() throws Exception {
        final Identity id1 = new IdentityImpl("first");
        nodeMappingService.assignNode(NodeMappingService.class, id1);

        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
                public void run() throws Exception {
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

        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]);
        }
           
        Set<Node> nodeset = new HashSet<Node>();
        Node nodes[] = new Node[MAX];
View Full Code Here

Examples of com.sun.sgs.impl.auth.IdentityImpl

    }
   
    /* -- Test setStatus -- */
    @Test(expected = NullPointerException.class)
    public void testSetStatusNullService() throws Exception {
        nodeMappingService.setStatus(null, new IdentityImpl("first"), true);
    }
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.