10.12.2012 Views

Oracle C++ Call Interface Programmer's Guide

Oracle C++ Call Interface Programmer's Guide

Oracle C++ Call Interface Programmer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Environment Class<br />

Environment Class<br />

The Environment class provides an OCCI environment to manage memory and<br />

other resources for OCCI objects.<br />

The application can have multiple OCCI environments. Each environment would<br />

have its own heap and thread-safety mutexes and so forth.<br />

To create an Environment object, use the syntax:<br />

Environment()<br />

enum Mode<br />

{<br />

DEFAULT = OCI_DEFAULT,<br />

OBJECT = OCI_OBJECT,<br />

SHARED = OCI_SHARED,<br />

NO_USERCALLBACKS = OCI_NO_UCB,<br />

THREADED_MUTEXED = OCI_THREADED,<br />

THREADED_UNMUTEXED = OCI_THREADED | OCI_ENV_NO_MUTEX<br />

};<br />

Summary of Environment Methods<br />

Table 8–9 Environment Methods<br />

Method Summary<br />

createConnection() on page 8-63 Create a connection to a database.<br />

createConnectionPool() on Create a connection pool.<br />

page 8-63<br />

createEnvironment() on page 8-64 Create an environment and use the specified memory<br />

management functions.<br />

getCacheMaxSize() on page 8-66 Retrieve the Cache Max heap size.<br />

getCacheOptSize() on page 8-66 Retrieve the Cache optimal heap size.<br />

getCurrentHeapSize () on<br />

page 8-66<br />

8-62 <strong>Oracle</strong> <strong>C++</strong> <strong>Call</strong> <strong>Interface</strong> Programmer’s <strong>Guide</strong><br />

Return the current amount of memory allocated to all<br />

objects in the current environment.<br />

getMap() on page 8-66() Return the Map for the current environment.<br />

getOCIEnvironment() on<br />

page 8-66<br />

Return the OCI environment associated with the<br />

current environment.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!