org.apache.cassandra.net
Class TcpConnection

java.lang.Object
  extended by org.apache.cassandra.net.SelectionKeyHandler
      extended by 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)
           
 EndPoint getEndPoint()
           
 java.nio.channels.SocketChannel getSocketChannel()
           
 int hashCode()
           
 boolean isConnected()
           
 boolean isIncoming()
           
 int pending()
           
 void read(java.nio.channels.SelectionKey key)
          Method which is called when the key becomes readable.
 void setLocalEp(EndPoint localEp)
           
 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 org.apache.cassandra.net.SelectionKeyHandler
accept, turnOffInterestOps, turnOnInterestOps
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

setLocalEp

public void setLocalEp(EndPoint localEp)

getEndPoint

public EndPoint getEndPoint()

isIncoming

public boolean isIncoming()

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.

pending

public int pending()

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable


Copyright © 2009 The Apache Software Foundation