⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 statsoperationimpl.java

📁 memcached JAVA客户端API,应用广泛,运行比较稳定。
💻 JAVA
字号:
package net.spy.memcached.protocol.binary;import java.io.IOException;import net.spy.memcached.ops.OperationState;import net.spy.memcached.ops.StatsOperation;public class StatsOperationImpl extends OperationImpl	implements StatsOperation {	private static final int CMD = 0x10;	private final String key;	public StatsOperationImpl(String arg, StatsOperation.Callback c) {		super(CMD, generateOpaque(), c);		key=(arg == null) ? "" : arg;	}	@Override	public void initialize() {		prepareBuffer(key, 0, EMPTY_BYTES);	}	@Override	protected void finishedPayload(byte[] pl) throws IOException {		if(keyLen > 0) {			final byte[] keyBytes=new byte[keyLen];			final byte[] data=new byte[pl.length - keyLen];			System.arraycopy(pl, 0, keyBytes, 0, keyLen);			System.arraycopy(pl, keyLen, data, 0, pl.length-keyLen);			Callback cb=(Callback)getCallback();			cb.gotStat(new String(keyBytes, "UTF-8"),					new String(data, "UTF-8"));		} else {			getCallback().receivedStatus(STATUS_OK);			transitionState(OperationState.COMPLETE);		}		resetInput();	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -