本文整理了Java中redis.clients.jedis.Jedis.monitor()
方法的一些代码示例,展示了Jedis.monitor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jedis.monitor()
方法的具体详情如下:
包路径:redis.clients.jedis.Jedis
类名称:Jedis
方法名:monitor
暂无
代码示例来源:origin: mindwind/craft-atom
private String monitor0(Jedis j, final RedisMonitorHandler handler) {
JedisMonitor jm = new JedisMonitor() {
@Override
public void onCommand(String command) {
handler.onCommand(command);
}
};
j.monitor(jm);
return OK;
}
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public void monitor(JedisMonitor jedisMonitor) {
delegated.monitor(jedisMonitor);
}
代码示例来源:origin: io.enoa/nosql-redis
default void monitor(final JedisMonitor jedisMonitor) {
this.run((jedis, serializer) -> {
jedis.monitor(jedisMonitor);
return this;
});
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
/**
* Dump all the received requests in real time.
* <p>
* MONITOR is a debugging command that outputs the whole sequence of commands received by the
* Redis server. is very handy in order to understand what is happening into the database. This
* command is used directly via telnet.
*
* @param jedisMonitor
*/
public void monitor(JedisMonitor jedisMonitor) {
jedis().monitor(jedisMonitor);
}
代码示例来源:origin: org.nuxeo.runtime/nuxeo-runtime-redis
@Override
public void run() {
log.debug("Starting monitor thread");
execute(jedis -> {
jedis.monitor(new JedisMonitor() {
@Override
public void proceed(Client client) {
monitorLatch.countDown();
super.proceed(client);
}
@Override
public void onCommand(String command) {
if (Thread.currentThread().isInterrupted()) {
// The only way to get out of this thread
jedis.disconnect();
} else {
log.debug(command);
}
}
});
log.debug("Monitor thread stopped");
return null;
});
}
});
代码示例来源:origin: FlareBot/FlareBot
jedis.monitor(new JedisMonitor() {
public void onCommand(String command) {
String finalCommand = command;
内容来源于网络,如有侵权,请联系作者删除!