资源简介
本资源为CentOs7中搭建Redis集群准备,如果你没有积分,可以给我留言,我发送个你,如果你选择了下载本资源,那我感谢你的支持!
Redis 4.0于今年2017年7月发布。包含几大改进:一个模块系统,更好的复制(PSYNC2),混合RDB + AOF格式,新的记忆命令,复述,集群支持Nat,活跃的记忆碎片整理,内存使用和性能改进,更快的复述,创建集群的关键,许多其他较小的特性和固定数量的行为。
代码片段和文件信息
/*
* Copyright (c) 2009-2011 Salvatore Sanfilippo
* Copyright (c) 2010-2011 Pieter Noordhuis
*
* All rights reserved.
*
* Redistribution and use in source and binary forms with or without
* modification are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice
* this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Redis nor the names of its contributors may be used
* to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS“
* AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR
* CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN
* CONTRACT STRICT LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include “fmacros.h“
#include
#include
#include
#include
#include
#include
#include “async.h“
#include “net.h“
#include “dict.c“
#include “sds.h“
#define _EL_ADD_READ(ctx) do { \
if ((ctx)->ev.addRead) (ctx)->ev.addRead((ctx)->ev.data); \
} while(0)
#define _EL_DEL_READ(ctx) do { \
if ((ctx)->ev.delRead) (ctx)->ev.delRead((ctx)->ev.data); \
} while(0)
#define _EL_ADD_WRITE(ctx) do { \
if ((ctx)->ev.addWrite) (ctx)->ev.addWrite((ctx)->ev.data); \
} while(0)
#define _EL_DEL_WRITE(ctx) do { \
if ((ctx)->ev.delWrite) (ctx)->ev.delWrite((ctx)->ev.data); \
} while(0)
#define _EL_CLEANUP(ctx) do { \
if ((ctx)->ev.cleanup) (ctx)->ev.cleanup((ctx)->ev.data); \
} while(0);
/* Forward declaration of function in hiredis.c */
int __redisAppendCommand(redisContext *c const char *cmd size_t len);
/* Functions managing dictionary of callbacks for pub/sub. */
static unsigned int callbackHash(const void *key) {
return dictGenHashFunction((const unsigned char *)key
sdslen((const sds)key));
}
static void *callbackValDup(void *privdata const void *src) {
((void) privdata);
redisCallback *dup = malloc(sizeof(*dup));
memcpy(dupsrcsiz
- 上一篇:OV7670摄像头循迹 程序源码
- 下一篇:免费的图形控件VC
相关资源
- 基于嵌入式LINUX的网络聊天室的设计
- linux内核tcp/ip协议栈分析PDF
- node-v57-linux-x64-glibc/grpc_node.node
- 鸟哥的Linux私房菜——基础学习篇第四
- linux那些事 pdf电子书 合集
- Linux应用程序开发指南
- linux 的英文论文
- Linux+Device+Driver+3rd(E)
- 龙芯嵌入式vxworks
- Linux内核完全注释(修正版v3.0).pdf
- SUSE Linux Enterprise Server 15 安装快速入门
- Linux学习之CentOS带完整目录,非常适合
- nginx服务器插件之net-snmp-5.6.1.1.tar.gz
- Linux内核技术手册中文版235877
- linux程序设计第三版及习题答案
- linux串口与zigbee通信
- Easy 搞定Unix和Linux环境使用基础篇
- rtl8821ce linux版网卡驱动
- 实验六 Linux中的网络服务一
- [嵌入式Linux项目实战开发]基于QT4.7.
- CentOS-6.6-x86_64 nginx 依赖 pcre-devel zli
- cowsay+fortune rpm安装包
- linux系统分析与高级编程技术,清晰版
- LINUX 离线安装NFS
- Linux Shell 脚本攻略 中文 第三版和源码
- centos6.8安装openssh7.9的rpm包
- redis desktop manager for windows 0.9.8
- 车牌识别代码arm-Linux,opencv
-
Packt - em
bedded Linux Development Using Yo - Linux Firewalls Fourth Edition
评论
共有 条评论