Package com.sun.sgs.impl.util

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


        nodeId);
      }
     
      channelService.addChannelTask(
    channelRefId,
    new AbstractKernelRunnable("NotifyChannelClosed") {
        public void run() {
      channelService.closedChannel(channelRefId);
        } });
  }
View Full Code Here


    // Forward unreliable message directly to client session's
    // server node.
    final ClientSessionServer server =
        sessionService.getClientSessionServer(nodeId);
    sessionService.taskService.scheduleNonDurableTask(
        new AbstractKernelRunnable("SendUnreliableMessage") {
            public void run() {
          try {
        server.send(idBytes, msgBytes, (byte)
              delivery.ordinal());
          } catch (IOException e) {
View Full Code Here

      Level.WARNING, e,
      "invoking disconnected callback on listener:{0} " +
      "for session:{1} throws",
      listener, this);
        sessionService.scheduleTask(
      new AbstractKernelRunnable(
          "NotifyListenerAndRemoveSession")
      {
          public void run() {
        ClientSessionImpl sessionImpl =
            ClientSessionImpl.getSession(
View Full Code Here

     * error here.
     */
    return;
      }
      sessionService.scheduleNonTransactionalTask(
          new AbstractKernelRunnable("ServiceEventQueue") {
        public void run() {
      sessionService.runIoTask(
          new IoRunnable() {
        public void run() throws IOException {
            sessionServer.serviceEventQueue(idBytes);
View Full Code Here

      contextFactory = new ContextFactory(contextMap);
      synchronized (stateLock) {
    state = State.RUNNING;
      }
      systemRegistry.getComponent(TransactionScheduler.class).runTask(
        new AbstractKernelRunnable("BindDataServiceHeader") {
      public void run() {
          DataServiceHeader header;
          try {
        header = (DataServiceHeader)
            getServiceBinding(CLASSNAME + ".header");
View Full Code Here

      localNodeId = watchdogService.getLocalNodeId();
      watchdogService.addRecoveryListener(
    new ClientSessionServiceRecoveryListener());
     
      transactionScheduler.runTask(
    new AbstractKernelRunnable("CheckServiceVersion") {
        public void run() {
      checkServiceVersion(
          VERSION_KEY, MAJOR_VERSION, MINOR_VERSION);
        } },  taskOwner);
     
      /* Store the ClientSessionServer proxy in the data store. */
      transactionScheduler.runTask(
    new AbstractKernelRunnable("StoreClientSessionServiceProxy") {
        public void run() {
      dataService.setServiceBinding(
          getClientSessionServerKey(localNodeId),
          new ManagedSerializable<ClientSessionServer>(
        serverProxy));
View Full Code Here

      }
      throw e;
  }
 
  transactionScheduler.runTask(
            new AbstractKernelRunnable("AddProtocolDescriptorMapping") {
    public void run() {
        getProtocolDescriptorsMap().
      put(localNodeId,
          Collections.singleton(
        protocolAcceptor.getDescriptor()));
View Full Code Here

    /**
     * Schedules an asynchronous task to resume reading.
     */
    protected void scheduleReadOnReadHandler() {
  acceptor.scheduleNonTransactionalTask(
      new AbstractKernelRunnable("ResumeReadOnReadHandler") {
    public void run() {
        logger.log(
      Level.FINER, "resuming reads protocol:{0}", this);
        if (isOpen()) {
      readHandler.read();
View Full Code Here

        if (taskQueue == null) {
      taskQueue = newTaskQueue;
        }
    }
    taskQueue.addTask(
      new AbstractKernelRunnable("ServiceEventQueue") {
        public void run() {
      ClientSessionImpl.serviceEventQueue(sessionId);
        } }, taskOwner);
      } finally {
    callFinished();
View Full Code Here

    /*
     * Schedule persistent tasks to perform recovery.
     */
    transactionScheduler.runTask(
        new AbstractKernelRunnable("ScheduleRecoveryTasks") {
      public void run() {
          /*
           * For each session on the failed node, notify
           * the session's ClientSessionListener and
           * clean up the session's persistent data and
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.