Examples of Shutdown


Examples of net.tomp2p.p2p.Shutdown

    private List<ResponsibilityListener> responsibilityListeners = null;
   
    public IndirectReplication(PeerDHT peer) {
      this.peer = peer;

    peer.peer().addShutdownListener(new Shutdown() {
      @Override
      public BaseFuture shutdown() {
        IndirectReplication.this.shutdown();
        return new FutureDone<Void>().done();
      }
View Full Code Here

Examples of net.tomp2p.p2p.Shutdown

    return null;
  }

  private DistributedRelay startSetupRelay(FutureRelay futureRelay) {
    // close the relay connection when the peer is shutdown
    peer.addShutdownListener(new Shutdown() {
      @Override
      public BaseFuture shutdown() {
        return distributedRelay.shutdown();
      }
    });
View Full Code Here

Examples of net.tomp2p.p2p.Shutdown

      DistributedRelay distributedRelay) {
    final PeerMapUpdateTask peerMapUpdateTask = new PeerMapUpdateTask(relayRPC, bootstrapBuilder, distributedRelay,
        manualRelays, maxFail);
    peer.connectionBean().timer().scheduleAtFixedRate(peerMapUpdateTask, 0, peerMapUpdateInterval(), TimeUnit.SECONDS);

    final Shutdown shutdown = new Shutdown() {
      @Override
      public BaseFuture shutdown() {
        peerMapUpdateTask.cancel();
        return new FutureDone<Void>().done();
      }
    };
    peer.addShutdownListener(shutdown);

    return new Shutdown() {
      @Override
      public BaseFuture shutdown() {
        peerMapUpdateTask.cancel();
        peer.removeShutdownListener(shutdown);
        return new FutureDone<Void>().done();
View Full Code Here

Examples of net.tomp2p.p2p.Shutdown

                futureBootstrapNAT.futureBootstrap1(futureBootstrap);
                futureBootstrap.addListener(new BaseFutureAdapter<FutureBootstrap>() {
                  @Override
                  public void operationComplete(FutureBootstrap future) throws Exception {
                    if (future.isSuccess()) {
                      Shutdown shutdown = startRelayMaintenance(futureRelay, bootstrapBuilder, distributedRelay);
                      futureBootstrapNAT.done(shutdown);
                    } else {
                      futureBootstrapNAT.failed("2nd FutureBootstrap failed", future);
                    }
                  }
View Full Code Here

Examples of net.tomp2p.p2p.Shutdown

   
    if (peerMapUpdateInterval == -1) {
      peerMapUpdateInterval = relayType.defaultMapUpdateInterval();
    }
   
    peer.addShutdownListener(new Shutdown() {
      @Override
      public BaseFuture shutdown() {
        natUtils.shutdown();
        return new FutureDone<Void>().done();
      }
View Full Code Here

Examples of net.tomp2p.p2p.Shutdown

    synchronized (lock) {
      if (!completedAndNotify()) {
        return;
      }
      this.type = FutureType.OK;
      this.shutdown = new Shutdown() {
        @Override
        public BaseFuture shutdown() {
          return FutureRelayNAT.this;
        }
      };
View Full Code Here

Examples of net.tomp2p.p2p.Shutdown

    DistributedTracker distributedTracker = new DistributedTracker(peer.peerBean(), peer.distributedRouting(),
            trackerRPC, trackerStorage);

    final PeerTracker peerTracker = new PeerTracker(peer, scheduledFuture, trackerRPC, trackerStorage,
            peerExchange, distributedTracker);
    peer.addShutdownListener(new Shutdown() {
      @Override
      public BaseFuture shutdown() {
        peerTracker.shutdown();
        return new FutureDone<Void>().done();
      }
View Full Code Here

Examples of net.xeoh.plugins.base.annotations.events.Shutdown

        for (final Method method : methods) {
            log("callshutdown/method", new OptionInfo("method", method.getName()));       

            // Init methods will be marked by the corresponding annotation.
            final Shutdown annotation = method.getAnnotation(Shutdown.class);
            if (annotation != null) {
                log("callshutdown/method/shutdownannotation", new OptionInfo("method", method.getName()));       

                try {
                    method.invoke(plugin, new Object[0]);
View Full Code Here

Examples of net.xeoh.plugins.base.annotations.events.Shutdown

        for (final Method method : methods) {
            this.logger.finest("Processing method " + method);

            // Init methods will be marked by the corresponding annotation.
            final Shutdown annotation = method.getAnnotation(Shutdown.class);
            if (annotation != null) {
                this.logger.finer("Annotation found on method " + method);

                try {
                    method.invoke(plugin, new Object[0]);
View Full Code Here

Examples of org.apache.qpid.server.jmx.mbeans.Shutdown

                            _objectRegistry);
                    _children.put(authenticationProvider, mbean);
                }
            }
        }
        new Shutdown(_objectRegistry);
        new ServerInformationMBean(_objectRegistry, broker);
        if (LoggingManagementFacade.getCurrentInstance() != null)
        {
            new LoggingManagementMBean(LoggingManagementFacade.getCurrentInstance(), _objectRegistry);
        }
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.