Tchater maintenant avec le support
Tchattez avec un ingénieur du support

InTrust 11.6 - InTrust SDK Reference

InTrust SDK Overview Repository Services API Log Knowledge Base API Enumerations Interfaces

IRepositoryRecordInserter

Provides write access to the repository that it is associated with and manages one or more IRepositoryRecordInserterLight interfaces, which do the actual writing. For each IRepositoryRecordInserterLight, it also stores predefined field values that are the same in all records written by that IRepositoryRecordInserterLight.

Incoming records are pushed to the repository at regular intervals. However, you can force an immediate write by calling the Commit method.

Methods

BindFields

Sets the values of the path-specifying fields for records that will be written to the same repository file.

Syntax

HRESULT BindFields(

    [in] tags path,

    [out, retval] IRepositoryRecordInserterLight**

);

Parameters
Name Type Meaning

path

tags

The field record values that you specify here are supposed to be the same for all records generated by the IRepositoryRecordInserterLight that will be initialized.

 

IRepositoryRecordInserterLight**

Record-inserting interface with some record field values predefined.

PutRecords

Writes the specified records to the repository asynchronously.

Syntax

HRESULT PutRecords(

    [in] SAFEARRAY(struct record) records

);

Parameter
Name Type Meaning

records

SAFEARRAY(struct record)

Records to put in the repository.

PutRecords2

Writes the specified records to the repository asynchronously. This method is similar to PutRecords, except the type of the input parameter. Using the IBulkRecord interface for input makes it possible to write event records converted by IEventToRecordFormatter. For details, see Event Record Data Structures.

Syntax

HRESULT PutRecords2(

    [in] IBulkRecord* pBulkRecord

);

Parameter
Name Type Meaning

records

IBulkRecord* pBulkRecord

Records (normally, converted from events) to put in the repository.

Commit

Performs all deferred record writes synchronously.

Caution: This operation is resource-intensive and should not be used needlessly. For example, committing after each record is strongly discouraged. InTrust commits records automatically every 60 seconds.

Forcing a commit is acceptable in situations like the following:

  • You need to confirm that a batch of events or records has safely arrived in the repository.
  • You are writing events or records out of order. See the corresponding note in Writing Events.
Syntax

HRESULT Commit();

Return Values

Name

Value

Meaning

ITRT_E_COMMIT_TO_INTERMEDIATE_STORE_FAILED

0x8ADD1002

Cannot commit records to intermediate store on InTrust server.

ITRT_E_COMMIT_TO_REPOSITORY_FAILED

0x8ADD1003

Cannot commit records to repository.

ITRT_E_COMMIT_IN_PROGRESS

0x8ADD1004

Commit is still in progress.

IRepositoryRecordInserter2

Provides write access to the repository that it is associated with and manages one or more IRepositoryRecordInserterLight interfaces, which do the actual writing. For each IRepositoryRecordInserterLight, it also stores predefined field values that are the same in all records written by that IRepositoryRecordInserterLight.

Incoming records are pushed to the repository at regular intervals. However, you can force an immediate write by calling the Commit method.

Methods

BindFields

Sets the values of the path-specifying fields for records that will be written to the same repository file.

Syntax

HRESULT BindFields(

    [in] tags path,

    [out, retval] IRepositoryRecordInserterLight**

);

Parameters
Name Type Meaning

path

tags

The field record values that you specify here are supposed to be the same for all records generated by the IRepositoryRecordInserterLight that will be initialized.

 

IRepositoryRecordInserterLight**

Record-inserting interface with some record field values predefined.

PutRecords

Writes the specified records to the repository asynchronously.

Syntax

HRESULT PutRecords(

    [in] SAFEARRAY(struct record) records

);

Parameter
Name Type Meaning

records

SAFEARRAY(struct record)

Records to put in the repository.

PutRecords2

Writes the specified records to the repository asynchronously. This method is similar to PutRecords, except the type of the input parameter. Using the IBulkRecord interface for input makes it possible to write event records converted by IEventToRecordFormatter. For details, see Event Record Data Structures.

Syntax

HRESULT PutRecords2(

    [in] IBulkRecord* pBulkRecord

);

Parameter
Name Type Meaning

records

IBulkRecord* pBulkRecord

Records (normally, converted from events) to put in the repository.

Commit

Performs all deferred record writes synchronously.

Caution: This operation is resource-intensive and should not be used needlessly. For example, committing after each record is strongly discouraged. InTrust commits records automatically every 60 seconds.

Forcing a commit is acceptable in situations like the following:

  • You need to confirm that a batch of events or records has safely arrived in the repository.
  • You are writing events or records out of order. See the corresponding note in Writing Events.
Syntax

HRESULT Commit();

Return Values

Name

Value

Meaning

ITRT_E_COMMIT_TO_INTERMEDIATE_STORE_FAILED

0x8ADD1002

Cannot commit records to intermediate store on InTrust server.

ITRT_E_COMMIT_TO_REPOSITORY_FAILED

0x8ADD1003

Cannot commit records to repository.

ITRT_E_COMMIT_IN_PROGRESS

0x8ADD1004

Commit is still in progress.

Commit2

Performs deferred record writes. This method either submits records to a queue on the server or puts them directly in the repository, depending on the argument. Using RepositoryCommitType::ToRepositoryRepositoryCommitType as the argument is equivalent to calling the Commit method.

Caution: Direct writes to the repository are resource-intensive and should not be used needlessly. For example, committing after each record is strongly discouraged. InTrust commits records automatically every 60 seconds.

Forcing a commit is acceptable in situations like the following:

  • You need to confirm that a batch of events or records has safely arrived in the repository.
  • You are writing events or records out of order. See the corresponding note in Writing Events.
Syntax

HRESULT Commit2(
    [in, defaultvalue(ToRepositoryRepositoryCommitType)] RepositoryCommitType commitType
);

Parameter
Name Type Meaning

commitType

RepositoryCommitType

Whether to queue the committed records on the server or put them directly in the repository.

Return Values if RepositoryCommitType::ToRepositoryRepositoryCommitType is Used

Name

Value

Meaning

ITRT_E_COMMIT_TO_INTERMEDIATE_STORE_FAILED

0x8ADD1002

Cannot commit records to intermediate store on InTrust server.

ITRT_E_COMMIT_TO_REPOSITORY_FAILED

0x8ADD1003

Cannot commit records to repository.

ITRT_E_COMMIT_IN_PROGRESS

0x8ADD1004

Commit is still in progress.

IRepositoryRecordInserterLight

Generates valid record structures from predefined and significant values and writes them to the repository.

Note:IRepositoryRecordInserterLight or IRepositoryRecordInserter: when to use which?

Use IRepositoryRecordInserterLight if you need to write large numbers of records with coinciding values in specific fields. Otherwise, using IRepositoryRecordInserter should be more efficient.

Method

PutRecords

Syntax

HRESULT PutRecords(

    [in] SAFEARRAY(struct contents) recordFields

);

Parameter
Name Type Meaning

recordFields

SAFEARRAY(struct contents)

Field value structures to convert to records. Missing fields will be filled in based on the tags structure instance associated with this IRepositoryRecordInserterLight.

IScript

Represents a script used in InTrust operations.

Methods

Description (getter)

Returns the description of the script.

Syntax

HRESULT Description(
    [out, retval] BSTR* description
);

Parameter
Name Type Meaning

description

BSTR*

Description of the script.

Description (setter)

Sets the description of the script.

Syntax

HRESULT Description(
    [in] BSTR description
);

Parameter
Name Type Meaning

description

BSTR

Description of the script.

ID

Returns the ID of the script.

Syntax

HRESULT ID(
    [out, retval] BSTR* pID
);

Parameter
Name Type Meaning

pID

BSTR*

ID of the script.

Language (getter)

Returns which language the script is in.

Syntax

HRESULT Language(
    [out, retval] enum ScriptLanguage* language
);

Parameter
Name Type Meaning

language

enum ScriptLanguage*

Which language the script is in.

Language (setter)

Sets which language the script is in.

Syntax

HRESULT Language(
    [in] enum ScriptLanguage language
);

Parameter
Name Type Meaning

language

enum ScriptLanguage

Which language the script is in.

Name (getter)

Returns the name of the script.

Syntax

HRESULT Name(
    [out, retval] BSTR *name
);

Parameter
Name Type Meaning

name

BSTR*

Name of the script.

Name (setter)

Sets the name of the script.

Syntax

HRESULT Name(
    [in] BSTR name
);

Parameter
Name Type Meaning

name

BSTR

Name of the script.

Parameters

Provides access to a collection of the script's parameters.

Syntax

HRESULT Parameters(
    [out, retval] IScriptParameterCollection** ppParameters
);

Parameter
Name Type Meaning

ppParameters

IScriptParameterCollection**

Collection of the script's parameters.

Script (getter)

Returns the script source code.

Syntax

HRESULT Script(
    [out, retval] BSTR* script
);

Parameter
Name Type Meaning

script

BSTR*

Script source code.

Script (setter)

Overwrites the script source code.

Syntax

HRESULT Script(
    [in] BSTR script
);

Parameters
Name Type Meaning

script

BSTR

Script source code.

 

Documents connexes

The document was helpful.

Sélectionner une évaluation

I easily found the information I needed.

Sélectionner une évaluation