org.apache.cassandra.net
Class TcpConnection
java.lang.Object
org.apache.cassandra.net.SelectionKeyHandler
org.apache.cassandra.net.TcpConnection
- All Implemented Interfaces:
- java.lang.Comparable
public class TcpConnection
- extends SelectionKeyHandler
- implements java.lang.Comparable
Method Summary |
void |
close()
|
int |
compareTo(java.lang.Object o)
|
void |
connect(java.nio.channels.SelectionKey key)
Method which is called when the key becomes connectable. |
void |
doPendingWrites()
|
boolean |
equals(java.lang.Object o)
|
java.net.InetAddress |
getEndPoint()
|
java.nio.channels.SocketChannel |
getSocketChannel()
|
int |
hashCode()
|
boolean |
isConnected()
|
void |
read(java.nio.channels.SelectionKey key)
Method which is called when the key becomes readable. |
void |
stream(java.io.File file,
long startPosition,
long endPosition)
|
java.lang.String |
toString()
|
void |
write(Message message)
|
void |
write(java.nio.channels.SelectionKey key)
Method which is called when the key becomes writable. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
getEndPoint
public java.net.InetAddress getEndPoint()
getSocketChannel
public java.nio.channels.SocketChannel getSocketChannel()
write
public void write(Message message)
throws java.io.IOException
- Throws:
java.io.IOException
stream
public void stream(java.io.File file,
long startPosition,
long endPosition)
throws java.io.IOException,
java.lang.InterruptedException
- Throws:
java.io.IOException
java.lang.InterruptedException
close
public void close()
isConnected
public boolean isConnected()
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
connect
public void connect(java.nio.channels.SelectionKey key)
- Description copied from class:
SelectionKeyHandler
- Method which is called when the key becomes connectable.
- Overrides:
connect
in class SelectionKeyHandler
- Parameters:
key
- The key which is connectable.
write
public void write(java.nio.channels.SelectionKey key)
- Description copied from class:
SelectionKeyHandler
- Method which is called when the key becomes writable.
- Overrides:
write
in class SelectionKeyHandler
- Parameters:
key
- The key which is writable.
doPendingWrites
public void doPendingWrites()
read
public void read(java.nio.channels.SelectionKey key)
- Description copied from class:
SelectionKeyHandler
- Method which is called when the key becomes readable.
- Overrides:
read
in class SelectionKeyHandler
- Parameters:
key
- The key which is readable.
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
compareTo
in interface java.lang.Comparable
Copyright © 2010 The Apache Software Foundation