Package com.sun.sgs.auth

Examples of com.sun.sgs.auth.Identity


  KernelRunnable task, Identity ownerIdentity)
    {
  // TBD: this check is done because there are known cases where the
  // identity can be null, but when the Handler code changes to ensure
  // that the identity is always valid, this check can be removed
  Identity owner = (ownerIdentity == null ? taskOwner : ownerIdentity);
        taskScheduler.scheduleTask(task, owner);
    }
View Full Code Here


        if (shuttingDown()) {
            throw new IllegalStateException("Service is shutdown");
        }

        // persist the task regardless of where it will ultimately run
        Identity owner = getTaskOwner(task);
        TaskRunner runner = getRunner(task, owner, startTime, PERIOD_NONE);

        // check where the owner is active to get the task running
        if (!isMappedLocally(owner)) {
            if (handoffTask(generateObjName(owner, runner.getObjId()), owner)) {
View Full Code Here

            logger.log(Level.FINEST, "scheduling a periodic task starting " +
                       "at {0}", startTime);
        }

        // persist the task regardless of where it will ultimately run
        Identity owner = getTaskOwner(task);
        TaskRunner runner = getRunner(task, owner, startTime, period);
        BigInteger objId = runner.getObjId();

        // check where the owner is active to get the task running
        if (!isMappedLocally(owner)) {
View Full Code Here

        if (shuttingDown()) {
            throw new IllegalStateException("Service is shutdown");
        }
        serviceStats.scheduleNDTaskOp.report();

        Identity owner = getTaskOwner(task);
        scheduleTask(new NonDurableTask(task, owner, transactional), owner,
                     START_NOW, false);
    }
View Full Code Here

        if (shuttingDown()) {
            throw new IllegalStateException("Service is shutdown");
        }
        serviceStats.scheduleNDTaskDelayedOp.report();

        Identity owner = getTaskOwner(task);
        scheduleTask(new NonDurableTask(task, owner, transactional), owner,
                     System.currentTimeMillis() + delay, false);
    }
View Full Code Here

            return;
        }

        // check that the task is supposed to run here, or if not, that
        // we were able to hand it off
        Identity identity = ptask.getIdentity();
        if (!isMappedLocally(identity)) {
            // if we handed off the task, we're done
            if (handoffTask(objName, identity)) {
                return;
            }
View Full Code Here

            if (taskDetail.isRecurring()) {
                taskDetail.startTime += taskDetail.period;
            }

            // store the current owner, and then push the new thread detail
            Identity parent = ContextResolver.getCurrentOwner();
            ContextResolver.setTaskState(kernelContext, taskDetail.owner);

            try {
                taskDetail.task.run();
                profileCollectorHandle.finishTask(1);
View Full Code Here

                    RemoveInfo info = removeQueue.peek();
                    if (info != null && info.getTimeInserted() < time) {
                        // Always remove the item from the list, even if we
                        // get an exception.  Otherwise, we can loop forever.
                        info = removeQueue.poll();
                        Identity id = info.getIdentity();
                        RemoveTask rtask = new RemoveTask(id);
                        try {
                            runTransactionally(rtask);
                            if (rtask.idRemoved()) {
                                notifyListeners(rtask.getNode(), null, id);
View Full Code Here

                    runTransactionally(task);
                    done = task.done();
               
                    // Move it, removing old mapping
                    if (!done) {
                        Identity id = task.getId().getIdentity();
                        try {
                            mapToNewNode(id, null, node,
                                         NodeAssignPolicy.SERVER_NODE);
                        } catch (NoNodesAvailableException e) {
                            // This can be thrown from mapToNewNode if there are
View Full Code Here

                    server.runTransactionally(task);
                    IdentityMO idmo = task.getId();
                    // idmo could be null if no identities are assigned
                    // to the node
                    if (idmo != null) {
                        Identity idToMove = idmo.getIdentity();
                        Node node = task.getNode();
                        try {
                            long newnode =
                                server.mapToNewNode(idToMove, null, node,
                                                 NodeAssignPolicy.SERVER_NODE);
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.