Examples of markForUpdate()


Examples of com.sun.sgs.app.DataManager.markForUpdate()

                    ScalableHashMap<K, V> child = ref.get();
        /*
         * Clear the parent reference so we don't walk up to the
         * root node, which is being reused.
         */
        dm.markForUpdate(child);
        child.parentRef = null;
        if (lastRef == null) {
      currentNodeRef = ref;
        } else {
      nodeRefs.add(ref);
View Full Code Here

Examples of com.sun.sgs.app.DataManager.markForUpdate()

  }

  /** Removes some entries, returning true if there is more to do. */
  private boolean doWork() {
      DataManager dataManager = AppContext.getDataManager();
      dataManager.markForUpdate(this);
            ScalableHashMap<K, V> node = currentNodeRef.get();
      /* Find the leaf node */
      if (!node.isLeafNode()) {
    while (true) {
        currentNodeRef =
View Full Code Here

Examples of com.sun.sgs.app.DataManager.markForUpdate()

    }
    valueRef = dm.createReference(newValue);
      } else if (isKeyValuePair()) {
                ManagedSerializable<KeyValuePair<K, V>> msPair =
        uncheckedCast(keyOrPairRef.get());
                dm.markForUpdate(msPair);
    msPair.get().setValue(newValue);
      } else if (isKeyWrapped()) {
    /* Switch from wrapping key to wrapping key/value pair */
    ManagedSerializable<K> msKey =
        uncheckedCast(keyOrPairRef.get());
View Full Code Here

Examples of com.sun.sgs.app.DataManager.markForUpdate()

    /* Switch from wrapping key to wrapping key/value pair */
    ManagedSerializable<K> msKey =
        uncheckedCast(keyOrPairRef.get());
                ManagedSerializable<KeyValuePair<K, V>> msPair =
        uncheckedCast(keyOrPairRef.get());
                dm.markForUpdate(msPair);
                msPair.set(new KeyValuePair<K, V>(msKey.get(), newValue));
    if (isValueWrapped()) {
        dm.removeObject(valueRef.get());
    }
    setKeyValuePair();
View Full Code Here

Examples of com.sun.sgs.app.DataManager.markForUpdate()

        // NOTE: we can't directly save the item in the list, or
        // we'll end up with a local copy of the item. Instead, we
        // must save a ManagedReference to the item.

        DataManager dataManager = AppContext.getDataManager();
        dataManager.markForUpdate(this);

        return items.add(dataManager.createReference(item));
    }

    /**
 
View Full Code Here

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

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

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

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

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

    }

                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

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

    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

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

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