private void dehydrateFields(ObjectID objectId, DNAWriter writer) { writer.addPhysicalAction(TAKE_LOCK_FIELD_NAME, takeLockField); writer.addPhysicalAction(PUT_LOCK_FIELD_NAME, putLockField); writer.addPhysicalAction(CAPACITY_FIELD_NAME, capacityField); }
protected void dehydrateFields(final DNAWriter writer) { writer.addPhysicalAction(LOCK_TYPE_FIELDNAME, this.dsoLockType); writer.addPhysicalAction(MAX_TTI_SECONDS_FIELDNAME, this.maxTTISeconds); writer.addPhysicalAction(MAX_TTL_SECONDS_FIELDNAME, this.maxTTLSeconds); writer.addPhysicalAction(MAX_COUNT_IN_CLUSTER_FIELDNAME, this.targetMaxTotalCount); writer.addPhysicalAction(INVALIDATE_ON_CHANGE_FIELDNAME, this.invalidateOnChange); writer.addPhysicalAction(CACHE_NAME_FIELDNAME, this.cacheName); writer.addPhysicalAction(LOCAL_CACHE_ENABLED_FIELDNAME, this.localCacheEnabled); writer.addPhysicalAction(COMPRESSION_ENABLED_FIELDNAME, this.compressionEnabled); writer.addPhysicalAction(COPY_ON_READ_ENABLED_FIELDNAME, this.copyOnReadEnabled); writer.addPhysicalAction(EVICTION_ENABLED_FIELDNAME, this.evictionEnabled); }
@Override public void write(DNAWriter writer) { writer.addPhysicalAction(fieldname, newValue); }
@Override public void write(DNAWriter writer) { writer.addPhysicalAction(fieldname, newValue); }
@Override public void write(DNAWriter writer) { writer.addPhysicalAction(fieldname, newValue); }
@Override public void dehydrate(final ObjectID objectID, final DNAWriter writer, final DNAType type) { for (Map.Entry<String, Object> entry : configMap.entrySet()) { writer.addPhysicalAction(entry.getKey(), entry.getValue()); } writer.addEntireArray(componentObjects); }
public void dehydrate(ApplicatorObjectManager objectManager, TCObjectExternal tcObject, DNAWriter writer, Object pojo) { String className = pojo.getClass().getName(); writer.addPhysicalAction(CLASSNAME_FIELD_NAME, className); Class clazz = (Class) getClazz(pojo); writer.addPhysicalAction(CLAZZ_FIELD_NAME, clazz); Object propertyNames = getPropertyNames(pojo); Object dehydratablePropertyNames = getDehydratableObject(propertyNames, objectManager); writer.addPhysicalAction(PROPERTY_NAMES_FIELD_NAME, dehydratablePropertyNames); }
@Override public void dehydrate(final ApplicatorObjectManager objectManager, final TCObjectExternal tcObject, final DNAWriter writer, final Object pojo) { writer.addPhysicalAction(DSO_LOCK_TYPE_FIELDNAME, getField(pojo, DSO_LOCK_TYPE_FIELDNAME)); final Object lockStrategy = getField(pojo, DSO_LOCK_STRATEGY_FIELDNAME); writer.addPhysicalAction(DSO_LOCK_STRATEGY_FIELDNAME, getDehydratableObject(lockStrategy, objectManager)); writer.addPhysicalAction(MAX_TTI_SECONDS_FIELDNAME, getField(pojo, MAX_TTI_SECONDS_FIELDNAME)); writer.addPhysicalAction(MAX_TTL_SECONDS_FIELDNAME, getField(pojo, MAX_TTL_SECONDS_FIELDNAME)); writer .addPhysicalAction(TARGET_MAX_IN_MEMORY_COUNT_FIELDNAME, getField(pojo, TARGET_MAX_IN_MEMORY_COUNT_FIELDNAME)); writer.addPhysicalAction(TARGET_MAX_TOTAL_COUNT_FIELDNAME, getField(pojo, TARGET_MAX_TOTAL_COUNT_FIELDNAME)); writer.addPhysicalAction(INVALIDATE_ON_CHANGE_FIELDNAME, getField(pojo, INVALIDATE_ON_CHANGE_FIELDNAME)); writer.addPhysicalAction(CACHE_NAME_FIELDNAME, getField(pojo, CACHE_NAME_FIELDNAME)); // Don't dehydrate anything else. }
@Override public void dehydrate(ApplicatorObjectManager objectManager, TCObjectExternal tcObject, DNAWriter writer, Object pojo) { writer.addPhysicalAction(DSO_LOCK_TYPE_FIELDNAME, getField(pojo, DSO_LOCK_TYPE_FIELDNAME)); final Object lockStrategy = getField(pojo, DSO_LOCK_STRATEGY_FIELDNAME); writer.addPhysicalAction(DSO_LOCK_STRATEGY_FIELDNAME, getDehydratableObject(lockStrategy, objectManager)); super.dehydrate(objectManager, tcObject, writer, pojo); }
@Override public void dehydrate(final ClientObjectManager objMgr, final TCObject tco, final DNAWriter writer, final Object pojo) { super.dehydrate(objMgr, tco, writer, pojo); Map<String, Object> values = getAllFields(pojo); writer.addPhysicalAction(CUSTOM_TTI_FIELD, get(values, CUSTOM_TTI_FIELD)); writer.addPhysicalAction(CUSTOM_TTL_FIELD, get(values, CUSTOM_TTL_FIELD)); } }
@Override public void dehydrate(final ApplicatorObjectManager objectManager, final TCObjectExternal tco, final DNAWriter writer, final Object pojo) { super.dehydrate(objectManager, tco, writer, pojo); Map<String, Object> values = getAllFields(pojo); writer.addPhysicalAction(CUSTOM_TTI_FIELD, get(values, CUSTOM_TTI_FIELD)); writer.addPhysicalAction(CUSTOM_TTL_FIELD, get(values, CUSTOM_TTL_FIELD)); } }
@Override public void dehydrate(final ApplicatorObjectManager objectManager, final TCObjectExternal tco, final DNAWriter writer, final Object pojo) { super.dehydrate(objectManager, tco, writer, pojo); Map<String, Object> values = getAllFields(pojo); writer.addPhysicalAction(CUSTOM_TTI_FIELD, get(values, CUSTOM_TTI_FIELD)); writer.addPhysicalAction(CUSTOM_TTL_FIELD, get(values, CUSTOM_TTL_FIELD)); } }
@Override public void dehydrate(final ApplicatorObjectManager objectManager, final TCObjectExternal tco, final DNAWriter writer, final Object pojo) { super.dehydrate(objectManager, tco, writer, pojo); Map<String, Object> values = getAllFields(pojo); writer.addPhysicalAction(CUSTOM_TTI_FIELD, get(values, CUSTOM_TTI_FIELD)); writer.addPhysicalAction(CUSTOM_TTL_FIELD, get(values, CUSTOM_TTL_FIELD)); } }
@Override public void dehydrate(ApplicatorObjectManager objectManager, TCObjectExternal tcObject, DNAWriter writer, Object pojo) { writer.addPhysicalAction(DSO_LOCK_TYPE_FIELDNAME, getField(pojo, DSO_LOCK_TYPE_FIELDNAME)); final Object lockStrategy = getField(pojo, DSO_LOCK_STRATEGY_FIELDNAME); writer.addPhysicalAction(DSO_LOCK_STRATEGY_FIELDNAME, getDehydratableObject(lockStrategy, objectManager)); super.dehydrate(objectManager, tcObject, writer, pojo); }
@Override public void dehydrate(ApplicatorObjectManager objectManager, TCObjectExternal tcObject, DNAWriter writer, Object pojo) { writer.addPhysicalAction(DSO_LOCK_TYPE_FIELDNAME, getField(pojo, DSO_LOCK_TYPE_FIELDNAME)); final Object lockStrategy = getField(pojo, DSO_LOCK_STRATEGY_FIELDNAME); writer.addPhysicalAction(DSO_LOCK_STRATEGY_FIELDNAME, getDehydratableObject(lockStrategy, objectManager)); super.dehydrate(objectManager, tcObject, writer, pojo); }
public void dehydrate(final ApplicatorObjectManager objectManager, final TCObjectExternal tco, final DNAWriter writer, final Object pojo) { Map<String, Object> values = getAllFields(pojo); writer.addEntireArray(get(values, VALUE_FIELD)); writer.addPhysicalAction(CREATE_TIME_FIELD, get(values, CREATE_TIME_FIELD)); writer.addPhysicalAction(LAST_ACCESS_TIME_FIELD, get(values, LAST_ACCESS_TIME_FIELD)); }
public void dehydrate(final ApplicatorObjectManager objectManager, final TCObjectExternal tco, final DNAWriter writer, final Object pojo) { Map<String, Object> values = getAllFields(pojo); writer.addEntireArray(get(values, VALUE_FIELD)); writer.addPhysicalAction(CREATE_TIME_FIELD, get(values, CREATE_TIME_FIELD)); writer.addPhysicalAction(LAST_ACCESS_TIME_FIELD, get(values, LAST_ACCESS_TIME_FIELD)); }
public void dehydrate(final ClientObjectManager objMgr, final TCObject tco, final DNAWriter writer, final Object pojo) { Map<String, Object> values = getAllFields(pojo); writer.addEntireArray(get(values, VALUE_FIELD)); writer.addPhysicalAction(CREATE_TIME_FIELD, get(values, CREATE_TIME_FIELD)); writer.addPhysicalAction(LAST_ACCESS_TIME_FIELD, get(values, LAST_ACCESS_TIME_FIELD)); }
public void dehydrate(final ApplicatorObjectManager objectManager, final TCObjectExternal tco, final DNAWriter writer, final Object pojo) { Map<String, Object> values = getAllFields(pojo); writer.addEntireArray(get(values, VALUE_FIELD)); writer.addPhysicalAction(CREATE_TIME_FIELD, get(values, CREATE_TIME_FIELD)); writer.addPhysicalAction(LAST_ACCESS_TIME_FIELD, get(values, LAST_ACCESS_TIME_FIELD)); }
private void writePhysicalAction(final DNAWriter dnaWriter, final PhysicalAction action) { if (action.isTruePhysical()) { dnaWriter.addPhysicalAction(action.getFieldName(), action.getObject(), action.isReference()); } else if (action.isArrayElement()) { dnaWriter.addArrayElementAction(action.getArrayIndex(), action.getObject()); } else if (action.isEntireArray()) { dnaWriter.setArrayLength(Array.getLength(action.getObject())); dnaWriter.addEntireArray(action.getObject()); } else if (action.isSubArray()) { dnaWriter.addSubArrayAction(action.getArrayIndex(), action.getObject(), Array.getLength(action.getObject())); } else { throw new AssertionError("Unknown Physical Action : " + action); } }