voldemort.client.protocol.admin
Class SocketAndStreams

java.lang.Object
  extended by voldemort.client.protocol.admin.SocketAndStreams

public class SocketAndStreams
extends java.lang.Object

A wrapper class that wraps a socket with its DataInputStream and DataOutputStream


Constructor Summary
SocketAndStreams(java.net.Socket socket, int bufferSizeBytes, RequestFormatType type)
           
SocketAndStreams(java.net.Socket socket, RequestFormatType requestFormatType)
           
 
Method Summary
 long getCreateTimestamp()
          Returns the nanosecond-based timestamp of when this socket was created.
 java.io.DataInputStream getInputStream()
           
 java.io.DataOutputStream getOutputStream()
           
 RequestFormatType getRequestFormatType()
           
 java.net.Socket getSocket()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketAndStreams

public SocketAndStreams(java.net.Socket socket,
                        RequestFormatType requestFormatType)
                 throws java.io.IOException
Throws:
java.io.IOException

SocketAndStreams

public SocketAndStreams(java.net.Socket socket,
                        int bufferSizeBytes,
                        RequestFormatType type)
                 throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getSocket

public java.net.Socket getSocket()

getInputStream

public java.io.DataInputStream getInputStream()

getOutputStream

public java.io.DataOutputStream getOutputStream()

getRequestFormatType

public RequestFormatType getRequestFormatType()

getCreateTimestamp

public long getCreateTimestamp()
Returns the nanosecond-based timestamp of when this socket was created.

Returns:
Nanosecond-based timestamp of socket creation
See Also:
SocketResourceFactory.validate(SocketDestination, SocketAndStreams)


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu