org.apache.bookkeeper.proto
Class BookieServer

java.lang.Object
  extended by 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.


Constructor Summary
BookieServer(int port, File journalDirectory, File[] ledgerDirectories)
           
 
Method Summary
 boolean isDown()
           
 void join()
           
static void main(String[] args)
           
 void processPacket(ByteBuffer packet, NIOServerFactory.Cnxn src)
           
 void shutdown()
           
 void start()
           
 void writeComplete(int rc, long ledgerId, long entryId, Object ctx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BookieServer

public BookieServer(int port,
                    File journalDirectory,
                    File[] ledgerDirectories)
Method Detail

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