@Override public LogicalAction getLogicalAction() { if (returnedEvictionCompleted) { return EVICTION_COMPLETED; } else { return removeCursor.getLogicalAction(); } }
@Override public LogicalAction getLogicalAction() { return (index < actions.size() ? (LogicalAction) actions.get(index) : cursor.getLogicalAction()); }
@Override public LogicalAction getLogicalAction() { return (index < actions.size() ? (LogicalAction) actions.get(index) : cursor.getLogicalAction()); }
@Override public void hydrate(ClientObjectManager objectManager, TCObject tcObject, DNA dna, Object pojo) throws IOException, ClassNotFoundException { Set set = (Set) pojo; DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { LogicalAction action = cursor.getLogicalAction(); int method = action.getMethod(); Object[] params = action.getParameters(); apply(objectManager, set, method, params); } }
@Override public void hydrate(ClientObjectManager objectManager, TCObject tcObject, DNA dna, Object pojo) throws IOException, ClassNotFoundException { Set set = (Set) pojo; DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { LogicalAction action = cursor.getLogicalAction(); int method = action.getMethod(); Object[] params = action.getParameters(); apply(objectManager, set, method, params); } }
@Override public void hydrate(final ClientObjectManager objectManager, final TCObject tco, final DNA dna, final Object po) throws IOException, ClassNotFoundException { final DNACursor cursor = dna.getCursor(); while (cursor.next(this.encoding)) { final LogicalAction action = cursor.getLogicalAction(); final int method = action.getMethod(); final Object[] params = action.getParameters(); apply(objectManager, po, method, params); } }
@Override public void hydrate(final ClientObjectManager objectManager, final TCObject tco, final DNA dna, final Object po) throws IOException, ClassNotFoundException { final DNACursor cursor = dna.getCursor(); while (cursor.next(this.encoding)) { final LogicalAction action = cursor.getLogicalAction(); final int method = action.getMethod(); final Object[] params = action.getParameters(); apply(objectManager, po, method, params); } }
public void hydrate(ClientObjectManager objectManager, TCObject tcObject, DNA dna, Object pojo) throws IOException, ClassNotFoundException { List items = (List) pojo; DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { LogicalAction action = cursor.getLogicalAction(); int method = action.getMethod(); Object[] params = action.getParameters(); for (int i = 0, n = params.length; i < n; i++) { Object param = params[i]; if (param instanceof ObjectID) { params[i] = objectManager.lookupObject((ObjectID) param); } } try { apply(items, method, params); } catch (IndexOutOfBoundsException ioobe) { logger.error("Error applying update to " + pojo, ioobe); } } }
public void hydrate(ApplicatorObjectManager objectManager, TCObjectExternal tcObject, DNA dna, Object pojo) throws IOException, ClassNotFoundException { List items = (List) pojo; DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { LogicalAction action = cursor.getLogicalAction(); int method = action.getMethod(); Object[] params = action.getParameters(); for (int i = 0, n = params.length; i < n; i++) { Object param = params[i]; if (param instanceof ObjectID) { params[i] = objectManager.lookupObject((ObjectID) param); } } try { apply(items, method, params); } catch (IndexOutOfBoundsException ioobe) { logger.error("Error applying update to " + pojo, ioobe); } } }
@Override public void hydrate(final ApplicatorObjectManager objectManager, final TCObjectExternal tcObjectExternal, final DNA dna, final Object pojo) throws ClassNotFoundException, IOException { final DNACursor cursor = dna.getCursor(); if (!dna.isDelta()) { // Shouldn't have anything to hydrate if (cursor.next(this.encoding)) { throw new AssertionError("CDSM shouldn't fault in entry mappings : DNA " + dna); } return; } boolean clearFound = false; // Transactions could be folded, hence ignoring other changes. while (cursor.next(this.encoding)) { final LogicalAction action = cursor.getLogicalAction(); final int method = action.getMethod(); if (method == SerializationUtil.CLEAR || method == SerializationUtil.CLEAR_LOCAL_CACHE) { ((TCObjectServerMap) tcObjectExternal).clearLocalCache((TCServerMap) pojo); clearFound = true; } else { getLogger().warn("CDSM received delta changes for methods other than CLEAR : " + method); } } if (!clearFound) { // Can't assert here as resent transactions on server crash can be broadcasted as it might skip apply at the // server. getLogger() .warn("CDSM shouldn't normally be broadcasting changes unless its a clear, but could be a resent txn after crash : DNA " + dna); } }
@Override public void hydrate(final ApplicatorObjectManager objectManager, final TCObjectExternal tcObjectExternal, final DNA dna, final Object pojo) throws ClassNotFoundException, IOException { final DNACursor cursor = dna.getCursor(); if (!dna.isDelta()) { // Shouldn't have anything to hydrate if (cursor.next(this.encoding)) { throw new AssertionError("CDSM shouldn't fault in entry mappings : DNA " + dna); } return; } boolean clearFound = false; // Transactions could be folded, hence ignoring other changes. while (cursor.next(this.encoding)) { final LogicalAction action = cursor.getLogicalAction(); final int method = action.getMethod(); if (method == SerializationUtil.CLEAR || method == SerializationUtil.CLEAR_LOCAL_CACHE) { ((TCObjectServerMap) tcObjectExternal).clearLocalCache((TCServerMap) pojo); clearFound = true; } else { getLogger().warn("CDSM received delta changes for methods other than CLEAR : " + method); } } if (!clearFound) { // Can't assert here as resent transactions on server crash can be broadcasted as it might skip apply at the // server. getLogger() .warn("CDSM shouldn't normally be broadcasting changes unless its a clear, but could be a resent txn after crash : DNA " + dna); } }
@Override public void hydrate(ClientObjectManager objectManager, TCObject tcObject, DNA dna, Object po) throws IOException, ClassNotFoundException { List list = (List) po; DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { LogicalAction action = cursor.getLogicalAction(); int method = action.getMethod(); Object[] params = action.getParameters(); for (int i = 0, n = params.length; i < n; i++) { Object param = params[i]; if (param instanceof ObjectID) { try { params[i] = objectManager.lookupObject((ObjectID) param); } catch (AbortedOperationException e) { throw new TCRuntimeException(e); } } } try { apply(list, method, params); } catch (IndexOutOfBoundsException ioobe) { logger.error("Error applying update to " + po, ioobe); } } }
@Override public void hydrate(ClientObjectManager objectManager, TCObject tcObject, DNA dna, Object po) throws IOException, ClassNotFoundException { List list = (List) po; DNACursor cursor = dna.getCursor(); while (cursor.next(encoding)) { LogicalAction action = cursor.getLogicalAction(); int method = action.getMethod(); Object[] params = action.getParameters(); for (int i = 0, n = params.length; i < n; i++) { Object param = params[i]; if (param instanceof ObjectID) { try { params[i] = objectManager.lookupObject((ObjectID) param); } catch (AbortedOperationException e) { throw new TCRuntimeException(e); } } } try { apply(list, method, params); } catch (IndexOutOfBoundsException ioobe) { logger.error("Error applying update to " + po, ioobe); } } }