/** * Extend the toString() information with more procedure details */ public String toStringDetails() { final StringBuilder sb = toStringSimpleSB(); sb.append(" submittedTime="); sb.append(getSubmittedTime()); sb.append(", lastUpdate="); sb.append(getLastUpdate()); final int[] stackIndices = getStackIndexes(); if (stackIndices != null) { sb.append("\n"); sb.append("stackIndexes="); sb.append(Arrays.toString(stackIndices)); } return sb.toString(); }
/** * Called on store load by the ProcedureExecutor to load part of the stack. * * Each procedure has its own stack-positions. Which means we have to write * to the store only the Procedure we executed, and nothing else. * on load we recreate the full stack by aggregating each procedure stack-positions. */ protected synchronized void loadStack(Procedure<TEnvironment> proc) { addSubProcedure(proc); int[] stackIndexes = proc.getStackIndexes(); if (stackIndexes != null) { if (subprocStack == null) { subprocStack = new ArrayList<>(); } int diff = (1 + stackIndexes[stackIndexes.length - 1]) - subprocStack.size(); if (diff > 0) { subprocStack.ensureCapacity(1 + stackIndexes[stackIndexes.length - 1]); while (diff-- > 0) subprocStack.add(null); } for (int i = 0; i < stackIndexes.length; ++i) { subprocStack.set(stackIndexes[i], proc); } } if (proc.getState() == ProcedureState.ROLLEDBACK) { state = State.ROLLINGBACK; } else if (proc.isFailed()) { state = State.FAILED; } }
final int[] stackIds = proc.getStackIndexes(); if (stackIds != null) { for (int i = 0; i < stackIds.length; ++i) {
/** * Extend the toString() information with more procedure details */ public String toStringDetails() { final StringBuilder sb = toStringSimpleSB(); sb.append(" submittedTime="); sb.append(getSubmittedTime()); sb.append(", lastUpdate="); sb.append(getLastUpdate()); final int[] stackIndices = getStackIndexes(); if (stackIndices != null) { sb.append("\n"); sb.append("stackIndexes="); sb.append(Arrays.toString(stackIndices)); } return sb.toString(); }
/** * Extend the toString() information with more procedure * details */ public String toStringDetails() { final StringBuilder sb = toStringSimpleSB(); sb.append(" submittedTime="); sb.append(getSubmittedTime()); sb.append(", lastUpdate="); sb.append(getLastUpdate()); final int[] stackIndices = getStackIndexes(); if (stackIndices != null) { sb.append("\n"); sb.append("stackIndexes="); sb.append(Arrays.toString(stackIndices)); } return sb.toString(); }
/** * Called on store load by the ProcedureExecutor to load part of the stack. * * Each procedure has its own stack-positions. Which means we have to write * to the store only the Procedure we executed, and nothing else. * on load we recreate the full stack by aggregating each procedure stack-positions. */ protected synchronized void loadStack(final Procedure proc) { int[] stackIndexes = proc.getStackIndexes(); if (stackIndexes != null) { if (subprocedures == null) { subprocedures = new ArrayList<Procedure>(); } int diff = (1 + stackIndexes[stackIndexes.length - 1]) - subprocedures.size(); if (diff > 0) { subprocedures.ensureCapacity(1 + stackIndexes[stackIndexes.length - 1]); while (diff-- > 0) subprocedures.add(null); } for (int i = 0; i < stackIndexes.length; ++i) { subprocedures.set(stackIndexes[i], proc); } } if (proc.getState() == ProcedureState.ROLLEDBACK) { state = State.ROLLINGBACK; } else if (proc.isFailed()) { state = State.FAILED; } }
/** * Called on store load by the ProcedureExecutor to load part of the stack. * * Each procedure has its own stack-positions. Which means we have to write * to the store only the Procedure we executed, and nothing else. * on load we recreate the full stack by aggregating each procedure stack-positions. */ protected synchronized void loadStack(final Procedure proc) { addSubProcedure(proc); int[] stackIndexes = proc.getStackIndexes(); if (stackIndexes != null) { if (subprocStack == null) { subprocStack = new ArrayList<>(); } int diff = (1 + stackIndexes[stackIndexes.length - 1]) - subprocStack.size(); if (diff > 0) { subprocStack.ensureCapacity(1 + stackIndexes[stackIndexes.length - 1]); while (diff-- > 0) subprocStack.add(null); } for (int i = 0; i < stackIndexes.length; ++i) { subprocStack.set(stackIndexes[i], proc); } } if (proc.getState() == ProcedureState.ROLLEDBACK) { state = State.ROLLINGBACK; } else if (proc.isFailed()) { state = State.FAILED; } }
/** * Called on store load by the ProcedureExecutor to load part of the stack. * * Each procedure has its own stack-positions. Which means we have to write * to the store only the Procedure we executed, and nothing else. * on load we recreate the full stack by aggregating each procedure stack-positions. */ protected synchronized void loadStack(Procedure<TEnvironment> proc) { addSubProcedure(proc); int[] stackIndexes = proc.getStackIndexes(); if (stackIndexes != null) { if (subprocStack == null) { subprocStack = new ArrayList<>(); } int diff = (1 + stackIndexes[stackIndexes.length - 1]) - subprocStack.size(); if (diff > 0) { subprocStack.ensureCapacity(1 + stackIndexes[stackIndexes.length - 1]); while (diff-- > 0) subprocStack.add(null); } for (int i = 0; i < stackIndexes.length; ++i) { subprocStack.set(stackIndexes[i], proc); } } if (proc.getState() == ProcedureState.ROLLEDBACK) { state = State.ROLLINGBACK; } else if (proc.isFailed()) { state = State.FAILED; } }
final int[] stackIds = proc.getStackIndexes(); if (stackIds != null) { for (int i = 0; i < stackIds.length; ++i) {
int[] stackIds = proc.getStackIndexes(); if (stackIds != null) { for (int i = 0; i < stackIds.length; ++i) {
final int[] stackIds = proc.getStackIndexes(); if (stackIds != null) { for (int i = 0; i < stackIds.length; ++i) {