C# 클래스 NodeNetAsync.Db.Redis.RedisClient

Simple non-binary-safe Redis Async Client.
파일 보기 프로젝트 열기: soywiz/NodeNetAsync 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
Encoding System.Text.Encoding
TcpClient NodeNetAsync.Net.TcpSocket

공개 메소드들

메소드 설명
AppendAsync ( string Key, string Value ) : Task

Append a value to a key

O(1). The amortized time complexity is O(1) assuming the appended value is small and the already present value is of any size, since the dynamic string library used by Redis will double the free space available on every reallocation. If key already exists and is a string, this command appends the value at the end of the string. If key does not exist it is created and set as an empty string, so APPEND will be similar to SET in this special case.

AuthAsync ( string Password ) : Task

Authenticate to the server

Request for authentication in a password protected Redis server. Redis can be instructed to require a password before allowing clients to execute commands. This is done using the requirepass directive in the configuration file. If password matches the password in the configuration file, the server replies with the OK status code and starts accepting commands. Otherwise, an error is returned and the clients needs to try a new password. Note: because of the high performance nature of Redis, it is possible to try a lot of passwords in parallel in very short time, so make sure to generate a strong and very long password so that this attack is infeasible.

BackgroundRewriteAofAsync ( ) : System.Threading.Tasks.Task

Asynchronously rewrite the append-only file

Rewrites the append-only file to reflect the current dataset in memory. If BGREWRITEAOF fails, no data gets lost as the old AOF will be untouched.

BackgroundSave ( ) : System.Threading.Tasks.Task

Asynchronously save the dataset to disk

Save the DB in background. The OK code is immediately returned. Redis forks, the parent continues to server the clients, the child saves the DB on disk then exit. A client my be able to check if the operation succeeded using the LASTSAVE command.

CloseAsync ( ) : System.Threading.Tasks.Task

CommandAsync ( ) : Task

Sends a command to the redis server

CreateAndConnectAsync ( string Host, ushort Port = 6379, Encoding Encoding = null, string Password = null ) : Task

GetAsync ( string Key ) : Task

SetAsync ( string Key, string Value ) : System.Threading.Tasks.Task

보호된 메소드들

메소드 설명
ConnectAsync ( string Host, ushort Port = 6379, string Password = null ) : System.Threading.Tasks.Task

ReadValueAsync ( ) : Task

RedisClient ( Encoding Encoding = null ) : System

메소드 상세

AppendAsync() 공개 메소드

Append a value to a key
O(1). The amortized time complexity is O(1) assuming the appended value is small and the already present value is of any size, since the dynamic string library used by Redis will double the free space available on every reallocation. If key already exists and is a string, this command appends the value at the end of the string. If key does not exist it is created and set as an empty string, so APPEND will be similar to SET in this special case.
public AppendAsync ( string Key, string Value ) : Task
Key string
Value string
리턴 Task

AuthAsync() 공개 메소드

Authenticate to the server
Request for authentication in a password protected Redis server. Redis can be instructed to require a password before allowing clients to execute commands. This is done using the requirepass directive in the configuration file. If password matches the password in the configuration file, the server replies with the OK status code and starts accepting commands. Otherwise, an error is returned and the clients needs to try a new password. Note: because of the high performance nature of Redis, it is possible to try a lot of passwords in parallel in very short time, so make sure to generate a strong and very long password so that this attack is infeasible.
public AuthAsync ( string Password ) : Task
Password string
리턴 Task

BackgroundRewriteAofAsync() 공개 메소드

Asynchronously rewrite the append-only file
Rewrites the append-only file to reflect the current dataset in memory. If BGREWRITEAOF fails, no data gets lost as the old AOF will be untouched.
public BackgroundRewriteAofAsync ( ) : System.Threading.Tasks.Task
리턴 System.Threading.Tasks.Task

BackgroundSave() 공개 메소드

Asynchronously save the dataset to disk
Save the DB in background. The OK code is immediately returned. Redis forks, the parent continues to server the clients, the child saves the DB on disk then exit. A client my be able to check if the operation succeeded using the LASTSAVE command.
public BackgroundSave ( ) : System.Threading.Tasks.Task
리턴 System.Threading.Tasks.Task

CloseAsync() 공개 메소드

public CloseAsync ( ) : System.Threading.Tasks.Task
리턴 System.Threading.Tasks.Task

CommandAsync() 공개 메소드

Sends a command to the redis server
public CommandAsync ( ) : Task
리턴 Task

ConnectAsync() 보호된 메소드

protected ConnectAsync ( string Host, ushort Port = 6379, string Password = null ) : System.Threading.Tasks.Task
Host string
Port ushort
Password string
리턴 System.Threading.Tasks.Task

CreateAndConnectAsync() 정적인 공개 메소드

static public CreateAndConnectAsync ( string Host, ushort Port = 6379, Encoding Encoding = null, string Password = null ) : Task
Host string
Port ushort
Encoding System.Text.Encoding
Password string
리턴 Task

GetAsync() 공개 메소드

public GetAsync ( string Key ) : Task
Key string
리턴 Task

ReadValueAsync() 보호된 메소드

protected ReadValueAsync ( ) : Task
리턴 Task

RedisClient() 보호된 메소드

protected RedisClient ( Encoding Encoding = null ) : System
Encoding System.Text.Encoding
리턴 System

SetAsync() 공개 메소드

public SetAsync ( string Key, string Value ) : System.Threading.Tasks.Task
Key string
Value string
리턴 System.Threading.Tasks.Task

프로퍼티 상세

Encoding 보호되어 있는 프로퍼티

protected Encoding,System.Text Encoding
리턴 System.Text.Encoding

TcpClient 보호되어 있는 프로퍼티

protected TcpSocket,NodeNetAsync.Net TcpClient
리턴 NodeNetAsync.Net.TcpSocket