[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Container for events per time slot. The time is provided as long milliseconds by client classes.
Events are for a specified timestamp and the implementation creates and adds the event to a slot for that timestamp.
Events can be expired from the window via the expireEvents method when their timestamp is before
(or less then) an expiry timestamp passed in. Expiry removes the event from the window.
The window allows iteration through its contents.
It is assumed that the timestamp passed to the add method is ascending. The window is backed by a
List reflecting the timestamp order rather then any sorted map or linked hash map for performance reasons.
The following tables list the members exposed by the TimeWindow type.
Public Methods
Name | Description | |
---|---|---|
![]() | Add | Adds event to the time window for the specified timestamp. |
![]() | Equals | (Inherited from Object.) |
![]() | ExpireEvents | Return and remove events in time-slots earlier (less) then the timestamp passed in,
returning the list of events expired.
|
![]() | GetEnumerator | Returns event iterator. |
![]() | GetHashCode | Serves as a hash function for a particular type. GetHashCode() is suitable for use in hashing algorithms and data structures like a hash table. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
Protected Methods
Name | Description | |
---|---|---|
![]() | Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
Public Constructors
Name | Description | |
---|---|---|
![]() | TimeWindowNew |
Ctor.
|
Public Properties
Name | Description | |
---|---|---|
![]() | Count |
Gets the count.
|
![]() | IsEmpty | Returns true if the window is currently empty. |
![]() | OldestTimestamp | Returns the oldest timestamp in the collection if there is at least one entry,
else it returns null if the window is empty.
|
Explicit Interface Implementations
Name | Description | |
---|---|---|
![]() ![]() | IEnumerable.System.Collections.IEnumerable.GetEnumerator |
Returns an enumerator that iterates through a collection.
|