Метод | Описание | |
---|---|---|
Add ( string key, object value ) : bool |
Adds data to the server; only the key and the value are specified.
|
|
Add ( string key, object value, System.DateTime expiry ) : bool |
Adds data to the server; the key, value, and an expiration time are specified.
|
|
Add ( string key, object value, System.DateTime expiry, int hashCode ) : bool |
Adds data to the server; the key, value, and an expiration time are specified.
|
|
Add ( string key, object value, int hashCode ) : bool |
Adds data to the server; the key, value, and an optional hashcode are passed in.
|
|
Decrement ( string key ) : long |
Decrement the value at the specified key by 1, and then return it.
|
|
Decrement ( string key, long inc ) : long |
Decrement the value at the specified key by passed in value, and then return it.
|
|
Decrement ( string key, long inc, int hashCode ) : long |
Decrement the value at the specified key by the specified increment, and then return it.
|
|
Delete ( string key ) : bool |
Deletes an object from cache given cache key.
|
|
Delete ( string key, System.DateTime expiry ) : bool |
Deletes an object from cache given cache key and expiration date.
|
|
Delete ( string key, object hashCode, System.DateTime expiry ) : bool |
Deletes an object from cache given cache key, a delete time, and an optional hashcode. The item is immediately made non retrievable.
|
|
FlushAll ( ) : bool |
Invalidates the entire cache. Will return true only if succeeds in clearing all servers.
|
|
FlushAll ( |
Invalidates the entire cache. Will return true only if succeeds in clearing all servers. If pass in null, then will try to flush all servers.
|
|
Get ( string key ) : object |
Retrieve a key from the server, using a specific hash. If the data was compressed or serialized when compressed, it will automatically be decompressed or serialized, as appropriate. (Inclusive or) Non-serialized data will be returned as a string, so explicit conversion to numeric types will be necessary, if desired
|
|
Get ( string key, int hashCode ) : object |
Retrieve a key from the server, using a specific hash. If the data was compressed or serialized when compressed, it will automatically be decompressed or serialized, as appropriate. (Inclusive or) Non-serialized data will be returned as a string, so explicit conversion to numeric types will be necessary, if desired
|
|
Get ( string key, object hashCode, bool asString ) : object |
Retrieve a key from the server, using a specific hash. If the data was compressed or serialized when compressed, it will automatically be decompressed or serialized, as appropriate. (Inclusive or) Non-serialized data will be returned as a string, so explicit conversion to numeric types will be necessary, if desired
|
|
GetCounter ( string key ) : long |
Returns value in counter at given key as long.
|
|
GetCounter ( string key, object hashCode ) : long |
Returns value in counter at given key as long.
|
|
GetMultiple ( string keys ) : |
Retrieve multiple objects from the memcache. This is recommended over repeated calls to
|
|
GetMultiple ( string keys, int hashCodes ) : |
Retrieve multiple objects from the memcache. This is recommended over repeated calls to
|
|
GetMultiple ( string keys, int hashCodes, bool asString ) : |
Retrieve multiple objects from the memcache. This is recommended over repeated calls to
|
|
GetMultipleArray ( string keys ) : object[] |
Retrieve multiple objects from the memcache. This is recommended over repeated calls to
|
|
GetMultipleArray ( string keys, int hashCodes ) : object[] |
Retrieve multiple objects from the memcache. This is recommended over repeated calls to
|
|
GetMultipleArray ( string keys, int hashCodes, bool asString ) : object[] |
Retrieve multiple objects from the memcache. This is recommended over repeated calls to
|
|
Increment ( string key ) : long |
Increment the value at the specified key by 1, and then return it.
|
|
Increment ( string key, long inc ) : long |
Increment the value at the specified key by passed in val.
|
|
Increment ( string key, long inc, int hashCode ) : long |
Increment the value at the specified key by the specified increment, and then return it.
|
|
KeyExists ( string key ) : bool |
Checks to see if key exists in cache.
|
|
MemcachedClient ( ) : System |
Creates a new instance of MemcachedClient.
|
|
Replace ( string key, object value ) : bool |
Updates data on the server; only the key and the value are specified.
|
|
Replace ( string key, object value, System.DateTime expiry ) : bool |
Updates data on the server; the key, value, and an expiration time are specified.
|
|
Replace ( string key, object value, System.DateTime expiry, int hashCode ) : bool |
Updates data on the server; the key, value, and an expiration time are specified.
|
|
Replace ( string key, object value, int hashCode ) : bool |
Updates data on the server; only the key and the value and an optional hash are specified.
|
|
Set ( string key, object value ) : bool |
Stores data on the server; only the key and the value are specified.
|
|
Set ( string key, object value, System.DateTime expiry ) : bool |
Stores data on the server; the key, value, and an expiration time are specified.
|
|
Set ( string key, object value, System.DateTime expiry, int hashCode ) : bool |
Stores data on the server; the key, value, and an expiration time are specified.
|
|
Set ( string key, object value, int hashCode ) : bool |
Stores data on the server; only the key and the value are specified.
|
|
Stats ( ) : |
Retrieves stats for all servers. Returns a map keyed on the servername. The value is another map which contains stats with stat name as key and value as value.
|
|
Stats ( |
Retrieves stats for passed in servers (or all servers). Returns a map keyed on the servername. The value is another map which contains stats with stat name as key and value as value.
|
|
StoreCounter ( string key, long counter ) : bool |
Store a counter to memcached given a key
|
|
StoreCounter ( string key, long counter, int hashCode ) : bool |
Store a counter to memcached given a key
|
Метод | Описание | |
---|---|---|
GetExpirationTime ( System.DateTime expiration ) : int |
Converts a .NET date time to a UNIX timestamp
|
|
GetLocalizedString ( string key ) : string | ||
IncrementOrDecrement ( string cmdname, string key, long inc, object hashCode ) : long |
Increments/decrements the value at the specified key by inc. Note that the server uses a 32-bit unsigned integer, and checks for underflow. In the event of underflow, the result will be zero. Because Java lacks unsigned types, the value is returned as a 64-bit integer. The server will only decrement a value if it already exists; if a value is not found, -1 will be returned. TODO: C# has unsigned types. We can fix this.
|
|
Init ( ) : void |
Initializes memcachedClient object to defaults. This enables compression and sets compression threshhold to 15 KB.
|
|
LoadItems ( |
This method loads the data from cache into a Hashtable. Pass a SockIO object which is ready to receive data and a Hashtable to store the results.
|
|
Set ( string cmdname, string key, object obj, System.DateTime expiry, object hashCode, bool asString ) : bool |
Stores data to cache. If data does not already exist for this key on the server, or if the key is being deleted, the specified value will not be stored. The server will automatically delete the value when the expiration time has been reached. If compression is enabled, and the data is longer than the compression threshold the data will be stored in compressed form. As of the current release, all objects stored will use .NET serialization.
|
public Add ( string key, object value ) : bool | ||
key | string | key to store data under |
value | object | value to store |
Результат | bool |
public Add ( string key, object value, System.DateTime expiry ) : bool | ||
key | string | key to store data under |
value | object | value to store |
expiry | System.DateTime | when to expire the record |
Результат | bool |
public Add ( string key, object value, System.DateTime expiry, int hashCode ) : bool | ||
key | string | key to store data under |
value | object | value to store |
expiry | System.DateTime | when to expire the record |
hashCode | int | if not null, then the int hashcode to use |
Результат | bool |
public Add ( string key, object value, int hashCode ) : bool | ||
key | string | key to store data under |
value | object | value to store |
hashCode | int | if not null, then the int hashcode to use |
Результат | bool |
public Decrement ( string key ) : long | ||
key | string | key where the data is stored |
Результат | long |
public Decrement ( string key, long inc ) : long | ||
key | string | key where the data is stored |
inc | long | how much to increment by |
Результат | long |
public Decrement ( string key, long inc, int hashCode ) : long | ||
key | string | key where the data is stored |
inc | long | how much to increment by |
hashCode | int | if not null, then the int hashcode to use |
Результат | long |
public Delete ( string key ) : bool | ||
key | string | the key to be removed |
Результат | bool |
public Delete ( string key, System.DateTime expiry ) : bool | ||
key | string | the key to be removed |
expiry | System.DateTime | when to expire the record. |
Результат | bool |
public Delete ( string key, object hashCode, System.DateTime expiry ) : bool | ||
key | string | the key to be removed |
hashCode | object | if not null, then the int hashcode to use |
expiry | System.DateTime | when to expire the record. |
Результат | bool |
public FlushAll ( |
||
servers | optional array of host(s) to flush (host:port) | |
Результат | bool |
public Get ( string key ) : object | ||
key | string | key where data is stored |
Результат | object |
public Get ( string key, int hashCode ) : object | ||
key | string | key where data is stored |
hashCode | int | if not null, then the int hashcode to use |
Результат | object |
public Get ( string key, object hashCode, bool asString ) : object | ||
key | string | key where data is stored |
hashCode | object | if not null, then the int hashcode to use |
asString | bool | if true, then return string val |
Результат | object |
public GetCounter ( string key ) : long | ||
key | string | cache ket |
Результат | long |
public GetCounter ( string key, object hashCode ) : long | ||
key | string | cache ket |
hashCode | object | if not null, then the int hashcode to use |
Результат | long |
public GetMultiple ( string keys ) : |
||
keys | string | string array of keys to retrieve |
Результат |
public GetMultiple ( string keys, int hashCodes ) : |
||
keys | string | string array of keys to retrieve |
hashCodes | int | hashCodes if not null, then the int array of hashCodes |
Результат |
public GetMultiple ( string keys, int hashCodes, bool asString ) : |
||
keys | string | string array of keys to retrieve |
hashCodes | int | hashCodes if not null, then the int array of hashCodes |
asString | bool | if true then retrieve using string val |
Результат |
public GetMultipleArray ( string keys ) : object[] | ||
keys | string | string array of keys to retrieve |
Результат | object[] |
public GetMultipleArray ( string keys, int hashCodes ) : object[] | ||
keys | string | string array of keys to retrieve |
hashCodes | int | if not null, then the int array of hashCodes |
Результат | object[] |
public GetMultipleArray ( string keys, int hashCodes, bool asString ) : object[] | ||
keys | string | string array of keys to retrieve |
hashCodes | int | if not null, then the int array of hashCodes |
asString | bool | asString if true, retrieve string vals |
Результат | object[] |
public Increment ( string key ) : long | ||
key | string | key where the data is stored |
Результат | long |
public Increment ( string key, long inc ) : long | ||
key | string | key where the data is stored |
inc | long | how much to increment by |
Результат | long |
public Increment ( string key, long inc, int hashCode ) : long | ||
key | string | key where the data is stored |
inc | long | how much to increment by |
hashCode | int | if not null, then the int hashcode to use |
Результат | long |
public KeyExists ( string key ) : bool | ||
key | string | the key to look for |
Результат | bool |
public Replace ( string key, object value ) : bool | ||
key | string | key to store data under |
value | object | value to store |
Результат | bool |
public Replace ( string key, object value, System.DateTime expiry ) : bool | ||
key | string | key to store data under |
value | object | value to store |
expiry | System.DateTime | when to expire the record |
Результат | bool |
public Replace ( string key, object value, System.DateTime expiry, int hashCode ) : bool | ||
key | string | key to store data under |
value | object | value to store |
expiry | System.DateTime | when to expire the record |
hashCode | int | if not null, then the int hashcode to use |
Результат | bool |
public Replace ( string key, object value, int hashCode ) : bool | ||
key | string | key to store data under |
value | object | value to store |
hashCode | int | if not null, then the int hashcode to use |
Результат | bool |
public Set ( string key, object value ) : bool | ||
key | string | key to store data under |
value | object | value to store |
Результат | bool |
public Set ( string key, object value, System.DateTime expiry ) : bool | ||
key | string | key to store data under |
value | object | value to store |
expiry | System.DateTime | when to expire the record |
Результат | bool |
public Set ( string key, object value, System.DateTime expiry, int hashCode ) : bool | ||
key | string | key to store data under |
value | object | value to store |
expiry | System.DateTime | when to expire the record |
hashCode | int | if not null, then the int hashcode to use |
Результат | bool |
public Set ( string key, object value, int hashCode ) : bool | ||
key | string | key to store data under |
value | object | value to store |
hashCode | int | if not null, then the int hashcode to use |
Результат | bool |
public Stats ( |
||
servers | string array of servers to retrieve stats from, or all if this is null | |
command | string | 命令行参数,该参数为DiscuzNT修改版 |
Результат |
public StoreCounter ( string key, long counter ) : bool | ||
key | string | cache key |
counter | long | number to store |
Результат | bool |
public StoreCounter ( string key, long counter, int hashCode ) : bool | ||
key | string | cache key |
counter | long | number to store |
hashCode | int | if not null, then the int hashcode to use |
Результат | bool |