Package com.sun.sgs.service

Examples of com.sun.sgs.service.DataService.markForUpdate()


     * 3} Finally, sends out a 'serviceEventQueue' request to the new
     * coordinator to restart this channel's event processing.
     */
    private void reassignCoordinator(long failedCoordNodeId) {
  DataService dataService = getDataService();
  dataService.markForUpdate(this);
  if (coordNodeId != failedCoordNodeId) {
      logger.log(
    Level.SEVERE,
    "attempt to reassign coordinator:{0} for channel:{1} " +
    "that is not the failed node:{2}",
View Full Code Here


               channelDelivery);
        }
          } },
      nodeId);
    }
    dataService.markForUpdate(this);
    sendRefresh = false;
      }

      /*
       * Process channel events.  If the 'serviceAllEvents' flag is
View Full Code Here

    }

                logger.log(Level.FINEST, "processing event:{0}", event);
                int cost = event.getCost();
    if (cost > 0) {
        dataService.markForUpdate(this);
        writeBufferAvailable += cost;

        if (logger.isLoggable(Level.FINEST)) {
            logger.log(Level.FINEST,
           "{0} cleared reservation of " +
View Full Code Here

    logger.log(Level.FINEST, "processing event:{0}", event);

                int cost = event.getCost();
    if (cost > 0) {
        dataService.markForUpdate(this);
        writeBufferAvailable += cost;
        if (logger.isLoggable(Level.FINEST)) {
            logger.log(Level.FINEST,
           "{0} cleared reservation of " +
           "{1,number,#} bytes, leaving {2,number,#}",
View Full Code Here

    state = (State) dataService.getServiceBinding(name);
      } catch (NameNotBoundException e) {
    state = new State(0);
    dataService.setServiceBinding(name, state);
      }
      dataService.markForUpdate(state);
      firstId = state.lastId + 1;
      lastId = state.reserve(blockSize);
  }
    }
View Full Code Here

      throw new IllegalArgumentException(
    "newNodeId:" + newNodeId + " must match the local node ID:" +
    sessionService.getLocalNodeId());
  }
  DataService dataService = sessionService.getDataService();
  dataService.markForUpdate(this);
  dataService.removeServiceBinding(getSessionNodeKey());
  nodeId = newNodeId;
  // TBD: this could use a BindingKeyedMap.
  dataService.setServiceBinding(getSessionNodeKey(), this);
    }
View Full Code Here

    logger.log(Level.FINEST, "processing event:{0}", event);

                int cost = event.getCost();
    if (cost > 0) {
        // TBD: this update is costly.
        dataService.markForUpdate(this);
        writeBufferAvailable += cost;
        if (logger.isLoggable(Level.FINEST)) {
            logger.log(Level.FINEST,
           "{0} cleared reservation of " +
           "{1,number,#} bytes, leaving {2,number,#}",
View Full Code Here

                            Counters counters =
                                (Counters) service.getBinding("counters");
                            for (int i = 0; i < items; i++) {
                                Counter counter = counters.get(i);
                                if ( i < modifyItems) {
                                    service.markForUpdate(counter);
                                    counter.next();
                                }
                            }
                        }}, taskOwner);
            }
View Full Code Here

  /*
   * Assign a new coordinator, and store event queue in new
   * coordinator's event queue map.
   */
  dataService.markForUpdate(this);
  coordNodeId = chooseCoordinatorNode();
  isCoordinatorReassigned = true;
  if (logger.isLoggable(Level.FINER)) {
      logger.log(
    Level.FINER,
View Full Code Here

      throw new IllegalArgumentException(
    "newNodeId:" + newNodeId + " must match the local node ID:" +
    sessionService.getLocalNodeId());
  }
  DataService dataService = sessionService.getDataService();
  dataService.markForUpdate(this);
  dataService.removeServiceBinding(getSessionNodeKey());
  nodeId = newNodeId;
  // TBD: this could use a BindingKeyedMap.
  dataService.setServiceBinding(getSessionNodeKey(), this);
    }
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.