Package net.tomp2p.p2p

Examples of net.tomp2p.p2p.VotingSchemeDHT


    /**
     * Default constructor.
     */
    public FutureDigest(final DHTBuilder<?> builder) {
        this(builder, 0, new VotingSchemeDHT());
    }
View Full Code Here


                contentKeys = new ArrayList<Number160>(1);
                contentKeys.add(contentKey);
            }
        }
        if (evaluationScheme == null) {
            evaluationScheme = new VotingSchemeDHT();
        }
    if (isGetLatest) {
      if (contentKey == null) {
        throw new IllegalArgumentException("Content key must be set.");
      }
View Full Code Here

   
    /**
     * Default constructor.
     */
    public FutureRemove(final DHTBuilder<?> builder) {
        this(builder, new VotingSchemeDHT());
    }
View Full Code Here

    /**
     * Default constructor.
     */
    public FutureGet(final DHTBuilder<?> builder) {
        this(builder, 0, new VotingSchemeDHT());
    }
View Full Code Here

    /**
     * Default constructor.
     */
    public FutureSend(final DHTBuilder<?> builder) {
        this(builder, 0, new VotingSchemeDHT());
    }
View Full Code Here

     */

    public FutureSend direct(final SendBuilder builder) {

        final FutureSend futureDHT = new FutureSend(builder, builder.requestP2PConfiguration()
                .minimumResults(), new VotingSchemeDHT());

        builder.futureChannelCreator().addListener(new BaseFutureAdapter<FutureChannelCreator>() {
            @Override
            public void operationComplete(final FutureChannelCreator future) throws Exception {
                if (future.isSuccess()) {
View Full Code Here

    }

    public FutureGet get(final GetBuilder builder) {

        final FutureGet futureDHT = new FutureGet(builder, builder.requestP2PConfiguration()
                .minimumResults(), new VotingSchemeDHT());

        builder.futureChannelCreator().addListener(new BaseFutureAdapter<FutureChannelCreator>() {
            @Override
            public void operationComplete(final FutureChannelCreator future) throws Exception {
                if (future.isSuccess()) {
View Full Code Here

        return futureDHT;
    }

    public FutureDigest digest(final DigestBuilder builder) {
        final FutureDigest futureDHT = new FutureDigest(builder, builder.requestP2PConfiguration()
                .minimumResults(), new VotingSchemeDHT());

        builder.futureChannelCreator().addListener(new BaseFutureAdapter<FutureChannelCreator>() {
            @Override
            public void operationComplete(final FutureChannelCreator future) throws Exception {
                if (future.isSuccess()) {
View Full Code Here

     * final boolean returnResults, final boolean signMessage, final boolean isManualCleanup, FutureCreate<FutureDHT>
     * futureCreate, final FutureChannelCreator futureChannelCreator, final ConnectionReservation connectionReservation)
     * {
     */
    public FutureRemove remove(final RemoveBuilder builder) {
        final FutureRemove futureDHT = new FutureRemove(builder, new VotingSchemeDHT());

        builder.futureChannelCreator().addListener(new BaseFutureAdapter<FutureChannelCreator>() {
            @Override
            public void operationComplete(final FutureChannelCreator future) throws Exception {
                if (future.isSuccess()) {
View Full Code Here

                contentKeys = new ArrayList<Number160>(1);
                contentKeys.add(contentKey);
            }
        }
        if (evaluationScheme == null) {
            evaluationScheme = new VotingSchemeDHT();
        }
        return peer.distributedHashTable().digest(this);
    }
View Full Code Here

TOP

Related Classes of net.tomp2p.p2p.VotingSchemeDHT

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.