@Override public PhysicalAction getPhysicalAction() { return (index < actions.size() ? (PhysicalAction) actions.get(index) : cursor.getPhysicalAction()); }
@Override public PhysicalAction getPhysicalAction() { return (index < actions.size() ? (PhysicalAction) actions.get(index) : cursor.getPhysicalAction()); }
public Object getNewInstance(ApplicatorObjectManager objectManager, DNA dna) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); Assert.assertEquals(3, cursor.getActionCount()); cursor.next(encoding); PhysicalAction a = cursor.getPhysicalAction(); String className = (String) a.getObject(); cursor.next(encoding); a = cursor.getPhysicalAction(); Class target = (Class) a.getObject(); cursor.next(encoding); a = cursor.getPhysicalAction(); Object propertyNames = a.getObject(); propertyNames = objectManager.lookupObject((ObjectID) propertyNames); return create(target, className, propertyNames); }
@Override public Object getNewInstance(ApplicatorObjectManager objectManager, DNA dna) { try { final DNACursor cursor = dna.getCursor(); Assert.assertTrue("DNA missing physical action", cursor.next()); PhysicalAction physicalAction = cursor.getPhysicalAction(); final Object lockType = physicalAction.getObject(); Assert.assertTrue("DNA missing physical action", cursor.next()); physicalAction = cursor.getPhysicalAction(); Object lockStrategy = objectManager.lookupObject((ObjectID) physicalAction.getObject()); /* * This trickery is necessary to avoid getting an instance of class loaded by the wrong classloader. Otherwise we * get ClassCastExceptions when we try and store the result in the ConcurrentDistributedMap instance. */ Class cdmClazz = objectManager.getClassFor(CDM_DSO, LoaderDescription.fromString(dna .getDefiningLoaderDescription())); final Method newCDM = cdmClazz.getMethod("newCDM", NEW_CDM_ARGS); newCDM.setAccessible(true); return newCDM.invoke(null, lockType, lockStrategy); } catch (final Exception e) { throw new RuntimeException(e); } }
@Override public Object getNewInstance(ApplicatorObjectManager objectManager, DNA dna) { try { final DNACursor cursor = dna.getCursor(); Assert.assertTrue("DNA missing physical action", cursor.next()); PhysicalAction physicalAction = cursor.getPhysicalAction(); final Object lockType = physicalAction.getObject(); Assert.assertTrue("DNA missing physical action", cursor.next()); physicalAction = cursor.getPhysicalAction(); Object lockStrategy = objectManager.lookupObject((ObjectID) physicalAction.getObject()); /* * This trickery is necessary to avoid getting an instance of class loaded by the wrong classloader. Otherwise we * get ClassCastExceptions when we try and store the result in the ConcurrentDistributedMap instance. */ Class cdmClazz = objectManager.getClassFor(CDM_DSO, LoaderDescription.fromString(dna .getDefiningLoaderDescription())); final Method newCDM = cdmClazz.getMethod("newCDM", NEW_CDM_ARGS); newCDM.setAccessible(true); return newCDM.invoke(null, lockType, lockStrategy); } catch (final Exception e) { throw new RuntimeException(e); } }
@Override public Object getNewInstance(ApplicatorObjectManager objectManager, DNA dna) { try { final DNACursor cursor = dna.getCursor(); Assert.assertTrue("DNA missing physical action", cursor.next()); PhysicalAction physicalAction = cursor.getPhysicalAction(); final Object lockType = physicalAction.getObject(); Assert.assertTrue("DNA missing physical action", cursor.next()); physicalAction = cursor.getPhysicalAction(); Object lockStrategy = objectManager.lookupObject((ObjectID) physicalAction.getObject()); /* * This trickery is necessary to avoid getting an instance of class loaded by the wrong classloader. Otherwise we * get ClassCastExceptions when we try and store the result in the ConcurrentDistributedMap instance. */ Class cdmClazz = objectManager.getClassFor(CDM_DSO, LoaderDescription.fromString(dna .getDefiningLoaderDescription())); final Method newCDM = cdmClazz.getMethod("newCDM", NEW_CDM_ARGS); newCDM.setAccessible(true); return newCDM.invoke(null, lockType, lockStrategy); } catch (final Exception e) { throw new RuntimeException(e); } }
PhysicalAction a = cursor.getPhysicalAction(); Class persistenceClass = (Class) a.getObject(); a = cursor.getPhysicalAction(); String entityName = (String) a.getObject(); a = cursor.getPhysicalAction(); Object[] interfacesObj = (Object[]) a.getObject(); Class[] interfaces = new Class[interfacesObj.length]; a = cursor.getPhysicalAction(); Serializable id = (Serializable) a.getObject(); a = cursor.getPhysicalAction(); ObjectID targetId = (ObjectID) a.getObject(); Object target = objectManager.lookupObject(targetId); a = cursor.getPhysicalAction(); ObjectID getIdentifierId = (ObjectID) a.getObject(); Method getIdentifierMethod = (Method) objectManager.lookupObject(getIdentifierId); a = cursor.getPhysicalAction(); ObjectID setIdentifierId = (ObjectID) a.getObject(); Method setIdentifierMethod = (Method) objectManager.lookupObject(setIdentifierId); a = cursor.getPhysicalAction(); ObjectID componentIdTypeId = (ObjectID) a.getObject(); Object componentIdType = objectManager.lookupObject(componentIdTypeId);
PhysicalAction physicalAction = cursor.getPhysicalAction(); final Object lockType = physicalAction.getObject(); physicalAction = cursor.getPhysicalAction(); final Object lockStrategy = objectManager.lookupObject((ObjectID) physicalAction.getObject()); physicalAction = cursor.getPhysicalAction(); final Object maxTTISeconds = physicalAction.getObject(); physicalAction = cursor.getPhysicalAction(); final Object maxTTLSeconds = physicalAction.getObject(); physicalAction = cursor.getPhysicalAction(); final Object targetMaxInMemoryCount = physicalAction.getObject(); physicalAction = cursor.getPhysicalAction(); final Object targetMaxTotalCount = physicalAction.getObject(); physicalAction = cursor.getPhysicalAction(); final Object invalidateOnChange = physicalAction.getObject(); physicalAction = cursor.getPhysicalAction(); final String cacheName = ((UTF8ByteDataHolder) physicalAction.getObject()).asString();
PhysicalAction physicalAction = cursor.getPhysicalAction(); final Object lockType = physicalAction.getObject(); physicalAction = cursor.getPhysicalAction(); final Object lockStrategy = objectManager.lookupObject((ObjectID) physicalAction.getObject()); physicalAction = cursor.getPhysicalAction(); final Object maxTTISeconds = physicalAction.getObject(); physicalAction = cursor.getPhysicalAction(); final Object maxTTLSeconds = physicalAction.getObject(); physicalAction = cursor.getPhysicalAction(); final Object targetMaxTotalCount = physicalAction.getObject(); physicalAction = cursor.getPhysicalAction(); final Object invalidateOnChange = physicalAction.getObject(); physicalAction = cursor.getPhysicalAction(); final String cacheName = ((UTF8ByteDataHolder) physicalAction.getObject()).asString(); physicalAction = cursor.getPhysicalAction(); final Object localCacheEnabled = physicalAction.getObject(); physicalAction = cursor.getPhysicalAction(); final Object deleteValueOnRemove = physicalAction.getObject();
@Override public void hydrate(ClientObjectManager objectManager, TCObject tcObject, DNA dna, Object po) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); String fieldName; Object fieldValue; while (cursor.next(encoding)) { PhysicalAction a = cursor.getPhysicalAction(); Assert.eval(a.isTruePhysical()); fieldName = a.getFieldName(); fieldValue = a.getObject(); tcObject.setValue(fieldName, fieldValue); } }
public void hydrate(final ApplicatorObjectManager objectManager, final TCObjectExternal tco, final DNA dna, final Object pojo) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { PhysicalAction a = cursor.getPhysicalAction(); if (a.isEntireArray()) { tco.setValue(VALUE_FIELD, a.getObject()); } else { tco.setValue(a.getFieldName(), a.getObject()); } } } }
@Override public void hydrate(ClientObjectManager objectManager, TCObject tcObject, DNA dna, Object po) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); String fieldName; Object fieldValue; while (cursor.next(encoding)) { PhysicalAction a = cursor.getPhysicalAction(); Assert.eval(a.isTruePhysical()); fieldName = a.getFieldName(); fieldValue = a.getObject(); tcObject.setValue(fieldName, fieldValue); } }
public void hydrate(final ApplicatorObjectManager objectManager, final TCObjectExternal tco, final DNA dna, final Object pojo) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { PhysicalAction a = cursor.getPhysicalAction(); if (a.isEntireArray()) { tco.setValue(VALUE_FIELD, a.getObject()); } else { tco.setValue(a.getFieldName(), a.getObject()); } } } }
public void hydrate(final ApplicatorObjectManager objectManager, final TCObjectExternal tco, final DNA dna, final Object pojo) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { PhysicalAction a = cursor.getPhysicalAction(); if (a.isEntireArray()) { tco.setValue(VALUE_FIELD, a.getObject()); } else { tco.setValue(a.getFieldName(), a.getObject()); } } } }
@Override public void apply(final ObjectID objectID, final DNACursor cursor, final ApplyTransactionInfo includeIDs) throws IOException { while (cursor.next()) { final PhysicalAction pa = cursor.getPhysicalAction(); if (pa.isEntireArray()) { final Object array = pa.getObject(); if (array instanceof byte[]) { value = (byte[]) array; includeIDs.getServerEventRecorder().recordEventValue(objectID, value); } else { final String type = safeTypeName(array); logger.error("received array of type " + type + " -- ignoring it"); } } else { logger.error("received physical action: " + pa + " -- ignoring it"); } Preconditions.checkState(!cursor.next(), "Only one iteration expected"); } }
public void hydrate(final ClientObjectManager objMgr, final TCObject tco, final DNA dna, final Object pojo) throws IOException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { PhysicalAction a = cursor.getPhysicalAction(); if (a.isEntireArray()) { tco.setValue(VALUE_FIELD, a.getObject()); } else { tco.setValue(a.getFieldName(), a.getObject()); } } } }
@Override public void hydrate(ClientObjectManager objectManager, TCObject tcObject, DNA dna, Object po) throws IOException, IllegalArgumentException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { PhysicalAction a = cursor.getPhysicalAction(); if (a.isArrayElement()) { setArrayElement(a.getArrayIndex(), a.getObject(), tcObject, po); } else if (a.isEntireArray() || a.isSubArray()) { Object array = a.getObject(); int offset = a.isEntireArray() ? 0 : a.getArrayIndex(); if (ClassUtils.isPrimitiveArray(array)) { System.arraycopy(array, 0, po, offset, Array.getLength(array)); } else { hydrateNonPrimitiveArray((Object[]) array, tcObject, po, offset); } } else { throw Assert.failure("Invalid physical action for array"); } } }
@Override public void hydrate(ClientObjectManager objectManager, TCObject tcObject, DNA dna, Object po) throws IOException, IllegalArgumentException, ClassNotFoundException { DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { PhysicalAction a = cursor.getPhysicalAction(); if (a.isArrayElement()) { setArrayElement(a.getArrayIndex(), a.getObject(), tcObject, po); } else if (a.isEntireArray() || a.isSubArray()) { Object array = a.getObject(); int offset = a.isEntireArray() ? 0 : a.getArrayIndex(); if (ClassUtils.isPrimitiveArray(array)) { System.arraycopy(array, 0, po, offset, Array.getLength(array)); } else { hydrateNonPrimitiveArray((Object[]) array, tcObject, po, offset); } } else { throw Assert.failure("Invalid physical action for array"); } } }