com.nhncorp.neptune.changelog.pipe
Class PipeConnectionInfo

java.lang.Object
  extended by com.nhncorp.neptune.changelog.pipe.PipeConnectionInfo
All Implemented Interfaces:
ChangeLogWritable

public class PipeConnectionInfo
extends java.lang.Object
implements ChangeLogWritable


Constructor Summary
PipeConnectionInfo()
           
 
Method Summary
static byte[] buildFrom(boolean consistencyCheck, java.lang.String pipeKey, java.lang.String tabletName, java.lang.String[] ipAddressList)
           
 boolean consistencyCheck()
           
static PipeConnectionInfo decode(java.nio.ByteBuffer buf)
           
 int find(java.lang.String ip)
           
 long getFileSizeOfPrevious()
           
 java.lang.String getPipeKey()
           
 java.lang.String getTabletName()
           
 java.lang.String nextAddress(int index)
           
 void readFields(java.nio.ByteBuffer buf)
           
 void write(java.nio.ByteBuffer buf)
           
 void writeFileSizeTo(java.nio.ByteBuffer buffer, long localFileSize)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PipeConnectionInfo

public PipeConnectionInfo()
Method Detail

readFields

public void readFields(java.nio.ByteBuffer buf)
                throws java.io.IOException
Specified by:
readFields in interface ChangeLogWritable
Throws:
java.io.IOException

consistencyCheck

public boolean consistencyCheck()

getTabletName

public java.lang.String getTabletName()

getFileSizeOfPrevious

public long getFileSizeOfPrevious()

write

public void write(java.nio.ByteBuffer buf)
           throws java.io.IOException
Specified by:
write in interface ChangeLogWritable
Throws:
java.io.IOException

nextAddress

public java.lang.String nextAddress(int index)

find

public int find(java.lang.String ip)

writeFileSizeTo

public void writeFileSizeTo(java.nio.ByteBuffer buffer,
                            long localFileSize)

getPipeKey

public java.lang.String getPipeKey()

decode

public static PipeConnectionInfo decode(java.nio.ByteBuffer buf)
                                 throws java.io.IOException
Throws:
java.io.IOException

buildFrom

public static byte[] buildFrom(boolean consistencyCheck,
                               java.lang.String pipeKey,
                               java.lang.String tabletName,
                               java.lang.String[] ipAddressList)
                        throws java.io.IOException
Throws:
java.io.IOException