# Managed Object - HistoryCollector(vim.HistoryCollector)

Extended by
  EventHistoryCollector, TaskHistoryCollector
Since
  2.0

## Managed Object Description

This managed object type enables clients to retrieve historical data and receive updates when the server appends new data to a collection. This is a base type for item-specific types related to event or task history. Historical data is inherently append-only, although a server administrator may periodically purge old data.

Typically, a client creates a history collector by using a filter on a potentially large set, such as all the events in a datacenter. The collector provides access to the items that match the filter, which could also be a relatively large set.

The items in a collector are always ordered by date and time of creation. Item properties normally include this time stamp.

The client may set the "viewable latest page" for the collector, which is the contiguous subset of the items that are of immediate interest. These items are available as the "latestPage" property, which the client may retrieve and monitor by using the PropertyCollector managed object.

Clients can change the page size of the "latestPage" by using SetCollectorPageSize.

The client may use the following features of the history collector.

- RewindCollector - Moves the "scrollable view" to the oldest item (the default setting).
- readNext - Retrieves all the items in the collector, from the oldest item to the newest item. Retrieves either ReadNextTasks or ReadNextEvents depending on the operation.
- readPrev - Retrieves all items (excluding the "viewable latest page") in the collector, from the newest item to the oldest item. Retrieves either ReadPreviousTasks or ReadPreviousEvents depending on the operation.
- ResetCollector - Moves the "scrollable view" to the item immediately preceding the "viewable latest page".

Properties

Name | Type | Description
--- | --- | ---
filter | xsd:anyType | The filter used to create this collector. The type of the returned filter is determined by the managed object for which the collector is created.

Methods

Methods defined in this Managed Object
DestroyCollector, ResetCollector, RewindCollector, SetCollectorPageSize

# DestroyCollector(remove)

Destroys this collector.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HistoryCollector used to make the method call.

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="DestroyCollector" type="sms:DestroyCollectorRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="DestroyCollectorResponse"> <complexType/> </element>

# ResetCollector(reset)

Moves the "scrollable view" to the item immediately preceding the "viewable latest page". If you use "readPrev", ReadPreviousTasks or ReadPreviousEvents, all items are retrieved from the newest item to the oldest item.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HistoryCollector used to make the method call.

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="ResetCollector" type="sms:ResetCollectorRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="ResetCollectorResponse"> <complexType/> </element>

# RewindCollector(rewind)

Moves the "scrollable view" to the oldest item. If you use ReadNextTasks or ReadNextEvents, all items are retrieved from the oldest item to the newest item. This is the default setting when the collector is created.

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HistoryCollector used to make the method call.

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="RewindCollector" type="sms:RewindCollectorRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="RewindCollectorResponse"> <complexType/> </element>

# SetCollectorPageSize(setLatestPageSize)

Sets the "viewable latest page" size to contain at most the number of items specified by the maxCount parameter).

Required Privileges
  None

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HistoryCollector used to make the method call.
maxCount P | xsd:int | The maximum number of items in the page. Since 2.0

P Required privilege: maxCount

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="SetCollectorPageSize" type="sms:SetCollectorPageSizeRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sms="urn:sms" name="SetCollectorPageSizeResponse"> <complexType/> </element>