{
StringVec listVars();
ByteVec fetchSerializedContent(in string varName) raises (SALOME::SALOME_Exception);
+ void fetchAndGetAccessOfVar(in string varName, out string access, out ByteVec data) raises (SALOME::SALOME_Exception);
};
interface RequestSwitcherDSM : RequestSwitcherBase
boolean shutdownIfNotHostedByDSM(out DataScopeKiller killer) raises (SALOME::SALOME_Exception);
ByteVec fetchSerializedContent(in string varName) raises (SALOME::SALOME_Exception);
SeqOfByteVec getAllKeysOfVarWithTypeDict(in string varName) raises (SALOME::SALOME_Exception);
- RequestSwitcher getRequestSwitcher();
void takeANap(in double napDurationInSec) raises (SALOME::SALOME_Exception);
};
void atomicApply(in ListOfTransaction transactions) raises (SALOME::SALOME_Exception);
ByteVec waitForMonoThrRev(in KeyWaiter kw) raises (SALOME::SALOME_Exception);
ByteVec waitForAndKill(in KeyWaiter kw) raises (SALOME::SALOME_Exception);
+ RequestSwitcher getRequestSwitcher();
};
interface DataServerManager
_orb->shutdown(0);
}
-RequestSwitcher::RequestSwitcher(CORBA::ORB_ptr orb, DataScopeServerBase *ds):RequestSwitcherBase(orb),_ds(ds)
+RequestSwitcher::RequestSwitcher(CORBA::ORB_ptr orb, DataScopeServerTransaction *ds):RequestSwitcherBase(orb),_ds(ds)
{
}
return _ds->fetchSerializedContent(varName);
}
+void RequestSwitcher::fetchAndGetAccessOfVar(const char *varName, CORBA::String_out access, SALOME::ByteVec_out data)
+{
+ return _ds->fetchAndGetAccessOfVar(varName,access,data);
+}
+
DataScopeServerBase::DataScopeServerBase(CORBA::ORB_ptr orb, SALOME::DataScopeKiller_var killer, const std::string& scopeName):_globals(0),_locals(0),_pickler(0),_orb(CORBA::ORB::_duplicate(orb)),_name(scopeName),_killer(killer)
{
}
return ret;
}
-SALOME::RequestSwitcher_ptr DataScopeServerBase::getRequestSwitcher()
-{
- if(_rs.isNull())
- {
- _rs=new RequestSwitcher(_orb,this);
- }
- CORBA::Object_var obj(_rs->activate());
- return SALOME::RequestSwitcher::_narrow(obj);
-}
-
void DataScopeServerBase::takeANap(CORBA::Double napDurationInSec)
{
if(napDurationInSec<0.)
{
}
+SALOME::RequestSwitcher_ptr DataScopeServerTransaction::getRequestSwitcher()
+{
+ if(_rs.isNull())
+ {
+ _rs=new RequestSwitcher(_orb,this);
+ }
+ CORBA::Object_var obj(_rs->activate());
+ return SALOME::RequestSwitcher::_narrow(obj);
+}
CORBA::ORB_var _orb;
};
- class DataScopeServerBase;
+ class DataScopeServerTransaction;
/*!
* Servant activated by a specific POA (single thread) having itself its specific POA_manager.
class SALOMESDS_EXPORT RequestSwitcher : public RequestSwitcherBase, public virtual POA_SALOME::RequestSwitcher
{
public:
- RequestSwitcher(CORBA::ORB_ptr orb, DataScopeServerBase *ds);
+ RequestSwitcher(CORBA::ORB_ptr orb, DataScopeServerTransaction *ds);
SALOME::StringVec *listVars();
SALOME::ByteVec *fetchSerializedContent(const char *varName);
+ void fetchAndGetAccessOfVar(const char *varName, CORBA::String_out access, SALOME::ByteVec_out data);
private:
//! handle on its creator to give access to services when _poa_manager_under_control is in hold mode.
- DataScopeServerBase *_ds;
+ DataScopeServerTransaction *_ds;
};
class KeyWaiter;
CORBA::Boolean shutdownIfNotHostedByDSM(SALOME::DataScopeKiller_out killer);
SALOME::ByteVec *fetchSerializedContent(const char *varName);
SALOME::SeqOfByteVec *getAllKeysOfVarWithTypeDict(const char *varName);
- SALOME::RequestSwitcher_ptr getRequestSwitcher();
void takeANap(CORBA::Double napDurationInSec);
public:
~DataScopeServerBase();
std::string _name;
std::list< std::pair< SALOME::BasicDataServer_var, BasicDataServer * > > _vars;
SALOME::DataScopeKiller_var _killer;
- AutoServantPtr<RequestSwitcher> _rs;
static std::size_t COUNTER;
};
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);
+ SALOME::RequestSwitcher_ptr getRequestSwitcher();
private:
PyObject *getPyCmpFunc();
private:
PortableServer::POA_var _poa_for_key_waiter;
std::list< KeyWaiter * > _waiting_keys;
+ AutoServantPtr<RequestSwitcher> _rs;
};
}