<description><![CDATA[ Plugin for translate English to Chinese.<br> <li>1. Choose the word you want translate.</li> <li>2. Press Ctrl + NUMPAD0.</li> <li>3. Fork ECTranslation Change ApiKey and KeyFrom</li>
]]></description>
<change-notes><![CDATA[ <li>Change ApiKey and KeyFrom for myself</li> <li>Change KeyMap to Ctrl + NumPad 0</li> ]]> </change-notes>
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description --> <idea-versionsince-build="141.0"/>
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html on how to target different products --> <!-- uncomment to enable plugin in all products <depends>com.intellij.modules.lang</depends> -->
<extensionsdefaultExtensionNs="com.intellij"> <!-- Add your extensions here --> </extensions>
<actions> <!-- Add your actions here --> <actionid="ECTranslation"class="cn.joylau.plugins.translation.ECTranslation"text="Translate"> <add-to-groupgroup-id="EditMenu"anchor="first"/> <add-to-groupgroup-id="EditorPopupMenu"anchor="first"/> <keyboard-shortcutkeymap="$default"first-keystroke="ctrl NUMPAD0"/> </action> </actions>
# Master-Slave replication. Use slaveof to make a Redis instance a copy of # another Redis server. A few things to understand ASAP about Redis replication. # # 1) Redis replication is asynchronous, but you can configure a master to # stop accepting writes if it appears to be not connected with at least # a given number of slaves. # 2) Redis slaves are able to perform a partial resynchronization with the # master if the replication link is lost for a relatively small amount of # time. You may want to configure the replication backlog size (see the next # sections of this file) with a sensible value depending on your needs. # 3) Replication is automatic and does not need user intervention. After a # network partition slaves automatically try to reconnect to masters # and resynchronize with them. # slaveof xx.xx.xx.xx 6379
# If the master is password protected (using the "requirepass" configuration # directive below) it is possible to tell the slave to authenticate before # starting the replication synchronization process, otherwise the master will # refuse the slave request. # masterauth xx
# When a slave loses its connection with the master, or when the replication # is still in progress, the slave can act in two different ways: # # 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will # still reply to client requests, possibly with out of date data, or the # data set may just be empty if this is the first synchronization. # # 2) if slave-serve-stale-data is set to 'no' the slave will reply with # an error "SYNC with master in progress" to all the kind of commands # but to INFO and SLAVEOF. # slave-serve-stale-data yes
# You can configure a slave instance to accept writes or not. Writing against # a slave instance may be useful to store some ephemeral data (because data # written on a slave will be easily deleted after resync with the master) but # may also cause problems if clients are writing to it because of a # misconfiguration. # # Since Redis 2.6 by default slaves are read-only. # # Note: read only slaves are not designed to be exposed to untrusted clients # on the internet. It's just a protection layer against misuse of the instance. # Still a read only slave exports by default all the administrative commands # such as CONFIG, DEBUG, and so forth. To a limited extent you can improve # security of read only slaves using 'rename-command' to shadow all the # administrative / dangerous commands. slave-read-only no
2.8开始,当Master和Slave之间的连接断开之后,他们之间可以采用持续复制处理方式代替采用全量同步。 Master端为复制流维护一个内存缓冲区(in-memory backlog),记录最近发送的复制流命令;同时,Master和Slave之间都维护一个复制偏移量(replication offset)和当前Master服务器ID(Master run id)。当网络断开,Slave尝试重连时: a. 如果MasterID相同(即仍是断网前的Master服务器),并且从断开时到当前时刻的历史命令依然在Master的内存缓冲区中存在,则Master会将缺失的这段时间的所有命令发送给Slave执行,然后复制工作就可以继续执行了; b. 否则,依然需要全量复制操作;
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 保存一个实体,null的属性也会保存,不会使用数据库默认值 */ intinsert(T model);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 保存一个实体,null的属性不会保存,会使用数据库默认值 */ intinsertSelective(T model);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 批量插入,支持批量插入的数据库可以使用,另外该接口限制实体包含`id`属性并且必须为自增列 */ intinsertList(List<T> list);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据主键更新实体全部字段,null值会被更新 */ intupdateByPrimaryKey(T model);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据主键更新属性不为null的值 */ intupdateByPrimaryKeySelective(T model);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据Example条件更新实体`model`包含的全部属性,null值会被更新 */ intupdateByExample(T model, Object example);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据Example条件更新实体`model`包含的不是null的属性值 */ intupdateByExampleSelective(T model, Object example);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据实体属性作为条件进行删除,查询条件使用等号 */ intdelete(T model);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据实体id删除 */ intdeleteById(int id);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据Example条件删除数据 */ intdeleteByExample(Object example);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据主键字符串进行删除,类中只有存在一个带有@Id注解的字段 * * @param ids 如 "1,2,3,4" */ intdeleteByIds(String ids);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据主键字段进行删除,方法参数必须包含完整的主键属性 */ intdeleteByPrimaryKey(Object key);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据实体中的属性值进行查询,查询条件使用等号 */ List<T> select(T model);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据实体中的id查询实体 */ T selectById(int id);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 查询全部结果 */ List<T> selectAll();
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据Example条件进行查询 */ List<T> selectByExample(Object example);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据example条件和RowBounds进行分页查询 */ List<T> selectByExampleAndRowBounds(Object example, RowBounds rowBounds);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据主键字符串进行查询,类中只有存在一个带有@Id注解的字段 * * @param ids 如 "1,2,3,4" */ List<T> selectByIds(String ids);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据主键字段进行查询,方法参数必须包含完整的主键属性,查询条件使用等号 */ T selectByPrimaryKey(Object key);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据实体中的属性查询总数,查询条件使用等号 */ intselectCount(T model);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据Example条件进行查询总数 */ intselectCountByExample(Object example);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据实体中的属性进行查询,只能有一个返回值,有多个结果是抛出异常,查询条件使用等号 */ T selectOne(T model);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据实体属性和RowBounds进行分页查询 */ List<T> selectByRowBounds(T model, RowBounds rowBounds);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 单表分页查询 */ PageInfo selectPage(int pageNum, int pageSize, T model);
/** * Created by JoyLau on 4/6/2017. * 2587038142.liu@gmail.com * 根据Example条件进行分页查询 */ PageInfo selectPageByExample(int pageNum, int pageSize, Object example);
-h <hostname> Server hostname (default 127.0.0.1) -p <port> Server port (default 6379) -s <socket> Server socket (overrides host and port) -a <password> Password for Redis Auth -c <clients> Number of parallel connections (default 50) -n <requests> Total number of requests (default 100000) -d <size> Data size of SET/GET value in bytes (default 2) -dbnum <db> SELECT the specified db number (default 0) -k <boolean> 1=keep alive 0=reconnect (default 1) -r <keyspacelen> Use random keys for SET/GET/INCR, random values for SADD Using this option the benchmark will expand the string __rand_int__ inside an argument with a 12 digits number in the specified range from 0 to keyspacelen-1. The substitution changes every time a command is executed. Default tests use this to hit random keys in the specified range. -P <numreq> Pipeline <numreq> requests. Default 1 (no pipeline). -q Quiet. Just show query/sec values --csv Output in CSV format -l Loop. Run the tests forever -t <tests> Only run the comma separated list of tests. The test names are the same as the ones produced as output. -I Idle mode. Just open N idle connections and wait.
Examples:
Run the benchmark with the default configuration against 127.0.0.1:6379: $ redis-benchmark
Use 20 parallel clients, for a total of 100k requests, against 192.168.1.1: $ redis-benchmark -h 192.168.1.1 -p 6379 -n 100000 -c 20
Fill 127.0.0.1:6379 with about 1 million keys only using the SET test: $ redis-benchmark -t set -n 1000000 -r 100000000
Benchmark 127.0.0.1:6379 for a few commands producing CSV output: $ redis-benchmark -t ping,set,get -n 100000 --csv
Benchmark a specific command line: $ redis-benchmark -r 10000 -n 10000 eval'return redis.call("ping")' 0
Fill a list with 10000 random elements: $ redis-benchmark -r 10000 -n 10000 lpush mylist __rand_int__
On user specified command lines __rand_int__ is replaced with a random integer with a range of values selected by the -r option.