Method | Description | |
---|---|---|
GetSock ( string key ) : |
Returns appropriate SockIO object given string cache key.
|
|
GetSock ( string key, object hashCode ) : |
Returns appropriate SockIO object given string cache key and optional hashcode. Trys to get SockIO from sockIOPool. Fails over to additional pools in event of server failure.
|
|
SetServers ( |
Sets the list of all cache servers
|
|
SetServers ( string servers ) : void |
Sets the list of all cache servers
|
|
SetWeights ( |
sets the list of weights to apply to the server list
|
|
SetWeights ( int weights ) : void |
sets the list of weights to apply to the server list
|
Method | Description | |
---|---|---|
AddSocketToPool ( |
Adds a socket to a given sockIOPool for the given host. Internal utility method.
|
|
ClosePool ( |
Closes all sockets in the passed in sockIOPool. Internal utility method.
|
|
CreateSocket ( string host ) : |
Creates a new SockIO obj for the given server. If server fails to connect, then return null and do not try again until a duration has passed. This duration will grow by doubling after each failed attempt to connect.
|
|
SockIOPool ( ) : System |
Method | Description | |
---|---|---|
CheckIn ( |
||
CheckIn ( |
||
ClearHostFromPool ( |
||
GetConnection ( string host ) : |
||
GetInstance ( ) : |
||
GetInstance ( String poolName ) : |
||
GetLocalizedString ( string key ) : string | ||
Initialize ( ) : void | ||
NewHashingAlgorithm ( string key ) : int |
Internal private hashing method. This is the new hashing algorithm from other clients. Found to be fast and have very good distribution. UPDATE: this is dog slow under java. Maybe under .NET?
|
|
OriginalHashingAlgorithm ( string key ) : int |
Internal private hashing method. This is the original hashing algorithm from other clients. Found to be slow and have poor distribution.
|
|
RemoveSocketFromPool ( |
||
SelfMaintain ( ) : void | ||
Shutdown ( ) : void | ||
StartMaintenanceThread ( ) : void | ||
StopMaintenanceThread ( ) : void |
protected static AddSocketToPool ( |
||
pool | ||
host | string | host this socket is connected to |
socket | socket to add | |
return | void |
protected static ClosePool ( |
||
pool | ||
return | void |
protected CreateSocket ( string host ) : |
||
host | string | host:port to connect to |
return |
public GetSock ( string key ) : |
||
key | string | hashcode for cache key |
return |
public GetSock ( string key, object hashCode ) : |
||
key | string | hashcode for cache key |
hashCode | object | if not null, then the int hashcode to use |
return |
public SetServers ( |
||
servers | string array of servers [host:port] | |
return | void |
public SetServers ( string servers ) : void | ||
servers | string | string array of servers [host:port] |
return | void |
public SetWeights ( |
||
weights |
/// This is an int array with each element corresponding to an element
/// in the same position in the server string array |
|
return | void |
public SetWeights ( int weights ) : void | ||
weights | int |
/// This is an int array with each element corresponding to an element
/// in the same position in the server string array |
return | void |