TransactionMultiKeyAddSession addMultiKeyValueSession(in string varName) raises (SALOME::SALOME_Exception);
Transaction removeKeyInVarErrorIfNotAlreadyExisting(in string varName, in ByteVec keyValue) raises (SALOME::SALOME_Exception);
TransactionRdWrAccess createWorkingVarTransac(in string varName, in ByteVec constValue) raises (SALOME::SALOME_Exception);
+ Transaction killVarTransac(in string varName) raises (SALOME::SALOME_Exception);
KeyWaiter waitForKeyInVar(in string varName, in ByteVec keyVal) raises (SALOME::SALOME_Exception);
KeyWaiter waitForKeyInVarAndKillIt(in string varName, in ByteVec keyVal, out Transaction transac) raises (SALOME::SALOME_Exception);
void atomicApply(in ListOfTransaction transactions) raises (SALOME::SALOME_Exception);
return SALOME::TransactionRdWrAccess::_narrow(obj2);
}
+SALOME::Transaction_ptr DataScopeServerTransaction::killVarTransac(const char *varName)
+{
+ std::string varNameCpp(varName);
+ checkExistingVar(varNameCpp);
+ //
+ TransactionKillVar *ret(new TransactionKillVar(this,varName));
+ CORBA::Object_var obj2(ret->activate());
+ return SALOME::Transaction::_narrow(obj2);
+}
+
SALOME::KeyWaiter_ptr DataScopeServerTransaction::waitForKeyInVar(const char *varName, const SALOME::ByteVec& keyVal)
{
PickelizedPyObjServer *pickelObj(checkVarExistingAndDict(varName));
SALOME::TransactionMultiKeyAddSession_ptr addMultiKeyValueSession(const char *varName);
SALOME::Transaction_ptr removeKeyInVarErrorIfNotAlreadyExisting(const char *varName, const SALOME::ByteVec& key);
SALOME::TransactionRdWrAccess_ptr createWorkingVarTransac(const char *varName, const SALOME::ByteVec& constValue);
+ SALOME::Transaction_ptr killVarTransac(const char *varName);
SALOME::KeyWaiter_ptr waitForKeyInVar(const char *varName, const SALOME::ByteVec& keyVal);
SALOME::KeyWaiter_ptr waitForKeyInVarAndKillIt(const char *varName, const SALOME::ByteVec& keyVal, SALOME::Transaction_out transac);
void atomicApply(const SALOME::ListOfTransaction& transactions);
_dsct->createRdWrVarInternal(_var_name,data2);
}
+TransactionKillVar::TransactionKillVar(DataScopeServerTransaction *dsct, const std::string& varName):Transaction(dsct,varName)
+{
+}
+
+/*!
+ * TODO
+ */
+void TransactionKillVar::prepareRollBackInCaseOfFailure()
+{
+ checkVarExisting();
+ //BasicDataServer *bds(_dsct->retrieveVarInternal2(_var_name);
+ //bds->clone();
+}
+
+void TransactionKillVar::perform()
+{
+ _dsct->deleteVar(_var_name.c_str());
+}
+
+/*!
+ * TODO
+ */
+void TransactionKillVar::rollBack()
+{
+}
+
+/*!
+ * no implementation it is not a bug ! killVar is not an event.
+ */
+void TransactionKillVar::notify()
+{
+}
+
TransactionDictModify::TransactionDictModify(DataScopeServerTransaction *dsct, const std::string& varName):Transaction(dsct,varName),_varc(0)
{
_varc=checkVarExistingAndDict();
void perform();
};
+ class TransactionKillVar : public Transaction
+ {
+ public:
+ TransactionKillVar(DataScopeServerTransaction *dsct, const std::string& varName);
+ void prepareRollBackInCaseOfFailure();
+ void perform();
+ void rollBack();
+ void notify();
+ };
+
class PickelizedPyObjServer;
class TransactionDictModify : public Transaction