Module
Module documentation.
modulenet.memcache
Classes
Classes and inheritance.
classnet.memcache::ResultList
@brief`ResultList` type.
@details`ResultList` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class ResultList {
/*
@brief `values` field.classnet.memcache::Conn
@brief`Conn` type.
@details`Conn` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class Conn {
/*
@brief `fd` field.classnet.memcache::UdpClient
@brief`UdpClient` type.
@details`UdpClient` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class UdpClient {
/*
@brief `fd` field.classnet.memcache::PoolConfig
@brief`PoolConfig` type.
@details`PoolConfig` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class PoolConfig {
/*
@brief `base` field.classnet.memcache::Pool
@brief`Pool` type.
@details`Pool` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class PoolConfig {
/*
@brief `base` field.classnet.memcache::Server
@brief`Server` type.
@details`Server` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class Server {
/*
@brief `host` field.classnet.memcache::HashNode
@brief`HashNode` type.
@details`HashNode` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class HashNode {
/*
@brief `hash_value` field.classnet.memcache::ConsistentHash
@brief`ConsistentHash` type.
@details`ConsistentHash` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class ConsistentHash {
/*
@brief `nodes` field.classnet.memcache::ShardedClient
@brief`ShardedClient` type.
@details`ShardedClient` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class ShardedClient {
/*
@brief `servers` field.Functions
Free functions and class methods.
functionnet.memcache::ResultList.init
Signature
func init(self: net.memcache.ResultList) -> Void func init(self: net.memcache.ResultList) -> Void {
self.values = new collections.Vector<protocol.memcache.Item>();
}@briefInitializes a `ResultList` instance.
@detailsEstablishes the initial field state for `ResultList` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::ResultList.len
Signature
func len(self: net.memcache.ResultList) -> Int func len(self: net.memcache.ResultList) -> Int {
return self.values.len();
}@briefReturns the element count or byte length with `ResultList.len`.
@detailsExecutes the `len` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns the operation result as `Int`.
functionnet.memcache::ResultList.get
Signature
func get(self: net.memcache.ResultList, idx: Int) -> protocol.memcache.Item func get(self: net.memcache.ResultList, idx: Int) -> protocol.memcache.Item {
return self.values.get_unchecked(idx);
}@briefReads the element for `ResultList.get`.
@detailsExecutes the `get` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- idxZero-based index.
@returnReturns the operation result as `protocol.memcache.Item`.
functionnet.memcache::ResultList.push
Signature
func push(self: net.memcache.ResultList, value: protocol.memcache.Item) -> Void func push(self: net.memcache.ResultList, value: protocol.memcache.Item) -> Void {
_ = self.values.push(value);
}@briefAppends an element with `ResultList.push`.
@detailsExecutes the `push` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- valueValue to write or store.
@returnVoid
functionnet.memcache::ResultList.deinit
Signature
func deinit(self: net.memcache.ResultList) -> Void func deinit(self: net.memcache.ResultList) -> Void {
}
}@briefReleases fallback resources at the end of the `ResultList` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::Conn.init
Signature
func init(self: net.memcache.Conn, fd: Int, timeout_ms: Int = 5000) -> Void func init(self: net.memcache.Conn, fd: Int, timeout_ms: Int = 5000) -> Void {
self.fd = fd;
self.tls_h = 0;@briefInitializes a `Conn` instance.
@detailsEstablishes the initial field state for `Conn` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- fdOperating-system file descriptor or socket descriptor.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionnet.memcache::Conn.set_timeouts
Signature
func set_timeouts(self: net.memcache.Conn, read_timeout_ms: Int, write_timeout_ms: Int) -> Void func set_timeouts(self: net.memcache.Conn, read_timeout_ms: Int, write_timeout_ms: Int) -> Void {
self.read_timeout_ms = read_timeout_ms;
self.write_timeout_ms = write_timeout_ms;@briefSets state or configuration with `Conn.set_timeouts`.
@detailsExecutes the `set_timeouts` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- read_timeout_msTime interval or timeout value in milliseconds.
- write_timeout_msTime interval or timeout value in milliseconds.
@returnVoid
functionnet.memcache::Conn.clear_error
Signature
func clear_error(self: net.memcache.Conn) -> Void func clear_error(self: net.memcache.Conn) -> Void {
self.last_error = new protocol.memcache.Error();
}@briefProvides the system library operation `Conn.clear_error`.
@detailsExecutes the `clear_error` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::Conn.recv_some
Signature
func recv_some(self: net.memcache.Conn, max_bytes: Int) -> String, ErrCode func recv_some(self: net.memcache.Conn, max_bytes: Int) -> String, ErrCode {
if self.closed || self.broken {
return "", std.ERR_INVALID;@briefProvides the system library operation `Conn.recv_some`.
@detailsExecutes the `recv_some` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- max_bytesMaximum number of bytes to read or process in this operation.
@returnReturns `String, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.send_some
Signature
func send_some(self: net.memcache.Conn, data: String) -> Int, ErrCode func send_some(self: net.memcache.Conn, data: String) -> Int, ErrCode {
if self.closed || self.broken {
return 0, std.ERR_INVALID;@briefProvides the system library operation `Conn.send_some`.
@detailsExecutes the `send_some` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- dataInput or output data buffer.
@returnReturns `Int, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.send_all
Signature
func send_all(self: net.memcache.Conn, data: String) -> ErrCode func send_all(self: net.memcache.Conn, data: String) -> ErrCode {
let off: Int = 0;
loop (; off < std.len(data); ) {@briefProvides the system library operation `Conn.send_all`.
@detailsExecutes the `send_all` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- dataInput or output data buffer.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.read_response
Signature
func read_response(self: net.memcache.Conn) -> protocol.memcache.Response, ErrCode func read_response(self: net.memcache.Conn) -> protocol.memcache.Response, ErrCode {
loop (; true; ) {
let value, parsed_err = self.reader.next();@briefReads data with `Conn.read_response`.
@detailsExecutes the `read_response` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns `protocol.memcache.Response, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.command_raw
Signature
func command_raw(self: net.memcache.Conn, wire: String) -> protocol.memcache.Response, ErrCode func command_raw(self: net.memcache.Conn, wire: String) -> protocol.memcache.Response, ErrCode {
_ = self.clear_error();
let write_err: ErrCode = self.send_all(wire);@briefProvides the system library operation `Conn.command_raw`.
@detailsExecutes the `command_raw` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- wireWire-format protocol payload to decode or forward.
@returnReturns `protocol.memcache.Response, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.command
Signature
func command(self: net.memcache.Conn, args: collections.Vector<String>, payload: String = "") -> protocol.memcache.Response, ErrCode func command(self: net.memcache.Conn, args: collections.Vector<String>, payload: String = "") -> protocol.memcache.Response, ErrCode {
return self.command_raw(protocol.memcache.encode_command(args, payload));
}@briefProvides the system library operation `Conn.command`.
@detailsExecutes the `command` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- argsArgument list forwarded to the command, process, callback, or formatter.
- payloadPayload bytes or text carried by the protocol frame, request, or response.
@returnReturns `protocol.memcache.Response, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.binary_command
Signature
func binary_command(self: net.memcache.Conn, wire: String) -> protocol.memcache.Response, ErrCode func binary_command(self: net.memcache.Conn, wire: String) -> protocol.memcache.Response, ErrCode {
return self.command_raw(wire);
}@briefProvides the system library operation `Conn.binary_command`.
@detailsExecutes the `binary_command` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- wireWire-format protocol payload to decode or forward.
@returnReturns `protocol.memcache.Response, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.binary_quiet
Signature
func binary_quiet(self: net.memcache.Conn, wire: String) -> ErrCode func binary_quiet(self: net.memcache.Conn, wire: String) -> ErrCode {
let write_err: ErrCode = self.send_all(wire);
self.broken = true;@briefProvides the system library operation `Conn.binary_quiet`.
@detailsExecutes the `binary_quiet` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- wireWire-format protocol payload to decode or forward.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.close
Signature
func close(self: net.memcache.Conn) -> Void func close(self: net.memcache.Conn) -> Void {
if self.closed {
return;@briefCloses resources and makes later operations unavailable with `Conn.close`.
@detailsExecutes the `close` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::Conn.dispose
Signature
func dispose(self: net.memcache.Conn) -> Void func dispose(self: net.memcache.Conn) -> Void {
_ = self.close();
}@briefExplicitly releases resources owned by `Conn`.
@detailsThis method deterministically cleans up file descriptors, network connections, native handles, buffers, or other external resources. Implementations should be idempotent where possible, and repeated calls must not corrupt object state.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::Conn.deinit
Signature
func deinit(self: net.memcache.Conn) -> Void func deinit(self: net.memcache.Conn) -> Void {
if !self.closed {
_ = self.close();@briefReleases fallback resources at the end of the `Conn` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::Conn.expect_ok
Signature
func expect_ok(self: net.memcache.Conn, response: protocol.memcache.Response) -> ErrCode func expect_ok(self: net.memcache.Conn, response: protocol.memcache.Response) -> ErrCode {
if response.is_error() {
return net.memcache.err_code_from_memcache(response.error);@briefProvides the system library operation `Conn.expect_ok`.
@detailsExecutes the `expect_ok` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- responseResponse object or response payload decoded, encoded, or returned by the operation.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.get
Signature
func get(self: net.memcache.Conn, key: String) -> protocol.memcache.Item, ErrCode func get(self: net.memcache.Conn, key: String) -> protocol.memcache.Item, ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let response: protocol.memcache.Response = self.binary_command(protocol.memcache.encode_binary_get(key))?;@briefReads the element for `Conn.get`.
@detailsExecutes the `get` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
@returnReturns `protocol.memcache.Item, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.getq
Signature
func getq(self: net.memcache.Conn, key: String) -> protocol.memcache.Item, ErrCode func getq(self: net.memcache.Conn, key: String) -> protocol.memcache.Item, ErrCode {
if self.protocol_mode != protocol.memcache.MEMCACHE_BINARY {
return self.get(key);@briefProvides the system library operation `Conn.getq`.
@detailsExecutes the `getq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
@returnReturns `protocol.memcache.Item, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.getk
Signature
func getk(self: net.memcache.Conn, key: String) -> protocol.memcache.Item, ErrCode func getk(self: net.memcache.Conn, key: String) -> protocol.memcache.Item, ErrCode {
if self.protocol_mode != protocol.memcache.MEMCACHE_BINARY {
return self.get(key);@briefProvides the system library operation `Conn.getk`.
@detailsExecutes the `getk` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
@returnReturns `protocol.memcache.Item, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.getkq
Signature
func getkq(self: net.memcache.Conn, key: String) -> protocol.memcache.Item, ErrCode func getkq(self: net.memcache.Conn, key: String) -> protocol.memcache.Item, ErrCode {
if self.protocol_mode != protocol.memcache.MEMCACHE_BINARY {
return self.get(key);@briefProvides the system library operation `Conn.getkq`.
@detailsExecutes the `getkq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
@returnReturns `protocol.memcache.Item, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.gets
Signature
func gets(self: net.memcache.Conn, key: String) -> protocol.memcache.Item, ErrCode func gets(self: net.memcache.Conn, key: String) -> protocol.memcache.Item, ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let response: protocol.memcache.Response = self.binary_command(protocol.memcache.encode_binary_get(key))?;@briefProvides the system library operation `Conn.gets`.
@detailsExecutes the `gets` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
@returnReturns `protocol.memcache.Item, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.get_many
Signature
func get_many(self: net.memcache.Conn, keys: collections.Vector<String>) -> net.memcache.ResultList, ErrCode func get_many(self: net.memcache.Conn, keys: collections.Vector<String>) -> net.memcache.ResultList, ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let out: net.memcache.ResultList = new net.memcache.ResultList();@briefReads the state or data for `Conn.get_many`.
@detailsExecutes the `get_many` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keysCollection of key names addressed by the lookup, mutation, or protocol command.
@returnReturns `net.memcache.ResultList, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.storage
Signature
func storage(self: net.memcache.Conn, command_name: String, key: String, value: String, flags: Int, ttl_sec: Int) -> ErrCode func storage(self: net.memcache.Conn, command_name: String, key: String, value: String, flags: Int, ttl_sec: Int) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let opcode: Int = net.memcache.binary_storage_opcode(command_name);@briefProvides the system library operation `Conn.storage`.
@detailsExecutes the `storage` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- command_nameProtocol command name to encode, send, dispatch, or execute.
- keyKey name.
- valueValue to write or store.
- flagsBitmask of option flags that controls how the operation is performed.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.set
Signature
func set(self: net.memcache.Conn, key: String, value: String, flags: Int = 0, ttl_sec: Int = 0) -> ErrCode func set(self: net.memcache.Conn, key: String, value: String, flags: Int = 0, ttl_sec: Int = 0) -> ErrCode {
return self.storage("set", key, value, flags, ttl_sec);
}@briefSets an element with `Conn.set`.
@detailsExecutes the `set` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- valueValue to write or store.
- flagsBitmask of option flags that controls how the operation is performed.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.set_noreply
Signature
func set_noreply(self: net.memcache.Conn, key: String, value: String, flags: Int = 0, ttl_sec: Int = 0) -> ErrCode func set_noreply(self: net.memcache.Conn, key: String, value: String, flags: Int = 0, ttl_sec: Int = 0) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
return self.binary_quiet(protocol.memcache.encode_binary_storage(protocol.memcache.binary_opcode_setq(), key, value, flags, ttl_sec));@briefSets state or configuration with `Conn.set_noreply`.
@detailsExecutes the `set_noreply` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- valueValue to write or store.
- flagsBitmask of option flags that controls how the operation is performed.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.add_noreply
Signature
func add_noreply(self: net.memcache.Conn, key: String, value: String, flags: Int = 0, ttl_sec: Int = 0) -> ErrCode func add_noreply(self: net.memcache.Conn, key: String, value: String, flags: Int = 0, ttl_sec: Int = 0) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
return self.binary_quiet(protocol.memcache.encode_binary_storage(protocol.memcache.binary_opcode_addq(), key, value, flags, ttl_sec));@briefProvides the system library operation `Conn.add_noreply`.
@detailsExecutes the `add_noreply` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- valueValue to write or store.
- flagsBitmask of option flags that controls how the operation is performed.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.add
Signature
func add(self: net.memcache.Conn, key: String, value: String, flags: Int = 0, ttl_sec: Int = 0) -> ErrCode func add(self: net.memcache.Conn, key: String, value: String, flags: Int = 0, ttl_sec: Int = 0) -> ErrCode {
return self.storage("add", key, value, flags, ttl_sec);
}@briefProvides the system library operation `Conn.add`.
@detailsExecutes the `add` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- valueValue to write or store.
- flagsBitmask of option flags that controls how the operation is performed.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.replace
Signature
func replace(self: net.memcache.Conn, key: String, value: String, flags: Int = 0, ttl_sec: Int = 0) -> ErrCode func replace(self: net.memcache.Conn, key: String, value: String, flags: Int = 0, ttl_sec: Int = 0) -> ErrCode {
return self.storage("replace", key, value, flags, ttl_sec);
}@briefProvides the system library operation `Conn.replace`.
@detailsExecutes the `replace` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- valueValue to write or store.
- flagsBitmask of option flags that controls how the operation is performed.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.replace_noreply
Signature
func replace_noreply(self: net.memcache.Conn, key: String, value: String, flags: Int = 0, ttl_sec: Int = 0) -> ErrCode func replace_noreply(self: net.memcache.Conn, key: String, value: String, flags: Int = 0, ttl_sec: Int = 0) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
return self.binary_quiet(protocol.memcache.encode_binary_storage(protocol.memcache.binary_opcode_replaceq(), key, value, flags, ttl_sec));@briefProvides the system library operation `Conn.replace_noreply`.
@detailsExecutes the `replace_noreply` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- valueValue to write or store.
- flagsBitmask of option flags that controls how the operation is performed.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.append
Signature
func append(self: net.memcache.Conn, key: String, value: String) -> ErrCode func append(self: net.memcache.Conn, key: String, value: String) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let response, err = self.binary_command(protocol.memcache.encode_binary_append(protocol.memcache.binary_opcode_append(), key, value));@briefProvides the system library operation `Conn.append`.
@detailsExecutes the `append` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- valueValue to write or store.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.append_noreply
Signature
func append_noreply(self: net.memcache.Conn, key: String, value: String) -> ErrCode func append_noreply(self: net.memcache.Conn, key: String, value: String) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
return self.binary_quiet(protocol.memcache.encode_binary_append(protocol.memcache.binary_opcode_appendq(), key, value));@briefProvides the system library operation `Conn.append_noreply`.
@detailsExecutes the `append_noreply` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- valueValue to write or store.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.prepend
Signature
func prepend(self: net.memcache.Conn, key: String, value: String) -> ErrCode func prepend(self: net.memcache.Conn, key: String, value: String) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let response, err = self.binary_command(protocol.memcache.encode_binary_append(protocol.memcache.binary_opcode_prepend(), key, value));@briefProvides the system library operation `Conn.prepend`.
@detailsExecutes the `prepend` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- valueValue to write or store.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.prepend_noreply
Signature
func prepend_noreply(self: net.memcache.Conn, key: String, value: String) -> ErrCode func prepend_noreply(self: net.memcache.Conn, key: String, value: String) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
return self.binary_quiet(protocol.memcache.encode_binary_append(protocol.memcache.binary_opcode_prependq(), key, value));@briefProvides the system library operation `Conn.prepend_noreply`.
@detailsExecutes the `prepend_noreply` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- valueValue to write or store.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.cas
Signature
func cas(self: net.memcache.Conn, key: String, value: String, flags: Int, ttl_sec: Int, cas: UInt64) -> ErrCode func cas(self: net.memcache.Conn, key: String, value: String, flags: Int, ttl_sec: Int, cas: UInt64) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let response, err = self.binary_command(protocol.memcache.encode_binary_storage(protocol.memcache.binary_opcode_set(), key, value, flags, ttl_sec, 0, cas));@briefProvides the system library operation `Conn.cas`.
@detailsExecutes the `cas` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- valueValue to write or store.
- flagsBitmask of option flags that controls how the operation is performed.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
- casCompare-and-swap token used to perform conditional cache updates.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.cas_noreply
Signature
func cas_noreply(self: net.memcache.Conn, key: String, value: String, flags: Int, ttl_sec: Int, cas: UInt64) -> ErrCode func cas_noreply(self: net.memcache.Conn, key: String, value: String, flags: Int, ttl_sec: Int, cas: UInt64) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
return self.binary_quiet(protocol.memcache.encode_binary_storage(protocol.memcache.binary_opcode_setq(), key, value, flags, ttl_sec, 0, cas));@briefProvides the system library operation `Conn.cas_noreply`.
@detailsExecutes the `cas_noreply` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- valueValue to write or store.
- flagsBitmask of option flags that controls how the operation is performed.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
- casCompare-and-swap token used to perform conditional cache updates.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.delete
Signature
func delete(self: net.memcache.Conn, key: String) -> ErrCode func delete(self: net.memcache.Conn, key: String) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let response, err = self.binary_command(protocol.memcache.encode_binary_delete(key));@briefDeletes an element with `Conn.delete`.
@detailsExecutes the `delete` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.delete_noreply
Signature
func delete_noreply(self: net.memcache.Conn, key: String) -> ErrCode func delete_noreply(self: net.memcache.Conn, key: String) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
return self.binary_quiet(protocol.memcache.encode_binary_request(protocol.memcache.binary_opcode_deleteq(), key, "", ""));@briefProvides the system library operation `Conn.delete_noreply`.
@detailsExecutes the `delete_noreply` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.incr
Signature
func incr(self: net.memcache.Conn, key: String, delta: UInt64) -> UInt64, ErrCode func incr(self: net.memcache.Conn, key: String, delta: UInt64) -> UInt64, ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let response: protocol.memcache.Response = self.binary_command(protocol.memcache.encode_binary_counter(protocol.memcache.binary_opcode_increment(), key, delta))?;@briefProvides the system library operation `Conn.incr`.
@detailsExecutes the `incr` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- deltaSigned amount added to or subtracted from the current numeric value.
@returnReturns `UInt64, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.incr_noreply
Signature
func incr_noreply(self: net.memcache.Conn, key: String, delta: UInt64) -> ErrCode func incr_noreply(self: net.memcache.Conn, key: String, delta: UInt64) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
return self.binary_quiet(protocol.memcache.encode_binary_counter(protocol.memcache.binary_opcode_incrementq(), key, delta));@briefProvides the system library operation `Conn.incr_noreply`.
@detailsExecutes the `incr_noreply` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- deltaSigned amount added to or subtracted from the current numeric value.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.decr
Signature
func decr(self: net.memcache.Conn, key: String, delta: UInt64) -> UInt64, ErrCode func decr(self: net.memcache.Conn, key: String, delta: UInt64) -> UInt64, ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let response: protocol.memcache.Response = self.binary_command(protocol.memcache.encode_binary_counter(protocol.memcache.binary_opcode_decrement(), key, delta))?;@briefProvides the system library operation `Conn.decr`.
@detailsExecutes the `decr` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- deltaSigned amount added to or subtracted from the current numeric value.
@returnReturns `UInt64, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.decr_noreply
Signature
func decr_noreply(self: net.memcache.Conn, key: String, delta: UInt64) -> ErrCode func decr_noreply(self: net.memcache.Conn, key: String, delta: UInt64) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
return self.binary_quiet(protocol.memcache.encode_binary_counter(protocol.memcache.binary_opcode_decrementq(), key, delta));@briefProvides the system library operation `Conn.decr_noreply`.
@detailsExecutes the `decr_noreply` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- deltaSigned amount added to or subtracted from the current numeric value.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.touch
Signature
func touch(self: net.memcache.Conn, key: String, ttl_sec: Int) -> ErrCode func touch(self: net.memcache.Conn, key: String, ttl_sec: Int) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let response, err = self.binary_command(protocol.memcache.encode_binary_touch(key, ttl_sec));@briefProvides the system library operation `Conn.touch`.
@detailsExecutes the `touch` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.touch_noreply
Signature
func touch_noreply(self: net.memcache.Conn, key: String, ttl_sec: Int) -> ErrCode func touch_noreply(self: net.memcache.Conn, key: String, ttl_sec: Int) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let response, err = self.binary_command(protocol.memcache.encode_binary_touch(key, ttl_sec));@briefProvides the system library operation `Conn.touch_noreply`.
@detailsExecutes the `touch_noreply` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.gat
Signature
func gat(self: net.memcache.Conn, key: String, ttl_sec: Int) -> protocol.memcache.Item, ErrCode func gat(self: net.memcache.Conn, key: String, ttl_sec: Int) -> protocol.memcache.Item, ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let response: protocol.memcache.Response = self.binary_command(protocol.memcache.encode_binary_gat(key, ttl_sec))?;@briefProvides the system library operation `Conn.gat`.
@detailsExecutes the `gat` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
@returnReturns `protocol.memcache.Item, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.gats
Signature
func gats(self: net.memcache.Conn, key: String, ttl_sec: Int) -> protocol.memcache.Item, ErrCode func gats(self: net.memcache.Conn, key: String, ttl_sec: Int) -> protocol.memcache.Item, ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
return self.gat(key, ttl_sec);@briefProvides the system library operation `Conn.gats`.
@detailsExecutes the `gats` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
@returnReturns `protocol.memcache.Item, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.stats
Signature
func stats(self: net.memcache.Conn, section: String = "") -> collections.Map<String, String>, ErrCode func stats(self: net.memcache.Conn, section: String = "") -> collections.Map<String, String>, ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let out: collections.Map<String, String> = new collections.Map<String, String>();@briefProvides the system library operation `Conn.stats`.
@detailsExecutes the `stats` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- sectionNamed section, segment, or record group processed by the operation.
@returnReturns `collections.Map<String, String>, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.version
Signature
func version(self: net.memcache.Conn) -> String, ErrCode func version(self: net.memcache.Conn) -> String, ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let response: protocol.memcache.Response = self.binary_command(protocol.memcache.encode_binary_simple(protocol.memcache.binary_opcode_version()))?;@briefProvides the system library operation `Conn.version`.
@detailsExecutes the `version` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns `String, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.verbosity
Signature
func verbosity(self: net.memcache.Conn, level: Int) -> ErrCode func verbosity(self: net.memcache.Conn, level: Int) -> ErrCode {
let response, err = self.command(protocol.memcache.args("verbosity", strconv.itoa(level)));
if err != std.OK {@briefProvides the system library operation `Conn.verbosity`.
@detailsExecutes the `verbosity` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- levelCompression level, log level, nesting level, or protocol level value.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.flush_all
Signature
func flush_all(self: net.memcache.Conn, delay_sec: Int = 0) -> ErrCode func flush_all(self: net.memcache.Conn, delay_sec: Int = 0) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let response, err = self.binary_command(protocol.memcache.encode_binary_flush(delay_sec));@briefProvides the system library operation `Conn.flush_all`.
@detailsExecutes the `flush_all` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- delay_secDelay duration in seconds before retrying, expiring, or executing work.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.flush_all_noreply
Signature
func flush_all_noreply(self: net.memcache.Conn, delay_sec: Int = 0) -> ErrCode func flush_all_noreply(self: net.memcache.Conn, delay_sec: Int = 0) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
return self.binary_quiet(protocol.memcache.encode_binary_request(protocol.memcache.binary_opcode_flushq(), "", protocol.memcache.u32_be(delay_sec), ""));@briefProvides the system library operation `Conn.flush_all_noreply`.
@detailsExecutes the `flush_all_noreply` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- delay_secDelay duration in seconds before retrying, expiring, or executing work.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.quit
Signature
func quit(self: net.memcache.Conn) -> ErrCode func quit(self: net.memcache.Conn) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let write_err: ErrCode = self.send_all(protocol.memcache.encode_binary_simple(protocol.memcache.binary_opcode_quit()));@briefProvides the system library operation `Conn.quit`.
@detailsExecutes the `quit` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.noop
Signature
func noop(self: net.memcache.Conn) -> ErrCode func noop(self: net.memcache.Conn) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let response, err = self.binary_command(protocol.memcache.encode_binary_simple(protocol.memcache.binary_opcode_noop()));@briefProvides the system library operation `Conn.noop`.
@detailsExecutes the `noop` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.quitq
Signature
func quitq(self: net.memcache.Conn) -> ErrCode func quitq(self: net.memcache.Conn) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let write_err: ErrCode = self.send_all(protocol.memcache.encode_binary_simple(protocol.memcache.binary_opcode_quitq()));@briefProvides the system library operation `Conn.quitq`.
@detailsExecutes the `quitq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.meta_get
Signature
func meta_get(self: net.memcache.Conn, key: String, flags: collections.Vector<String>) -> protocol.memcache.Response, ErrCode func meta_get(self: net.memcache.Conn, key: String, flags: collections.Vector<String>) -> protocol.memcache.Response, ErrCode {
return self.command_raw(protocol.memcache.encode_meta_get(key, flags));
}@briefProvides the system library operation `Conn.meta_get`.
@detailsExecutes the `meta_get` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- flagsBitmask of option flags that controls how the operation is performed.
@returnReturns `protocol.memcache.Response, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.meta_get_options
Signature
func meta_get_options(self: net.memcache.Conn, key: String, opts: protocol.memcache.MetaOptions) -> protocol.memcache.Response, ErrCode func meta_get_options(self: net.memcache.Conn, key: String, opts: protocol.memcache.MetaOptions) -> protocol.memcache.Response, ErrCode {
return self.command_raw(protocol.memcache.encode_meta_get_options(key, opts));
}@briefProvides the system library operation `Conn.meta_get_options`.
@detailsExecutes the `meta_get_options` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- optsOption flags or option object that customizes the operation.
@returnReturns `protocol.memcache.Response, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.meta_set
Signature
func meta_set(self: net.memcache.Conn, key: String, value: String, flags: collections.Vector<String>) -> protocol.memcache.Response, ErrCode func meta_set(self: net.memcache.Conn, key: String, value: String, flags: collections.Vector<String>) -> protocol.memcache.Response, ErrCode {
return self.command_raw(protocol.memcache.encode_meta_set(key, value, flags));
}@briefProvides the system library operation `Conn.meta_set`.
@detailsExecutes the `meta_set` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- valueValue to write or store.
- flagsBitmask of option flags that controls how the operation is performed.
@returnReturns `protocol.memcache.Response, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.meta_set_options
Signature
func meta_set_options(self: net.memcache.Conn, key: String, value: String, opts: protocol.memcache.MetaOptions) -> protocol.memcache.Response, ErrCode func meta_set_options(self: net.memcache.Conn, key: String, value: String, opts: protocol.memcache.MetaOptions) -> protocol.memcache.Response, ErrCode {
return self.command_raw(protocol.memcache.encode_meta_set_options(key, value, opts));
}@briefProvides the system library operation `Conn.meta_set_options`.
@detailsExecutes the `meta_set_options` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- valueValue to write or store.
- optsOption flags or option object that customizes the operation.
@returnReturns `protocol.memcache.Response, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.meta_delete
Signature
func meta_delete(self: net.memcache.Conn, key: String, flags: collections.Vector<String>) -> protocol.memcache.Response, ErrCode func meta_delete(self: net.memcache.Conn, key: String, flags: collections.Vector<String>) -> protocol.memcache.Response, ErrCode {
let args: collections.Vector<String> = new collections.Vector<String>();
_ = args.push("md");@briefProvides the system library operation `Conn.meta_delete`.
@detailsExecutes the `meta_delete` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- flagsBitmask of option flags that controls how the operation is performed.
@returnReturns `protocol.memcache.Response, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.meta_delete_options
Signature
func meta_delete_options(self: net.memcache.Conn, key: String, opts: protocol.memcache.MetaOptions) -> protocol.memcache.Response, ErrCode func meta_delete_options(self: net.memcache.Conn, key: String, opts: protocol.memcache.MetaOptions) -> protocol.memcache.Response, ErrCode {
return self.command_raw(protocol.memcache.encode_meta_command("md", key, opts));
}@briefProvides the system library operation `Conn.meta_delete_options`.
@detailsExecutes the `meta_delete_options` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- optsOption flags or option object that customizes the operation.
@returnReturns `protocol.memcache.Response, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.meta_arithmetic
Signature
func meta_arithmetic(self: net.memcache.Conn, key: String, flags: collections.Vector<String>) -> protocol.memcache.Response, ErrCode func meta_arithmetic(self: net.memcache.Conn, key: String, flags: collections.Vector<String>) -> protocol.memcache.Response, ErrCode {
let args: collections.Vector<String> = new collections.Vector<String>();
_ = args.push("ma");@briefProvides the system library operation `Conn.meta_arithmetic`.
@detailsExecutes the `meta_arithmetic` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- flagsBitmask of option flags that controls how the operation is performed.
@returnReturns `protocol.memcache.Response, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.meta_arithmetic_options
Signature
func meta_arithmetic_options(self: net.memcache.Conn, key: String, opts: protocol.memcache.MetaOptions) -> protocol.memcache.Response, ErrCode func meta_arithmetic_options(self: net.memcache.Conn, key: String, opts: protocol.memcache.MetaOptions) -> protocol.memcache.Response, ErrCode {
return self.command_raw(protocol.memcache.encode_meta_command("ma", key, opts));
}@briefProvides the system library operation `Conn.meta_arithmetic_options`.
@detailsExecutes the `meta_arithmetic_options` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- optsOption flags or option object that customizes the operation.
@returnReturns `protocol.memcache.Response, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.meta_noop
Signature
func meta_noop(self: net.memcache.Conn) -> ErrCode func meta_noop(self: net.memcache.Conn) -> ErrCode {
let response, err = self.command(protocol.memcache.args("mn"));
if err != std.OK {@briefProvides the system library operation `Conn.meta_noop`.
@detailsExecutes the `meta_noop` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.meta_echo
Signature
func meta_echo(self: net.memcache.Conn, token: String) -> protocol.memcache.Response, ErrCode func meta_echo(self: net.memcache.Conn, token: String) -> protocol.memcache.Response, ErrCode {
return self.command(protocol.memcache.args("me", token));
}@briefProvides the system library operation `Conn.meta_echo`.
@detailsExecutes the `meta_echo` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- tokenToken string used for parsing, authentication, or protocol correlation.
@returnReturns `protocol.memcache.Response, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.auth
Signature
func auth(self: net.memcache.Conn, username: String, password: String) -> ErrCode func auth(self: net.memcache.Conn, username: String, password: String) -> ErrCode {
if self.protocol_mode == protocol.memcache.MEMCACHE_BINARY {
let mech_response, mech_err = self.binary_command(protocol.memcache.encode_binary_request(protocol.memcache.binary_opcode_sasl_list_mechs(), "", "", ""));@briefProvides the system library operation `Conn.auth`.
@detailsExecutes the `auth` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- usernameUser name supplied for authentication or account lookup.
- passwordPassword or authentication secret supplied to the protocol login flow.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Conn.sasl_step
Signature
func sasl_step(self: net.memcache.Conn, mechanism: String, payload: String) -> protocol.memcache.Response, ErrCode func sasl_step(self: net.memcache.Conn, mechanism: String, payload: String) -> protocol.memcache.Response, ErrCode {
if self.protocol_mode != protocol.memcache.MEMCACHE_BINARY {
return new protocol.memcache.Response(), std.ERR_INVALID;@briefProvides the system library operation `Conn.sasl_step`.
@detailsExecutes the `sasl_step` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- mechanismAuthentication or protocol mechanism name selected by the caller.
- payloadPayload bytes or text carried by the protocol frame, request, or response.
@returnReturns `protocol.memcache.Response, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::UdpClient.init
Signature
func init(self: net.memcache.UdpClient, fd: Int, host: String, port: Int, timeout_ms: Int = 5000) -> Void func init(self: net.memcache.UdpClient, fd: Int, host: String, port: Int, timeout_ms: Int = 5000) -> Void {
self.fd = fd;
self.host = host;@briefInitializes a `UdpClient` instance.
@detailsEstablishes the initial field state for `UdpClient` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- fdOperating-system file descriptor or socket descriptor.
- hostHost name or listen address.
- portPort number.
- timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionnet.memcache::UdpClient.alloc_request_id
Signature
func alloc_request_id(self: net.memcache.UdpClient) -> Int func alloc_request_id(self: net.memcache.UdpClient) -> Int {
let id: Int = self.next_request_id;
self.next_request_id += 1;@briefProvides the system library operation `UdpClient.alloc_request_id`.
@detailsExecutes the `alloc_request_id` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns the operation result as `Int`.
functionnet.memcache::UdpClient.command_raw
Signature
func command_raw(self: net.memcache.UdpClient, wire: String) -> protocol.memcache.Response, ErrCode func command_raw(self: net.memcache.UdpClient, wire: String) -> protocol.memcache.Response, ErrCode {
let request_id: Int = self.alloc_request_id();
let payload_limit: Int = self.max_datagram_bytes - 8;@briefProvides the system library operation `UdpClient.command_raw`.
@detailsExecutes the `command_raw` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- wireWire-format protocol payload to decode or forward.
@returnReturns `protocol.memcache.Response, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::UdpClient.command
Signature
func command(self: net.memcache.UdpClient, args: collections.Vector<String>, payload: String = "") -> protocol.memcache.Response, ErrCode func command(self: net.memcache.UdpClient, args: collections.Vector<String>, payload: String = "") -> protocol.memcache.Response, ErrCode {
return self.command_raw(protocol.memcache.encode_command(args, payload));
}@briefProvides the system library operation `UdpClient.command`.
@detailsExecutes the `command` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- argsArgument list forwarded to the command, process, callback, or formatter.
- payloadPayload bytes or text carried by the protocol frame, request, or response.
@returnReturns `protocol.memcache.Response, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::UdpClient.get
Signature
func get(self: net.memcache.UdpClient, key: String) -> protocol.memcache.Item, ErrCode func get(self: net.memcache.UdpClient, key: String) -> protocol.memcache.Item, ErrCode {
let response: protocol.memcache.Response = self.command(protocol.memcache.args("get", key))?;
if response.items.len() <= 0 {@briefReads the element for `UdpClient.get`.
@detailsExecutes the `get` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
@returnReturns `protocol.memcache.Item, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::UdpClient.set
Signature
func set(self: net.memcache.UdpClient, key: String, value: String, flags: Int = 0, ttl_sec: Int = 0) -> ErrCode func set(self: net.memcache.UdpClient, key: String, value: String, flags: Int = 0, ttl_sec: Int = 0) -> ErrCode {
let response, err = self.command_raw(protocol.memcache.encode_storage("set", key, flags, ttl_sec, value));
if err != std.OK {@briefSets an element with `UdpClient.set`.
@detailsExecutes the `set` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- valueValue to write or store.
- flagsBitmask of option flags that controls how the operation is performed.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::UdpClient.close
Signature
func close(self: net.memcache.UdpClient) -> Void func close(self: net.memcache.UdpClient) -> Void {
if !self.closed {
_ = net.udp.close(self.fd);@briefCloses resources and makes later operations unavailable with `UdpClient.close`.
@detailsExecutes the `close` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::UdpClient.deinit
Signature
func deinit(self: net.memcache.UdpClient) -> Void func deinit(self: net.memcache.UdpClient) -> Void {
_ = self.close();
}@briefReleases fallback resources at the end of the `UdpClient` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::connect_udp
Signature
func connect_udp(cfg: protocol.memcache.Config) -> net.memcache.UdpClient, ErrCodefunc connect_udp(cfg: protocol.memcache.Config) -> net.memcache.UdpClient, ErrCode {
let fd, err = net.udp.bind("0.0.0.0", 0);
if err != std.OK {@briefProvides the system library operation `connect_udp`.
@detailsExecutes the `connect_udp` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- cfgConfiguration value or pointer used to initialize or control the operation.
@returnReturns `net.memcache.UdpClient, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::binary_storage_opcode
Signature
func binary_storage_opcode(command_name: String) -> Intfunc binary_storage_opcode(command_name: String) -> Int {
if command_name == "set" {
return protocol.memcache.binary_opcode_set();@briefProvides the system library operation `binary_storage_opcode`.
@detailsExecutes the `binary_storage_opcode` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- command_nameProtocol command name to encode, send, dispatch, or execute.
@returnReturns the operation result as `Int`.
functionnet.memcache::err_code_from_memcache
Signature
func err_code_from_memcache(err: protocol.memcache.Error) -> ErrCodefunc err_code_from_memcache(err: protocol.memcache.Error) -> ErrCode {
if err.kind == protocol.memcache.MEMCACHE_ERR_NOT_FOUND {
return std.ERR_NOT_FOUND;@briefProvides the system library operation `err_code_from_memcache`.
@detailsExecutes the `err_code_from_memcache` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- errError code or error object.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::connect
Signature
func connect(cfg: protocol.memcache.Config) -> net.memcache.Conn, ErrCodefunc connect(cfg: protocol.memcache.Config) -> net.memcache.Conn, ErrCode {
let fd, tcp_err = net.tcp.connect(cfg.host, cfg.port, cfg.timeout_ms);
if tcp_err != std.OK {@briefEstablishes a connection with `connect`.
@detailsExecutes the `connect` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- cfgConfiguration value or pointer used to initialize or control the operation.
@returnReturns `net.memcache.Conn, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::PoolConfig.init
Signature
func init(self: net.memcache.PoolConfig) -> Void func init(self: net.memcache.PoolConfig) -> Void {
self.base = new protocol.memcache.Config();
self.max_size = 16;@briefInitializes a `PoolConfig` instance.
@detailsEstablishes the initial field state for `PoolConfig` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::PoolConfig.deinit
Signature
func deinit(self: net.memcache.PoolConfig) -> Void func deinit(self: net.memcache.PoolConfig) -> Void {
}
}@briefReleases fallback resources at the end of the `PoolConfig` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::Pool.init
Signature
func init(self: net.memcache.Pool, cfg: net.memcache.PoolConfig) -> Void func init(self: net.memcache.Pool, cfg: net.memcache.PoolConfig) -> Void {
self.cfg = cfg;
self.idle = new collections.Vector<net.memcache.Conn>();@briefInitializes a `Pool` instance.
@detailsEstablishes the initial field state for `Pool` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- cfgConfiguration value or pointer used to initialize or control the operation.
@returnVoid
functionnet.memcache::Pool.should_discard
Signature
func should_discard(self: net.memcache.Pool, conn: net.memcache.Conn) -> Bool func should_discard(self: net.memcache.Pool, conn: net.memcache.Conn) -> Bool {
let now: Int = time.now_ms();
if conn.closed || conn.broken || self.cfg.max_idle_ms > 0 && now - conn.last_used_at_ms > self.cfg.max_idle_ms || self.cfg.max_lifetime_ms > 0 && now - conn.created_at_ms > self.cfg.max_lifetime_ms {@briefProvides the system library operation `Pool.should_discard`.
@detailsExecutes the `should_discard` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- connConnection object or native connection handle used for network I/O.
@returnReturns a boolean result; true means the condition holds or the operation succeeded.
functionnet.memcache::Pool.acquire
Signature
func acquire(self: net.memcache.Pool) -> net.memcache.Conn, ErrCode func acquire(self: net.memcache.Pool) -> net.memcache.Conn, ErrCode {
let deadline: Int = time.now_ms() + self.cfg.acquire_timeout_ms;
loop (; true; ) {@briefProvides the system library operation `Pool.acquire`.
@detailsExecutes the `acquire` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns `net.memcache.Conn, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::Pool.release
Signature
func release(self: net.memcache.Pool, conn: net.memcache.Conn) -> Void func release(self: net.memcache.Pool, conn: net.memcache.Conn) -> Void {
conn.borrowed_at_ms = 0;
if self.should_discard(conn) {@briefProvides the system library operation `Pool.release`.
@detailsExecutes the `release` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- connConnection object or native connection handle used for network I/O.
@returnVoid
functionnet.memcache::Pool.close
Signature
func close(self: net.memcache.Pool) -> Void func close(self: net.memcache.Pool) -> Void {
if self.closed {
return;@briefCloses resources and makes later operations unavailable with `Pool.close`.
@detailsExecutes the `close` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::Pool.deinit
Signature
func deinit(self: net.memcache.Pool) -> Void func deinit(self: net.memcache.Pool) -> Void {
_ = self.close();
}@briefReleases fallback resources at the end of the `Pool` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::Server.init
Signature
func init(self: net.memcache.Server, host: String = "127.0.0.1", port: Int = 11211, weight: Int = 1) -> Void func init(self: net.memcache.Server, host: String = "127.0.0.1", port: Int = 11211, weight: Int = 1) -> Void {
self.host = host;
self.port = port;@briefInitializes a `Server` instance.
@detailsEstablishes the initial field state for `Server` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- hostHost name or listen address.
- portPort number.
- weightWeight value used to rank, combine, or scale results.
@returnVoid
functionnet.memcache::Server.deinit
Signature
func deinit(self: net.memcache.Server) -> Void func deinit(self: net.memcache.Server) -> Void {
}
}@briefReleases fallback resources at the end of the `Server` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::HashNode.init
Signature
func init(self: net.memcache.HashNode, hash_value: Int = 0, server_index: Int = 0) -> Void func init(self: net.memcache.HashNode, hash_value: Int = 0, server_index: Int = 0) -> Void {
self.hash_value = hash_value;
self.server_index = server_index;@briefInitializes a `HashNode` instance.
@detailsEstablishes the initial field state for `HashNode` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- hash_valueValue supplied by the caller for storage, comparison, or encoding.
- server_indexIndex of the server entry selected from the connection pool or server list.
@returnVoid
functionnet.memcache::HashNode.deinit
Signature
func deinit(self: net.memcache.HashNode) -> Void func deinit(self: net.memcache.HashNode) -> Void {
}
}@briefReleases fallback resources at the end of the `HashNode` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::ConsistentHash.init
Signature
func init(self: net.memcache.ConsistentHash) -> Void func init(self: net.memcache.ConsistentHash) -> Void {
self.nodes = new collections.Vector<net.memcache.HashNode>();
}@briefInitializes a `ConsistentHash` instance.
@detailsEstablishes the initial field state for `ConsistentHash` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::ConsistentHash.add_server
Signature
func add_server(self: net.memcache.ConsistentHash, server_index: Int, label: String, weight: Int) -> Void func add_server(self: net.memcache.ConsistentHash, server_index: Int, label: String, weight: Int) -> Void {
let replicas: Int = weight * 64;
loop (let replica_index: Int = 0; replica_index < replicas; replica_index += 1) {@briefProvides the system library operation `ConsistentHash.add_server`.
@detailsExecutes the `add_server` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- server_indexIndex of the server entry selected from the connection pool or server list.
- labelLabel string associated with the value, resource, or output.
- weightWeight value used to rank, combine, or scale results.
@returnVoid
functionnet.memcache::ConsistentHash.pick
Signature
func pick(self: net.memcache.ConsistentHash, key: String) -> Int func pick(self: net.memcache.ConsistentHash, key: String) -> Int {
if self.nodes.len() <= 0 {
return -1;@briefProvides the system library operation `ConsistentHash.pick`.
@detailsExecutes the `pick` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
@returnReturns the operation result as `Int`.
functionnet.memcache::ConsistentHash.dispose
Signature
func dispose(self: net.memcache.ConsistentHash) -> Void func dispose(self: net.memcache.ConsistentHash) -> Void {
_ = self.nodes.dispose();
}@briefExplicitly releases resources owned by `ConsistentHash`.
@detailsThis method deterministically cleans up file descriptors, network connections, native handles, buffers, or other external resources. Implementations should be idempotent where possible, and repeated calls must not corrupt object state.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::ConsistentHash.deinit
Signature
func deinit(self: net.memcache.ConsistentHash) -> Void func deinit(self: net.memcache.ConsistentHash) -> Void {
_ = self.dispose();
}@briefReleases fallback resources at the end of the `ConsistentHash` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::ShardedClient.init
Signature
func init(self: net.memcache.ShardedClient) -> Void func init(self: net.memcache.ShardedClient) -> Void {
self.servers = new collections.Vector<net.memcache.Server>();
self.pools = new collections.Vector<net.memcache.Pool>();@briefInitializes a `ShardedClient` instance.
@detailsEstablishes the initial field state for `ShardedClient` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::ShardedClient.add_server
Signature
func add_server(self: net.memcache.ShardedClient, server: net.memcache.Server, cfg: net.memcache.PoolConfig) -> Void func add_server(self: net.memcache.ShardedClient, server: net.memcache.Server, cfg: net.memcache.PoolConfig) -> Void {
let index: Int = self.servers.len();
_ = self.servers.push(server);@briefProvides the system library operation `ShardedClient.add_server`.
@detailsExecutes the `add_server` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- serverServer address, descriptor, or connection target used by the operation.
- cfgConfiguration value or pointer used to initialize or control the operation.
@returnVoid
functionnet.memcache::ShardedClient.pool_for_key
Signature
func pool_for_key(self: net.memcache.ShardedClient, key: String) -> net.memcache.Pool, ErrCode func pool_for_key(self: net.memcache.ShardedClient, key: String) -> net.memcache.Pool, ErrCode {
let index: Int = self.hasher.pick(key);
if index < 0 || index >= self.pools.len() {@briefProvides the system library operation `ShardedClient.pool_for_key`.
@detailsExecutes the `pool_for_key` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
@returnReturns `net.memcache.Pool, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::ShardedClient.get
Signature
func get(self: net.memcache.ShardedClient, key: String) -> protocol.memcache.Item, ErrCode func get(self: net.memcache.ShardedClient, key: String) -> protocol.memcache.Item, ErrCode {
let pool: net.memcache.Pool = self.pool_for_key(key)?;
let conn: net.memcache.Conn = pool.acquire()?;@briefReads the element for `ShardedClient.get`.
@detailsExecutes the `get` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
@returnReturns `protocol.memcache.Item, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::ShardedClient.set
Signature
func set(self: net.memcache.ShardedClient, key: String, value: String, flags: Int = 0, ttl_sec: Int = 0) -> ErrCode func set(self: net.memcache.ShardedClient, key: String, value: String, flags: Int = 0, ttl_sec: Int = 0) -> ErrCode {
let pool, pool_err = self.pool_for_key(key);
if pool_err != std.OK {@briefSets an element with `ShardedClient.set`.
@detailsExecutes the `set` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- keyKey name.
- valueValue to write or store.
- flagsBitmask of option flags that controls how the operation is performed.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionnet.memcache::ShardedClient.close
Signature
func close(self: net.memcache.ShardedClient) -> Void func close(self: net.memcache.ShardedClient) -> Void {
if self.closed {
return;@briefCloses resources and makes later operations unavailable with `ShardedClient.close`.
@detailsExecutes the `close` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionnet.memcache::ShardedClient.deinit
Signature
func deinit(self: net.memcache.ShardedClient) -> Void func deinit(self: net.memcache.ShardedClient) -> Void {
_ = self.close();
}@briefReleases fallback resources at the end of the `ShardedClient` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
Variables
Class fields (var).
varnet.memcache::ResultList.values
Type
collections.Vector<protocol.memcache.Item>@brief`values` field.
@detailsHolds the `values` value for each `ResultList` instance. The field type is `collections.Vector<protocol.memcache.Item>`, and constructors and methods keep it synchronized with the object's runtime state.
var values: collections.Vector<protocol.memcache.Item>;
/*varnet.memcache::Conn.fd
Type
Int@brief`fd` field.
@detailsStores the underlying file descriptor or socket descriptor. The field type is `Int`, and it is maintained by the constructors and methods of `Conn`.
var fd: Int;
/*
@brief `tls_h` field.varnet.memcache::Conn.tls_h
Type
Int@brief`tls_h` field.
@detailsHolds the `tls_h` value for each `Conn` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var tls_h: Int;
/*
@brief `tls_enabled` field.varnet.memcache::Conn.tls_enabled
Type
Bool@brief`tls_enabled` field.
@detailsHolds the `tls_enabled` value for each `Conn` instance. The field type is `Bool`, and constructors and methods keep it synchronized with the object's runtime state.
var tls_enabled: Bool;
/*
@brief `timeout_ms` field.varnet.memcache::Conn.timeout_ms
Type
Int@brief`timeout_ms` field.
@detailsStores the default timeout in milliseconds. The field type is `Int`, and it is maintained by the constructors and methods of `Conn`.
var timeout_ms: Int;
/*
@brief `read_timeout_ms` field.varnet.memcache::Conn.read_timeout_ms
Type
Int@brief`read_timeout_ms` field.
@detailsHolds the `read_timeout_ms` value for each `Conn` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var read_timeout_ms: Int;
/*
@brief `write_timeout_ms` field.varnet.memcache::Conn.write_timeout_ms
Type
Int@brief`write_timeout_ms` field.
@detailsHolds the `write_timeout_ms` value for each `Conn` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var write_timeout_ms: Int;
/*
@brief `closed` field.varnet.memcache::Conn.closed
Type
Bool@brief`closed` field.
@detailsIndicates whether the resource has already been closed. The field type is `Bool`, and it is maintained by the constructors and methods of `Conn`.
var closed: Bool;
/*
@brief `broken` field.varnet.memcache::Conn.broken
Type
Bool@brief`broken` field.
@detailsHolds the `broken` value for each `Conn` instance. The field type is `Bool`, and constructors and methods keep it synchronized with the object's runtime state.
var broken: Bool;
/*
@brief `reader` field.varnet.memcache::Conn.reader
Type
protocol.memcache.Reader@brief`reader` field.
@detailsHolds the `reader` value for each `Conn` instance. The field type is `protocol.memcache.Reader`, and constructors and methods keep it synchronized with the object's runtime state.
var reader: protocol.memcache.Reader;
/*
@brief `last_error` field.varnet.memcache::Conn.last_error
Type
protocol.memcache.Error@brief`last_error` field.
@detailsHolds the `last_error` value for each `Conn` instance. The field type is `protocol.memcache.Error`, and constructors and methods keep it synchronized with the object's runtime state.
var last_error: protocol.memcache.Error;
/*
@brief `protocol_mode` field.varnet.memcache::Conn.protocol_mode
Type
protocol.memcache.ProtocolMode@brief`protocol_mode` field.
@detailsHolds the `protocol_mode` value for each `Conn` instance. The field type is `protocol.memcache.ProtocolMode`, and constructors and methods keep it synchronized with the object's runtime state.
var protocol_mode: protocol.memcache.ProtocolMode;
/*
@brief `created_at_ms` field.varnet.memcache::Conn.created_at_ms
Type
Int@brief`created_at_ms` field.
@detailsHolds the `created_at_ms` value for each `Conn` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var created_at_ms: Int;
/*
@brief `last_used_at_ms` field.varnet.memcache::Conn.last_used_at_ms
Type
Int@brief`last_used_at_ms` field.
@detailsHolds the `last_used_at_ms` value for each `Conn` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var last_used_at_ms: Int;
/*
@brief `borrowed_at_ms` field.varnet.memcache::Conn.borrowed_at_ms
Type
Int@brief`borrowed_at_ms` field.
@detailsHolds the `borrowed_at_ms` value for each `Conn` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var borrowed_at_ms: Int;
/*
@brief `use_count` field.varnet.memcache::Conn.use_count
Type
Int@brief`use_count` field.
@detailsHolds the `use_count` value for each `Conn` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var use_count: Int;
/*varnet.memcache::UdpClient.fd
Type
Int@brief`fd` field.
@detailsStores the underlying file descriptor or socket descriptor. The field type is `Int`, and it is maintained by the constructors and methods of `UdpClient`.
var fd: Int;
/*
@brief `tls_h` field.varnet.memcache::UdpClient.host
Type
String@brief`host` field.
@detailsStores a host name or network address. The field type is `String`, and it is maintained by the constructors and methods of `UdpClient`.
var host: String;
/*
@brief `port` field.varnet.memcache::UdpClient.port
Type
Int@brief`port` field.
@detailsStores a port number. The field type is `Int`, and it is maintained by the constructors and methods of `UdpClient`.
var port: Int;
/*
@brief `timeout_ms` field.varnet.memcache::UdpClient.timeout_ms
Type
Int@brief`timeout_ms` field.
@detailsStores the default timeout in milliseconds. The field type is `Int`, and it is maintained by the constructors and methods of `UdpClient`.
var timeout_ms: Int;
/*
@brief `read_timeout_ms` field.varnet.memcache::UdpClient.max_datagram_bytes
Type
Int@brief`max_datagram_bytes` field.
@detailsHolds the `max_datagram_bytes` value for each `UdpClient` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var max_datagram_bytes: Int;
/*
@brief `next_request_id` field.varnet.memcache::UdpClient.next_request_id
Type
Int@brief`next_request_id` field.
@detailsHolds the `next_request_id` value for each `UdpClient` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var next_request_id: Int;
/*
@brief `closed` field.varnet.memcache::UdpClient.closed
Type
Bool@brief`closed` field.
@detailsIndicates whether the resource has already been closed. The field type is `Bool`, and it is maintained by the constructors and methods of `UdpClient`.
var closed: Bool;
/*
@brief `broken` field.varnet.memcache::PoolConfig.base
Type
protocol.memcache.Config@brief`base` field.
@detailsHolds the `base` value for each `PoolConfig` instance. The field type is `protocol.memcache.Config`, and constructors and methods keep it synchronized with the object's runtime state.
var base: protocol.memcache.Config;
/*
@brief `max_size` field.varnet.memcache::PoolConfig.max_size
Type
Int@brief`max_size` field.
@detailsHolds the `max_size` value for each `PoolConfig` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var max_size: Int;
/*
@brief `min_idle` field.varnet.memcache::PoolConfig.min_idle
Type
Int@brief`min_idle` field.
@detailsHolds the `min_idle` value for each `PoolConfig` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var min_idle: Int;
/*
@brief `acquire_timeout_ms` field.varnet.memcache::PoolConfig.acquire_timeout_ms
Type
Int@brief`acquire_timeout_ms` field.
@detailsHolds the `acquire_timeout_ms` value for each `PoolConfig` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var acquire_timeout_ms: Int;
/*
@brief `max_idle_ms` field.varnet.memcache::PoolConfig.max_idle_ms
Type
Int@brief`max_idle_ms` field.
@detailsHolds the `max_idle_ms` value for each `PoolConfig` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var max_idle_ms: Int;
/*
@brief `max_lifetime_ms` field.varnet.memcache::PoolConfig.max_lifetime_ms
Type
Int@brief`max_lifetime_ms` field.
@detailsHolds the `max_lifetime_ms` value for each `PoolConfig` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var max_lifetime_ms: Int;
/*
@brief `health_check_interval_ms` field.varnet.memcache::PoolConfig.health_check_interval_ms
Type
Int@brief`health_check_interval_ms` field.
@detailsHolds the `health_check_interval_ms` value for each `PoolConfig` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var health_check_interval_ms: Int;
/*
@brief `leak_detection_ms` field.varnet.memcache::PoolConfig.leak_detection_ms
Type
Int@brief`leak_detection_ms` field.
@detailsHolds the `leak_detection_ms` value for each `PoolConfig` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var leak_detection_ms: Int;
/*varnet.memcache::Pool.cfg
Type
net.memcache.PoolConfig@brief`cfg` field.
@detailsHolds the `cfg` value for each `Pool` instance. The field type is `net.memcache.PoolConfig`, and constructors and methods keep it synchronized with the object's runtime state.
var cfg: net.memcache.PoolConfig;
/*
@brief `idle` field.varnet.memcache::Pool.idle
Type
collections.Vector<net.memcache.Conn>@brief`idle` field.
@detailsHolds the `idle` value for each `Pool` instance. The field type is `collections.Vector<net.memcache.Conn>`, and constructors and methods keep it synchronized with the object's runtime state.
var idle: collections.Vector<net.memcache.Conn>;
/*
@brief `mu` field.varnet.memcache::Pool.mu
Type
sync.Mutex@brief`mu` field.
@detailsHolds the `mu` value for each `Pool` instance. The field type is `sync.Mutex`, and constructors and methods keep it synchronized with the object's runtime state.
var mu: sync.Mutex;
/*
@brief `cond` field.varnet.memcache::Pool.cond
Type
sync.CondVar@brief`cond` field.
@detailsHolds the `cond` value for each `Pool` instance. The field type is `sync.CondVar`, and constructors and methods keep it synchronized with the object's runtime state.
var cond: sync.CondVar;
/*
@brief `open_count` field.varnet.memcache::Pool.open_count
Type
Int@brief`open_count` field.
@detailsHolds the `open_count` value for each `Pool` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var open_count: Int;
/*
@brief `closed` field.varnet.memcache::Pool.closed
Type
Bool@brief`closed` field.
@detailsIndicates whether the resource has already been closed. The field type is `Bool`, and it is maintained by the constructors and methods of `Pool`.
var closed: Bool;
/*
@brief `broken` field.varnet.memcache::Server.host
Type
String@brief`host` field.
@detailsStores a host name or network address. The field type is `String`, and it is maintained by the constructors and methods of `Server`.
var host: String;
/*
@brief `port` field.varnet.memcache::Server.port
Type
Int@brief`port` field.
@detailsStores a port number. The field type is `Int`, and it is maintained by the constructors and methods of `Server`.
var port: Int;
/*
@brief `timeout_ms` field.varnet.memcache::Server.weight
Type
Int@brief`weight` field.
@detailsHolds the `weight` value for each `Server` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var weight: Int;
/*varnet.memcache::HashNode.hash_value
Type
Int@brief`hash_value` field.
@detailsHolds the `hash_value` value for each `HashNode` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var hash_value: Int;
/*
@brief `server_index` field.varnet.memcache::HashNode.server_index
Type
Int@brief`server_index` field.
@detailsHolds the `server_index` value for each `HashNode` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var server_index: Int;
/*varnet.memcache::ConsistentHash.nodes
Type
collections.Vector<net.memcache.HashNode>@brief`nodes` field.
@detailsHolds the `nodes` value for each `ConsistentHash` instance. The field type is `collections.Vector<net.memcache.HashNode>`, and constructors and methods keep it synchronized with the object's runtime state.
var nodes: collections.Vector<net.memcache.HashNode>;
/*varnet.memcache::ShardedClient.servers
Type
collections.Vector<net.memcache.Server>@brief`servers` field.
@detailsHolds the `servers` value for each `ShardedClient` instance. The field type is `collections.Vector<net.memcache.Server>`, and constructors and methods keep it synchronized with the object's runtime state.
var servers: collections.Vector<net.memcache.Server>;
/*
@brief `pools` field.varnet.memcache::ShardedClient.pools
Type
collections.Vector<net.memcache.Pool>@brief`pools` field.
@detailsHolds the `pools` value for each `ShardedClient` instance. The field type is `collections.Vector<net.memcache.Pool>`, and constructors and methods keep it synchronized with the object's runtime state.
var pools: collections.Vector<net.memcache.Pool>;
/*
@brief `hasher` field.varnet.memcache::ShardedClient.hasher
Type
net.memcache.ConsistentHash@brief`hasher` field.
@detailsHolds the `hasher` value for each `ShardedClient` instance. The field type is `net.memcache.ConsistentHash`, and constructors and methods keep it synchronized with the object's runtime state.
var hasher: net.memcache.ConsistentHash;
/*
@brief `closed` field.varnet.memcache::ShardedClient.closed
Type
Bool@brief`closed` field.
@detailsIndicates whether the resource has already been closed. The field type is `Bool`, and it is maintained by the constructors and methods of `ShardedClient`.
var closed: Bool;
/*
@brief `broken` field.