com.nhncorp.neptune.changelog.pipe
Class Pipe
java.lang.Object
com.nhncorp.neptune.changelog.pipe.Pipe
public class Pipe
- extends java.lang.Object
|
Field Summary |
static int |
G_PORT
|
|
Constructor Summary |
Pipe(java.nio.channels.SocketChannel prevChannel,
int timeout)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
G_PORT
public static int G_PORT
Pipe
public Pipe(java.nio.channels.SocketChannel prevChannel,
int timeout)
setListenPortNumber
public void setListenPortNumber(int port)
setEventHandler
public void setEventHandler(PipeEventHandler handler)
setLogPath
public void setLogPath(java.lang.String logPath)
init
public void init()
throws java.io.IOException
- Throws:
java.io.IOException
getPipeKey
public java.lang.String getPipeKey()
write
public boolean write(java.nio.channels.SelectableChannel ch)
throws java.io.IOException
- Throws:
java.io.IOException
read
public boolean read(java.nio.channels.SelectableChannel ch)
throws java.io.IOException
- Throws:
java.io.IOException
connect
public boolean connect(java.nio.channels.SelectableChannel ch)
throws java.io.IOException
- Throws:
java.io.IOException
fini
public void fini(int bytes)
throws java.io.IOException
- Throws:
java.io.IOException
triggerClose
public void triggerClose()
isCloseTriggered
public boolean isCloseTriggered()
isCloseState
public boolean isCloseState()
close
public void close()
removeLogFile
public void removeLogFile()
backupFile
public void backupFile()
throws java.io.IOException
- Throws:
java.io.IOException
restoreLastLogFile
public void restoreLastLogFile()
throws java.io.IOException
- Throws:
java.io.IOException
removeBackupFiles
public void removeBackupFiles()
getLogFileSize
public long getLogFileSize()
throws java.io.IOException
- Throws:
java.io.IOException
changeState
public void changeState(com.nhncorp.neptune.changelog.pipe.PipeState newState)
throws java.io.IOException
- Throws:
java.io.IOException
isExpired
public boolean isExpired(long processTime)
isActivated
public boolean isActivated()
touch
public void touch()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
register
public void register(java.nio.channels.Selector selector)