org.apache.bookkeeper.proto
Class BookieServer
java.lang.Object
org.apache.bookkeeper.proto.BookieServer
- All Implemented Interfaces:
- NIOServerFactory.PacketProcessor, WriteCallback
public class BookieServer
- extends Object
- implements NIOServerFactory.PacketProcessor, WriteCallback
Implements the server-side part of the BookKeeper protocol.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BookieServer
public BookieServer(int port,
File journalDirectory,
File[] ledgerDirectories)
start
public void start()
throws IOException
- Throws:
IOException
shutdown
public void shutdown()
throws InterruptedException
- Throws:
InterruptedException
isDown
public boolean isDown()
join
public void join()
throws InterruptedException
- Throws:
InterruptedException
main
public static void main(String[] args)
throws IOException,
InterruptedException
- Parameters:
args
-
- Throws:
IOException
InterruptedException
processPacket
public void processPacket(ByteBuffer packet,
NIOServerFactory.Cnxn src)
- Specified by:
processPacket
in interface NIOServerFactory.PacketProcessor
writeComplete
public void writeComplete(int rc,
long ledgerId,
long entryId,
Object ctx)
- Specified by:
writeComplete
in interface WriteCallback