首页 / base / oaSession

oaSession

模块: oapy._oa._base 导入: from oapy._oa import _base

概览

oaSessionoapy 中可用,可通过 _base 模块访问。

本页汇总 oaSession 当前在 oapy 中可用的 Python 接口。

详细说明

The oaSession class implements a session database。 This is a non-persistent "database" which is used as the database parent for session-wide information。 This session information is represented by the object classes which inherit from oaSessionObject , such as oaAppDef and oaViewType 。 A session database is automatically created and maintained as needed by the OpenAccess implementation。 There is only one session database per OpenAccess session。

方法总览

状态 Python 调用
obj.calcVMSize()
obj.minimizeVM()
obj.getAppDefs()
obj.getAppObjectDefs()
obj.getConstraintParamDefs()
obj.getConstraintDefs()
obj.getDerivedLayerParamDefs()
obj.getDerivedLayerDefs()
obj.getGroupDefs()
obj.getConstraintGroupDefs()
obj.setThreadUseModel(useModelIn)
obj.getThreadUseModel()
_base.oaSession.get()

方法说明

obj.calcVMSize()

绑定状态: 已绑定

Python 调用: obj.calcVMSize()

This function calculates and returns the amount of virtual memory that OpenAccess is currently using, including all open databases。

Python 示例

from oapy._oa import _base

# assume obj is a oaSession
obj.calcVMSize()

obj.minimizeVM()

绑定状态: 已绑定

Python 调用: obj.minimizeVM()

This function minimizes the amount of virtual memory currently used by OpenAccess。 It releases memory OpenAccess is holding in reserve for future use, as well as dynamically allocated data structures that can be rebuilt as needed。 Any libraries and databases that are in memory remain in memory, no objects are destroyed, and no object pointers are invalidated by this function。 Applications can call this function in several scenarios: An application loads a number of OpenAccess databases, builds application-specific data structures, purges all of the databases, runs some algorithms that require large chunks of memory, then reopens the OpenAccess databases to annotate the results。 An application loads a number of OpenAccess databases, builds application-specific data structures, purges all of the databases, then wants to recover all of the memory used by OA。 An application creates or edits an OpenAccess database, causing OpenAccess to build transient data structures, then wants to minimize the memory used by the database before starting a phase of processing that interacts with OpenAccess in different ways。 In the first two cases, minimizeVM() should be called after purging the OpenAccess databases。 In the third case minimizeVM() should be called between the different phases of processing。 This function should be called sparingly, as it can have a substantial impact on the performance of subsequent operations。

Python 示例

from oapy._oa import _base

# assume obj is a oaSession
obj.minimizeVM()

obj.getAppDefs()

绑定状态: 已绑定

Python 调用: obj.getAppDefs()

This function returns the collection of extensions that are currently defined。

Python 示例

from oapy._oa import _base

# assume obj is a oaSession
obj.getAppDefs()

obj.getAppObjectDefs()

绑定状态: 已绑定

Python 调用: obj.getAppObjectDefs()

This function returns a collection of all oaAppObjectDefs currently defined。

Python 示例

from oapy._oa import _base

# assume obj is a oaSession
obj.getAppObjectDefs()

obj.getConstraintParamDefs()

绑定状态: 已绑定

Python 调用: obj.getConstraintParamDefs()

This function returns the collection of constraint parameter definitions that are currently defined。

Python 示例

from oapy._oa import _base

# assume obj is a oaSession
obj.getConstraintParamDefs()

obj.getConstraintDefs()

绑定状态: 已绑定

Python 调用: obj.getConstraintDefs()

This function returns the collection of all currently defined constraint definitions。

Python 示例

from oapy._oa import _base

# assume obj is a oaSession
obj.getConstraintDefs()

obj.getDerivedLayerParamDefs()

绑定状态: 已绑定

Python 调用: obj.getDerivedLayerParamDefs()

This function returns the collection of all currently defined derived layer parameter definitions。

Python 示例

from oapy._oa import _base

# assume obj is a oaSession
obj.getDerivedLayerParamDefs()

obj.getDerivedLayerDefs()

绑定状态: 已绑定

Python 调用: obj.getDerivedLayerDefs()

This function returns the collection of all currently defined derived layer definitions。

Python 示例

from oapy._oa import _base

# assume obj is a oaSession
obj.getDerivedLayerDefs()

obj.getGroupDefs()

绑定状态: 已绑定

Python 调用: obj.getGroupDefs()

This function returns the collection of all currently defined group definitions。

Python 示例

from oapy._oa import _base

# assume obj is a oaSession
obj.getGroupDefs()

obj.getConstraintGroupDefs()

绑定状态: 已绑定

Python 调用: obj.getConstraintGroupDefs()

This function returns the collection of all currently defined constraint group definitions。

Python 示例

from oapy._oa import _base

# assume obj is a oaSession
obj.getConstraintGroupDefs()

obj.setThreadUseModel(useModelIn)

绑定状态: 已绑定

Python 调用: obj.setThreadUseModel(useModelIn)

This function sets the thread use model for the session。 The thread use model describes the way the application intends to interact with the database。 By default applications are assumed to use the single threaded use model which corresponds to the OA22.04 behavior。 This function does not create any threads。 Changing the thread use model will alter the behavior of the database and it can significantly affect performance and capacity。 Switching from a multi-threaded use model to a single threaded use model will not undo any of the data preconditioning that occurs when setting a multi-threaded use model。 See the Thread Safety of the Programmer's Guide for details regarding the performance and capacity tradeoffs as well as the application's responsibilities when using OpenAccess in a multi-threaded way。

参数

  • useModelIn: The thread use model of the application。

Python 示例

from oapy._oa import _base

# assume obj is a oaSession
obj.setThreadUseModel(useModelIn)

obj.getThreadUseModel()

绑定状态: 已绑定

Python 调用: obj.getThreadUseModel()

This function returns the current thread use model of the session。

Python 示例

from oapy._oa import _base

# assume obj is a oaSession
obj.getThreadUseModel()

_base.oaSession.get()

绑定状态: 已绑定

Python 调用: _base.oaSession.get()

This function returns the global session object。

Python 示例

from oapy._oa import _base

_base.oaSession.get()