@Override public String toString() { return "EVCacheEvent [call=" + call + ", appName=" + appName + ", cacheName=" + cacheName + ", Num of Clients=" + clients.size() + ", keys=" + keys + ", canonicalKeys=" + canonicalKeys + ", ttl=" + ttl + ", cachedData=" + (cachedData != null ? "[ Flags : " + cachedData.getFlags() + "; Data Array length : " +cachedData.getData().length + "] " : "null") + ", Attributes=" + data + "]"; }
protected CachedData getEVCacheValue(String key, CachedData cData, int timeToLive) { final EVCacheValue val = new EVCacheValue(key, cData.getData(), cData.getFlags(), timeToLive, System.currentTimeMillis()); return evcacheValueTranscoder.encode(val); }
+ checkSumValue + "; Checksum Duration : " + (System.nanoTime() - sTime)); chunkData[0] = decodingTranscoder.encode(numOfChunks + ":" + actualChunkSize + ":" + lastChunkSize + ":" + cd .getFlags() + ":" + checkSumValue); for (int i = 1; i < numOfChunks; i++) { int lengthOfArray = actualChunkSize;
rv.signalComplete(); } else { Operation op = opFact.store(StoreType.add, key, co.getFlags(), exp, co.getData(), new StoreOperation.Callback() { @Override public void receivedStatus(OperationStatus addStatus) {
final Operation op = opFact.store(storeType, key, co.getFlags(), exp, co.getData(), new StoreOperation.Callback() {
final EVCacheValue val = new EVCacheValue(canonicalKey, cd.getData(), cd.getFlags(), timeToLive, System.currentTimeMillis()); cd = evcacheValueTranscoder.encode(val);
final EVCacheValue val = new EVCacheValue(canonicalKey, cd.getData(), cd.getFlags(), timeToLive, System.currentTimeMillis()); cd = evcacheValueTranscoder.encode(val);
final EVCacheValue val = new EVCacheValue(canonicalKey, cd.getData(), cd.getFlags(), timeToLive, System.currentTimeMillis()); cd = evcacheValueTranscoder.encode(val);
public Integer decode(CachedData d) { if (FLAGS == d.getFlags()) { return tu.decodeInt(d.getData()); } else { return null; } }
public Integer decode(CachedData d) { if (FLAGS == d.getFlags()) { return tu.decodeInt(d.getData()); } else { return null; } }
public Integer decode(CachedData d) { if (FLAGS == d.getFlags()) { return tu.decodeInt(d.getData()); } else { return null; } }
public Integer decode(CachedData d) { if (flags == d.getFlags()) { return tu.decodeInt(d.getData()); } else { return null; } }
public Integer decode(CachedData d) { if (flags == d.getFlags()) { return tu.decodeInt(d.getData()); } else { return null; } }
@Override public CachedData encode(T object) { final CachedData encodedCachedData = wrappedTranscoder.encode(object); final byte[] encodedBytes = encodedCachedData.getData(); if (encodedBytes.length < compressionThresholdByteLength) { return encodedCachedData; } final byte[] compressed = compressor.compress(encodedBytes); final int flags = encodedCachedData.getFlags() | compressionFlag; return new CachedData(flags, compressed, getMaxSize()); }
@Override public T decode(CachedData cachedData) { int flags = cachedData.getFlags(); boolean compressed = (flags & compressionFlag) > 0; byte[] decodedBytes = cachedData.getData(); if (compressed) { decodedBytes = decompressor.decompress(cachedData.getData()); } return wrappedTranscoder.decode(new CachedData(flags, decodedBytes, getMaxSize())); }