private byte[] getBytes(Object o) { if(o instanceof byte[]) { return (byte[]) o; } if(o instanceof CachedDeserializable) { return ((CachedDeserializable) o).getSerializedValue(); } else { return EntryEventImpl.serialize(o); } }
private byte[] getBytes(Object o) { if(o instanceof byte[]) { return (byte[]) o; } if(o instanceof CachedDeserializable) { return ((CachedDeserializable) o).getSerializedValue(); } else { return EntryEventImpl.serialize(o); } }
public byte[] getSerializedValue() { if(this.serializedValue != null){ return this.serializedValue; } return getCd().getSerializedValue(); }
public byte[] getSerializedValue() { if(this.serializedValue != null){ return this.serializedValue; } return getCd().getSerializedValue(); }
public void toData(DataOutput out) throws IOException { out.writeBoolean(keysOnly); out.writeInt(size()); if (keysOnly) { for (Map.Entry<DataSerializable, Object> e : entrySet()) { DataSerializer.writeObject(e.getKey(), out); } } else { for (Map.Entry<DataSerializable, Object> e : entrySet()) { DataSerializer.writeObject(e.getKey(), out); out.write(((CachedDeserializable) e.getValue()).getSerializedValue()); } } } }
private byte[] convertToBytes(Object val) throws IOException { if (Token.isRemoved(val)) { throw new EntryDestroyedException(); } else if (Token.isInvalid(val)) { return null; } else if (val instanceof CachedDeserializable) { byte[] bytes = ((CachedDeserializable) val).getSerializedValue(); return bytes; } else if (val != null) { return BlobHelper.serializeToBlob(val); } return null; }
private byte[] convertToBytes(Object val) throws IOException { if (Token.isRemoved(val)) { throw new EntryDestroyedException(); } else if (Token.isInvalid(val)) { return null; } else if (val instanceof CachedDeserializable) { byte[] bytes = ((CachedDeserializable) val).getSerializedValue(); return bytes; } else if (val != null) { return BlobHelper.serializeToBlob(val); } return null; }
/** * {@inheritDoc} */ @Override public final byte[] getSerializedValue() { if (this.newValueBytes == null) { final Object val; if (this.delta == null) { val = basicGetNewValue(); if (val instanceof byte[]) { return (byte[])val; } else if (val instanceof CachedDeserializable) { return ((CachedDeserializable)val).getSerializedValue(); } } else { val = this.delta; } try { return CacheServerHelper.serialize(val); } catch (IOException ioe) { throw new GemFireIOException("unexpected exception", ioe); } } else { return this.newValueBytes; } }
public final byte[] getSerializedValue() { if (this.newValueBytes == null) { final Object val; if (this.delta == null) { val = basicGetNewValue(); if (val instanceof byte[]) { return (byte[])val; } else if (val instanceof CachedDeserializable) { return ((CachedDeserializable)val).getSerializedValue(); } } else { val = this.delta; } try { return CacheServerHelper.serialize(val); } catch (IOException ioe) { throw new GemFireIOException("unexpected exception", ioe); } } else { return this.newValueBytes; } }
@Override public List getOperations() { QueuedOperation[] ops = new QueuedOperation[getOperationCount()]; for (int i = 0; i < ops.length; i++) { PutAllEntryData entry = this.putAllData[i]; byte[] valueBytes = null; Object valueObj = null; Object v = entry.getValue(); byte deserializationPolicy; if (v instanceof Delta) { deserializationPolicy = DESERIALIZATION_POLICY_EAGER; valueObj = v; } else if (v instanceof CachedDeserializable) { deserializationPolicy = DESERIALIZATION_POLICY_LAZY; valueBytes = ((CachedDeserializable)v).getSerializedValue(); } else { deserializationPolicy = DESERIALIZATION_POLICY_NONE; valueBytes = (byte[])v; } ops[i] = new QueuedOperation(entry.getOp(), entry.getKey(), valueBytes, valueObj, deserializationPolicy, this.callbackArg); } return Arrays.asList(ops); }
if (value instanceof CachedDeserializable) { serializedValueObjs.addPart(null, ((CachedDeserializable) value).getSerializedValue(), ObjectPartList.OBJECT, null); } else { if (value instanceof CachedDeserializable) { serializedValueObjs.addPart(null, ((CachedDeserializable) value).getSerializedValue(), ObjectPartList.OBJECT, null); } else { } else if (res instanceof CachedDeserializable) { serializedObjs.addPart(null, ((CachedDeserializable) res).getSerializedValue(), ObjectPartList.OBJECT, null); } else { // for deserialized objects
if (value instanceof CachedDeserializable) { serializedValueObjs.addPart(null, ((CachedDeserializable) value).getSerializedValue(), ObjectPartList.OBJECT, null); } else { if (value instanceof CachedDeserializable) { serializedValueObjs.addPart(null, ((CachedDeserializable) value).getSerializedValue(), ObjectPartList.OBJECT, null); } else { } else if (res instanceof CachedDeserializable) { serializedObjs.addPart(null, ((CachedDeserializable) res).getSerializedValue(), ObjectPartList.OBJECT, null); } else { // for deserialized objects
CachedDeserializable cd = (CachedDeserializable)v; out.writeByte(IS_CACHED_DESER); DataSerializer.writeByteArray(cd.getSerializedValue(), out);
valueBytes = ((CachedDeserializable)v).getSerializedValue();
this.valueIsObject = 0x00; } else if (val instanceof CachedDeserializable) { this.value = ((CachedDeserializable) val).getSerializedValue(); } else {
bytes = proxy.getSerializedValue();
bytes = proxy.getSerializedValue();
assert !(newValue instanceof StoredObject); // since we already called getOffHeapNewValue() and it returned null if (newValue instanceof CachedDeserializable) { this.value = ((CachedDeserializable) newValue).getSerializedValue(); } else if (newValue instanceof byte[]) {
serializedObj = ((CachedDeserializable) obj).getSerializedValue(); } else if (obj instanceof byte[]) { if (cd.isSerialized()) {
serializedObj = ((CachedDeserializable) obj).getSerializedValue(); } else if (obj instanceof byte[]) { if (cd.isSerialized()) {