/// <summary> /// Clears the StackExchange.Redis tiebreaker key from this node. /// </summary> public bool ClearSERedisTiebreaker() { RedisKey tieBreakerKey = SERedisTiebreakerKey; var result = this._connection.GetDatabase() .KeyDelete(tieBreakerKey, flags: CommandFlags.NoRedirect | CommandFlags.HighPriority); Tiebreaker.Poll(true); return(result); }
/// <summary> /// Clears the StackExchange.Redis tiebreaker key from this node. /// </summary> public async Task <bool> ClearSERedisTiebreakerAsync() { RedisKey tieBreakerKey = SERedisTiebreakerKey; var result = await _connection.GetDatabase() .KeyDeleteAsync(tieBreakerKey, flags: CommandFlags.NoRedirect | CommandFlags.HighPriority); Tiebreaker.Poll(true); return(result); }
/// <summary> /// Sets the StackExchange.Redis tiebreaker key on this node. /// </summary> public bool SetSERedisTiebreaker() { RedisKey tieBreakerKey = SERedisTiebreakerKey; var myEndPoint = this._connection.GetEndPoints().FirstOrDefault(); RedisValue tieBreakerValue = EndPointCollection.ToString(myEndPoint); var result = this._connection.GetDatabase() .StringSet(tieBreakerKey, tieBreakerValue, flags: CommandFlags.NoRedirect | CommandFlags.HighPriority); Tiebreaker.Poll(true); return(result); }