Class FWSimSyncManager
java.lang.Object
net.simplace.sim.io.sync.FWSimSyncManager
Holds the synchronisation adapters (
FWSimSyncAdapter) of a session. For synchronized projects
FWSimProject calls sync(Map) whenever all simulations wait. Note: adapters are
currently never added (addSync(FWSimSession, Element) is not called), so synchronising does nothing.- Author:
- Andreas Enders
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSync(FWSimSession aSession, org.jdom2.Element aSyncElement) Deprecated.not used (synchronisation is unfinished, see class description)HashMap<String, FWSimVariable<?>> CallsFWSimIOAdapter.createVariables()on all adapters.getSyncAdapter(String aSourceName) voidreset()Finalizes all adapters (the adapters stay registered).voidsync(Map<String, FWSimVarMap> aVarMapsContainer) CallsFWSimSyncAdapter.sync(Map)on all adapters in order.
-
Constructor Details
-
FWSimSyncManager
public FWSimSyncManager()
-
-
Method Details
-
addSync
@Deprecated public String addSync(FWSimSession aSession, org.jdom2.Element aSyncElement) throws MissingSimResourceException, DuplicateSimFieldException Deprecated.not used (synchronisation is unfinished, see class description)Creates a synchronisation adapter from its XML element and adds it under its name.- Parameters:
aSession- the sessionaSyncElement- the XML element describing the adapter (attributeclass= adapter class)- Returns:
- name of the adapter
- Throws:
MissingSimResourceException- declared, not thrownDuplicateSimFieldException- declared, not thrown
-
createVariables
CallsFWSimIOAdapter.createVariables()on all adapters.- Returns:
- the variables of all adapters, by name
-
sync
CallsFWSimSyncAdapter.sync(Map)on all adapters in order.- Parameters:
aVarMapsContainer- variable maps of the simulations of the project, by simulation id
-
getSyncAdapter
- Parameters:
aSourceName- name of the adapter- Returns:
- the adapter, or
nullif unknown
-
getSyncAdapters
- Returns:
- all synchronisation adapters
-
reset
-