|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvoldemort.client.protocol.admin.SocketResourceFactory
public class SocketResourceFactory
A Factory for creating sockets
Field Summary | |
---|---|
static org.apache.log4j.Logger |
logger
|
Constructor Summary | |
---|---|
SocketResourceFactory(int soTimeoutMs,
int socketBufferSize)
|
|
SocketResourceFactory(int soTimeoutMs,
int socketBufferSize,
boolean socketKeepAlive)
|
Method Summary | |
---|---|
void |
close()
|
SocketAndStreams |
create(SocketDestination dest)
Create a socket for the given host/port |
void |
destroy(SocketDestination dest,
SocketAndStreams sands)
Close the socket |
int |
getNumberCreated()
|
int |
getNumberDestroyed()
|
int |
getTimeout()
|
void |
setLastClosedTimestamp(SocketDestination socketDestination)
Assigns the last closed timestamp based on the current time in nanoseconds. |
boolean |
validate(SocketDestination dest,
SocketAndStreams sands)
Check that the given resource is valid. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.log4j.Logger logger
Constructor Detail |
---|
public SocketResourceFactory(int soTimeoutMs, int socketBufferSize)
public SocketResourceFactory(int soTimeoutMs, int socketBufferSize, boolean socketKeepAlive)
Method Detail |
---|
public void destroy(SocketDestination dest, SocketAndStreams sands) throws java.lang.Exception
destroy
in interface ResourceFactory<SocketDestination,SocketAndStreams>
dest
- The key of the resourcesands
- The resource
java.lang.Exception
public SocketAndStreams create(SocketDestination dest) throws java.lang.Exception
create
in interface ResourceFactory<SocketDestination,SocketAndStreams>
dest
- The key
java.lang.Exception
public boolean validate(SocketDestination dest, SocketAndStreams sands)
ResourceFactory
validate
in interface ResourceFactory<SocketDestination,SocketAndStreams>
dest
- The key of the resourcesands
- The resource
public int getTimeout()
public int getNumberCreated()
public int getNumberDestroyed()
public void close()
close
in interface ResourceFactory<SocketDestination,SocketAndStreams>
public void setLastClosedTimestamp(SocketDestination socketDestination)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |