@Override protected void undo(List<?> tuple) throws TeiidComponentException, TeiidProcessingException { if (primaryKeyChangePossible) { insertTuple(tuple, false, true); } else { updateTuple(tuple); } }
@Override public void loaded(String matTableName, TempTable table) { swapTempTable(matTableName, table); this.getMatTableInfo(matTableName).setState(MatState.LOADED, true); }
@Override public void failedLoad(String matTableName) { MatTableInfo info = getMatTableInfo(matTableName); synchronized (info) { if (info.state != MatState.LOADED) { info.setState(MatState.FAILED_LOAD, null); } } }
@Override void success() throws TeiidComponentException, ExpressionEvaluationException, TeiidProcessingException { //existing tuples have been removed //changeSet contains possible updates if (primaryKeyChangePossible) { changeSet.close(); if (changeSetProcessor == null) { changeSetProcessor = new InsertUpdateProcessor(changeSet.createIndexedTupleSource(true), false, null, true, false); } changeSetProcessor.process(); //when this returns, we're up to date } }
/** * Resets this program, so it can be run through again. */ public void reset(String sessionId){ counter = 0; this.tempTables = new TempTableStore(sessionId, TransactionMode.ISOLATE_WRITES); this.startedTxn = false; this.trappingExceptions = false; }
@Override public boolean needsLoading(String matTableName, Serializable loadingAddress, boolean firstPass, boolean refresh, boolean invalidate) { MatTableInfo info = getMatTableInfo(matTableName); return info.shouldLoad(loadingAddress, firstPass, refresh, invalidate); }
@Override public void loaded(String matTableName, TempTable table) { swapTempTable(matTableName, table); this.getMatTableInfo(matTableName).setState(MatState.LOADED, true); }
@Override public void failedLoad(String matTableName) { MatTableInfo info = getMatTableInfo(matTableName); synchronized (info) { if (info.state != MatState.LOADED) { info.setState(MatState.FAILED_LOAD, null); } } }
@Override void success() throws TeiidComponentException, ExpressionEvaluationException, TeiidProcessingException { //existing tuples have been removed //changeSet contains possible updates if (primaryKeyChangePossible) { changeSet.close(); if (changeSetProcessor == null) { changeSetProcessor = new InsertUpdateProcessor(changeSet.createIndexedTupleSource(true), false, null, true, false); } changeSetProcessor.process(); //when this returns, we're up to date } }
/** * Resets this program, so it can be run through again. */ public void reset(String sessionId){ counter = 0; this.tempTables = new TempTableStore(sessionId, TransactionMode.ISOLATE_WRITES); this.startedTxn = false; this.trappingExceptions = false; }
@Override public boolean needsLoading(String matTableName, Serializable loadingAddress, boolean firstPass, boolean refresh, boolean invalidate) { MatTableInfo info = getMatTableInfo(matTableName); return info.shouldLoad(loadingAddress, firstPass, refresh, invalidate); }
@Override protected void undo(List<?> tuple) throws TeiidComponentException, TeiidProcessingException { insertTuple(tuple, false, true); } };
@Override public void loaded(String matTableName, TempTable table) { swapTempTable(matTableName, table); this.getMatTableInfo(matTableName).setState(MatState.LOADED, true); }
@Override public void failedLoad(String matTableName) { MatTableInfo info = getMatTableInfo(matTableName); synchronized (info) { if (info.state != MatState.LOADED) { info.setState(MatState.FAILED_LOAD, null); } } }
/** * Resets this program, so it can be run through again. */ public void reset(String sessionId){ counter = 0; this.tempTables = new TempTableStore(sessionId, TransactionMode.ISOLATE_WRITES); this.startedTxn = false; this.trappingExceptions = false; }
@Override public boolean needsLoading(String matTableName, Serializable loadingAddress, boolean firstPass, boolean refresh, boolean invalidate) { MatTableInfo info = getMatTableInfo(matTableName); return info.shouldLoad(loadingAddress, firstPass, refresh, invalidate); }
@Override protected void undo(List<?> tuple) throws TeiidComponentException, TeiidProcessingException { insertTuple(tuple, false, true); } };
@Override protected void undo(List<?> tuple) throws TeiidComponentException, TeiidProcessingException { if (primaryKeyChangePossible) { insertTuple(tuple, false, true); } else { updateTuple(tuple); } }
@Override protected void undo(List<?> tuple) throws TeiidComponentException, TeiidProcessingException { insertTuple(tuple, false, true); } };
@Override protected void undo(List<?> tuple) throws TeiidComponentException, TeiidProcessingException { if (primaryKeyChangePossible) { insertTuple(tuple, false, true); } else { updateTuple(tuple); } }