Memcache Class |
Namespace: Adf
The Memcache type exposes the following members.
Name | Description | |
---|---|---|
Memcache(String, Int32) |
初始化新实例
| |
Memcache(String, Int32, Encoding) |
初始化新实例
|
Name | Description | |
---|---|---|
Add(String, Object) |
Adds data to the server; only the key and the value are specified.
| |
Add(String, Object, DateTime) |
Adds data to the server; the key, value, and an expiration time are specified.
| |
ClearEndOfLine |
reads up to end of line and returns nothing
| |
Decrement(String) |
Decrement the value at the specified key by 1, and then return it.
| |
Decrement(String, Int64) |
Decrement the value at the specified key by passed in value, and then return it.
| |
Delete(String) |
Deletes an object from cache given cache key.
| |
Delete(String, DateTime) |
Deletes an object from cache given cache key, a delete time, and an optional hashcode.
The item is immediately made non retrievable. Keep in mind: add(string, object) and replace(string, object) will fail when used with the same key will fail, until the server reaches the specified time. However, set(string, object) will succeed and the new value will not be deleted. | |
Dispose |
资源释放
| |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
Flush |
flushes output stream
| |
FlushAll |
Invalidates the entire cache.
Will return true only if succeeds in clearing all servers.
| |
Get(String) |
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, Type) |
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
| |
GetT(String) |
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 |
Returns value in counter at given key as long.
| |
GetHashCode |
用作特定类型的哈希函数。
(Inherited from Object.) | |
GetType |
获取当前实例的 Type。
(Inherited from Object.) | |
Increment(String) |
Increment the value at the specified key by 1, and then return it.
| |
Increment(String, Int64) |
Increment the value at the specified key by passed in val.
| |
MemberwiseClone |
创建当前 Object 的浅表副本。
(Inherited from Object.) | |
Read |
reads length bytes into the passed in byte array from stream
| |
ReadLine |
reads a line
intentionally not using the deprecated readLine method from DataInputStream
| |
Replace(String, Object) |
Updates data on the server; only the key and the value are specified.
| |
Replace(String, Object, DateTime) |
Updates data on the server; the key, value, and an expiration time are specified.
| |
Set(String, Object) |
Stores data on the server; only the key and the value are specified.
| |
Set(String, Object, DateTime) |
Stores data on the server; the key, value, and an expiration time are specified.
| |
Set(String, Object, Int32) |
设置数据
| |
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, Int64) |
Store a counter to memcached given a key
| |
StoreCounter(String, Int64, Int32) |
Store a counter to memcached given a key
| |
ToString | (Inherited from Object.) | |
Write(Byte) |
writes a byte array to the output stream
| |
Write(Byte, Int32, Int32) |
writes a byte array to the output stream
|
Name | Description | |
---|---|---|
BinarySerializable |
获取或设置二进制序列化器,默认 JsonBinarySerializable, 可通过在appsetting中配置 MemcacheBinarySerializable 来指定其它实例
| |
CompressionThreshold |
Sets the required length for data to be considered for compression.
If the length of the data to be stored is not equal or larger than this value, it will
not be compressed.
This defaults to 15 KB.
| |
EnableCompression |
Enable storing compressed data, provided it meets the threshold requirements.
If enabled, data will be stored in compressed form if it is
longer than the threshold length set with setCompressThreshold(int)
The default is that compression is enabled.
Even if compression is disabled, compressed data will be automatically
decompressed.
| |
Encoding |
Sets default string encoding when storing primitives as strings.
Default is UTF-8.
| |
Host |
主机
| |
IsConnected |
Gets whether or not the socket is connected. Returns true if it is.
| |
PoolAbandon |
获取或设置是否放弃此实例
| |
Port |
端口
| |
SendTimeout |
发送超时
|