Package com.sun.sgs.impl.util

Examples of com.sun.sgs.impl.util.AbstractKernelRunnable


            logger.log(Level.FINE, "LPA driver enabled");
            if (graphBuilder != null) {
                graphBuilder.enable();
                if (graphBuilder.getAffinityGroupFinder() != null) {
                    updateTask = taskScheduler.scheduleRecurringTask(
                                    new AbstractKernelRunnable("UpdateTask") {
                                            public void run() {
                                                findGroups();
                                            } },
                                    taskOwner,
                                    System.currentTimeMillis() + updatePeriod,
View Full Code Here


      // Add client 'relocate' notification to the task queue to
      // ensure that all previous requests sent before the client
      // was suspended are processed before relocation.
      taskQueue.addTask(
    new AbstractKernelRunnable("NotifySessionRelocate") {
        public void run() {
      try {
          ((SessionRelocationProtocol) protocol).relocate(
         descriptors, ByteBuffer.wrap(key),
        new RelocateCompletionHandler());
View Full Code Here

        /*
         * Check service version.
         */
        transactionScheduler.runTask(
      new AbstractKernelRunnable("CheckServiceVersion") {
                public void run() {
                    checkServiceVersion(
                        NodeMapUtil.VERSION_KEY,
                        NodeMapUtil.MAJOR_VERSION,
                        NodeMapUtil.MINOR_VERSION);
View Full Code Here

  /*
   * Check service version.
   */
  transactionScheduler.runTask(
      new AbstractKernelRunnable("CheckServiceVersion") {
    public void run() {
        checkServiceVersion(
      VERSION_KEY, MAJOR_VERSION, MINOR_VERSION);
    } },  taskOwner);
 
View Full Code Here

  // Mark all nodes failed and notify all clients (except local one)
  // of failure.
  final Collection<NodeImpl> failedNodes = aliveNodes.values();
  try {
      transactionScheduler.runTask(
        new AbstractKernelRunnable("MarkAllNodesFailed") {
    public void run() {
        for (NodeImpl node : failedNodes) {
      node.setFailed(dataService, null);
        }
    } }, taskOwner);
View Full Code Here

            }
           
      // Persist node
      try {
    transactionScheduler.runTask(
      new AbstractKernelRunnable("StoreNewNode") {
        public void run() {
      node.putNode(dataService);
        } }, taskOwner);
      } catch (Exception e) {
                aliveNodes.remove(nodeId);
View Full Code Here

      try {
    // TBD: should the node be removed if the current
    // backup ID for the node with the given node ID
    // is not the given backup ID?
    transactionScheduler.runTask(
      new AbstractKernelRunnable("RemoveRecoveredNode") {
        public void run() {
      NodeImpl.removeNode(dataService,  nodeId);
        } }, taskOwner);
      } catch (Exception e) {
    logger.logThrow(
View Full Code Here

        } else {

            // persist the change
            try {
                transactionScheduler.runTask(
                    new AbstractKernelRunnable("SetNodeHealth") {
                        public void run() {
                            node.setHealth(dataService, health);
                        } }, taskOwner);
            } catch (Exception e) {
                logger.logThrow(Level.SEVERE, e,
View Full Code Here

   * Persists node and backup status updates in data service.
   */
  private void assignBackup(final NodeImpl node, final NodeImpl backup) {
      try {
    transactionScheduler.runTask(
        new AbstractKernelRunnable("SetNodeFailed") {
      public void run() {
          node.setFailed(dataService, backup);
          if (backup != null) {
        backup.addPrimary(dataService, node.getId());
          }
View Full Code Here

    // Management support
    private NodeInfo[] getAllNodeInfo() {
        final Set<NodeInfo> nodes = new HashSet<NodeInfo>();
        try {
            transactionScheduler.runTask(
                new AbstractKernelRunnable("GetNodeInfo") {
                    public void run() {
                        Iterator<Node> iter = NodeImpl.getNodes(dataService);
                        while (iter.hasNext()) {
                            NodeImpl node = (NodeImpl) iter.next();
                            nodes.add(node.getNodeInfo());
View Full Code Here

TOP

Related Classes of com.sun.sgs.impl.util.AbstractKernelRunnable

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.