Package com.sun.sgs.impl.util

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


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

View Full Code Here


    private void notifyNodeListeners(final Node node) {

  for (NodeListener listener : nodeListeners.keySet()) {
      final NodeListener nodeListener = listener;
      taskScheduler.scheduleTask(
    new AbstractKernelRunnable("NotifyNodeListeners") {
        public void run() {
      if (!shuttingDown() &&
                            isLocalNodeAliveNonTransactional())
      {
          if (node.isAlive()) {
View Full Code Here

      final RecoveryListener recoveryListener = listener;
      final RecoveryCompleteFuture future =
    new RecoveryCompleteFutureImpl(node, listener);
      futureQueue.add(future);
      taskScheduler.scheduleTask(
    new AbstractKernelRunnable("NotifyRecoveryListeners") {
        public void run() {
      try {
          if (!shuttingDown() &&
        isLocalNodeAliveNonTransactional())
          {
View Full Code Here

      final long coord = coordNodeId;
      final ChannelServiceImpl channelService =
    ChannelServiceImpl.getChannelService();
      final BigInteger channelRefId = eventQueue.getChannelRefId();
      channelService.getTaskService().scheduleNonDurableTask(
          new AbstractKernelRunnable("SendServiceEventQueue") {
      public void run() {
          channelService.runIoTask(
       new IoRunnable() {
        public void run() throws IOException {
            coordinator.serviceEventQueue(channelRefId);
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

   * 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.