NVIDIA Iray API Home  Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::IDatabase_configuration Class Referenceabstract

This interface is used to query and change the database configuration. More...

Inheritance diagram for mi::neuraylib::IDatabase_configuration:
Inheritance graph
[legend]

Public Member Functions

virtual Sint32  set_memory_limits (Size low_water, Size high_water)=0
  Sets the limits for memory usage of the database. More...
 
virtual void  get_memory_limits (Size *low_water, Size *high_water) const =0
  Returns the limits for memory usage of the database. More...
 
virtual Sint32  set_disk_swapping (const char *path)=0
  Configures the directory for disk swapping. More...
 
virtual const char *  get_disk_swapping () const =0
  Returns the configured directory for disk swapping. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x8f725100, 0xf66c, 0x4fa3, 0xbf, 0x89, 0xb5, 0xbf, 0xea, 0x6c, 0x4c, 0x30 >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
Self
  Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
  Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x8f725100, 0xf66c, 0x4fa3, 0xbf, 0x89, 0xb5, 0xbf, 0xea, 0x6c, 0x4c, 0x30 >
static bool  compare_iid (const Uuid &iid)
  Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

This interface is used to query and change the database configuration.

Member Function Documentation

virtual const char* mi::neuraylib::IDatabase_configuration::get_disk_swapping ( ) const
pure virtual

Returns the configured directory for disk swapping.

See Also
set_disk_swapping(), set_memory_limits(), get_memory_limits()
Returns
The configured directory, or NULL if disabled.
virtual void mi::neuraylib::IDatabase_configuration::get_memory_limits ( Size low_water,
Size high_water 
) const
pure virtual

Returns the limits for memory usage of the database.

See Also
set_memory_limits(), set_disk_swapping(), get_disk_swapping()
Parameters
[out] low_water The current low water mark (in bytes).
[out] high_water The current high water mark (in bytes).
virtual Sint32 mi::neuraylib::IDatabase_configuration::set_disk_swapping ( const char *  path)
pure virtual

Configures the directory for disk swapping.

If no directory is configured (the default) disk swapping is disabled.

Note
The configured directory must be used exclusively from one instance of this API component. Sharing the directory between multiple nodes in a network, or between different instances of this API component on the same node (same or different processes) leads to wrong behavior.
See Also
get_disk_swapping(), set_memory_limits(), get_memory_limits()
Parameters
path The path to the directory to use for disk swapping.
Returns
0, in case of success, -1 in case of failure.
virtual Sint32 mi::neuraylib::IDatabase_configuration::set_memory_limits ( Size  low_water,
Size  high_water 
)
pure virtual

Sets the limits for memory usage of the database.

The database attempts to keep the total amount of memory used by database elements and jobs below a configurable limit called high water mark. If that limit is exceeded the database takes actions to reduce the memory usage until another limit, the low water mark, is reached (or no further memory reduction is possible). An internal binary format is used which can be read into the database again very fast. This method can be called at any time from any thread but no guarantee can be given if and when the new memory limits will be reached.

Possible actions taken by the database to reduce memory usage are:

  • Discarding results of database jobs.
  • Discarding local copies of elements and jobs that are not required (some copies might be required to meet the configured redundancy level).
  • If disk swapping is enabled, offload database elements to disk.
See Also
get_memory_limits(), set_disk_swapping(), get_disk_swapping(), mi::neuraylib::INetwork_configuration::set_redundancy_level(), mi::neuraylib::INetwork_configuration::get_redundancy_level()
Parameters
low_water Flushing stops when memory usage (in bytes) drops below this value.
high_water Flushing starts when memory usage (in bytes) exceeds this value. The value 0 disables flushing completely.
Returns
0 in case of success, -1 in case of failure (low_water not less than high_water unless high_water equals zero).