package org.voltdb.rejoin;

import java.nio.ByteBuffer;
import java.util.List;

import org.voltcore.utils.Pair;

public interface RejoinSiteProcessor {

    /**
     * Initialize the snapshot sink, bind to a socket and wait for incoming
     * connection.
     *
     * @return A list of local addresses and port that remote node can connect
     *         to.
     */
    public abstract Pair<List<byte[]>, Integer> initialize();

    /**
     * Whether or not all snapshot blocks are polled
     *
     * @return true if no more blocks to come, false otherwise
     */
    public abstract boolean isEOF();

    /**
     * Closes all connections
     */
    public abstract void close();

    /**
     * Poll the next block to be sent to EE.
     *
     * @return The next block along with its table ID, or null if there's none.
     */
    public abstract Pair<Integer, ByteBuffer> poll();

}
@@ -1,8 +1,715 @@
+/* This file is part of VoltDB.%0A * Copyright (C) 2008-2012 VoltDB Inc.%0A *%0A * VoltDB is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU General Public License as published by%0A * the Free Software Foundation, either version 3 of the License, or%0A * (at your option) any later version.%0A *%0A * VoltDB is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU General Public License for more details.%0A *%0A * You should have received a copy of the GNU General Public License%0A * along with VoltDB.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0A%0A
 package 

Fix license check.