com.nhncorp.neptune.changelog
Class ChangeLogClient
java.lang.Object
com.nhncorp.neptune.changelog.ChangeLogClient
public class ChangeLogClient
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChangeLogClient
public ChangeLogClient(NConfiguration conf,
java.lang.String tabletName)
throws java.io.IOException
- Throws:
java.io.IOException
ChangeLogClient
public ChangeLogClient(NConfiguration conf,
java.lang.String tabletName,
java.net.InetSocketAddress[] addresses)
throws java.io.IOException
- Throws:
java.io.IOException
getTabletName
public java.lang.String getTabletName()
getPipeKey
public java.lang.String getPipeKey()
open
public void open()
throws UnmatchedLogException,
ChangeLogInterruptedException,
java.io.IOException
- Throws:
UnmatchedLogException
ChangeLogInterruptedException
java.io.IOException
startWriting
public void startWriting(java.lang.String id)
throws ChangeLogInterruptedException,
java.io.IOException
- Throws:
ChangeLogInterruptedException
java.io.IOException
append
public void append(ChangeLog changeLog)
write
public void write(byte[] bytes)
write
public void write(byte[] bytes,
int offset,
int length)
commitWriting
public int commitWriting()
throws ChangeLogInterruptedException,
java.io.IOException
- Throws:
ChangeLogInterruptedException
java.io.IOException
tabletExists
public boolean tabletExists()
throws java.io.IOException
- Throws:
java.io.IOException
prepareClosing
public void prepareClosing()
throws java.io.IOException
- Throws:
java.io.IOException
disconnect
public void disconnect()
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
removeAllLogs
public void removeAllLogs()
throws java.io.IOException
- Throws:
java.io.IOException
removeBackupLogFiles
public void removeBackupLogFiles()
throws java.io.IOException
- Throws:
java.io.IOException
rollback
public void rollback()
throws java.io.IOException
- Throws:
java.io.IOException
backupLogFile
public void backupLogFile()
throws java.io.IOException
- Throws:
java.io.IOException
readLastLogFile
public TransactionData[] readLastLogFile()
throws java.io.IOException
- Throws:
java.io.IOException
readAllLogFiles
public TransactionData[] readAllLogFiles()
throws java.io.IOException
- Throws:
java.io.IOException
getLogFileSize
public long getLogFileSize()
throws java.io.IOException
- Throws:
java.io.IOException
test_rollbackFileAtIndex
public void test_rollbackFileAtIndex(int index)
isClosed
public boolean isClosed()
isWritingStarted
public boolean isWritingStarted()
isExpired
public boolean isExpired()
touch
public ChangeLogClient touch()
formatLogsAt
public static void formatLogsAt(NConfiguration conf,
java.net.InetSocketAddress addr)
throws java.io.IOException
- Throws:
java.io.IOException
setConsistencyCheck
public void setConsistencyCheck(boolean flag)
getConsistencyCheck
public boolean getConsistencyCheck()
hasInvalidChangeLog
public boolean hasInvalidChangeLog()
throws java.io.IOException
- Throws:
java.io.IOException