FAnalyticsPropertyStore

Implements a fast key/value database to store the metrics gathered to create the session summary event.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

IAnalyticsPropertyStore

FAnalyticsPropertyStore

References

Module

Analytics

Header

/Engine/Source/Runtime/Analytics/Analytics/Public/AnalyticsPropertyStore.h

Include

#include "AnalyticsPropertyStore.h"

Syntax

class FAnalyticsPropertyStore : public IAnalyticsPropertyStore

Remarks

Implements a fast key/value database to store the metrics gathered to create the session summary event. The store is buffered in memory until it is flushed to disk by calling Flush(). It is not designed to handle millions of key/value pairs, but rather a small subset that fits in memory. The implementation reserve disk space ahead of time and can usually perform in-place update. Setting or getting intrinsic types (int32, uint32, int64, uint64, float, double, bool as well as FDateTime) doesn't allocate memory. The string time is often updated in place if enough capacity was reserved. All store operations are thread safe and atomic from the caller perspective.

Constructors

Destructors

Name Description

Public function Virtual

~FAnalyticsPropertyStore()

Functions

Name Description

Public function

bool

 

Create

(
    const FString& Pathname,
    uint32 CapacityHint
)

Create a new store, creating the file of the specified capacity and resetting the current state.

Public function Const

bool

 

IsValid()

Returns true is the store was successfully created or loaded.

Public function

bool

 

Load

(
    const FString& Pathname
)

Load the specified file in memory, resetting the current state.

Overridden from IAnalyticsPropertyStore

Name Description

Public function Virtual Const

bool

 

Contains

(
    const FString& Key
)

Returns true if the store contains the specified key.

Public function Virtual

bool

 

Flush

(
    bool bAsync,
    const FTimespan& Timeout
)

Flushes cached values to disk.

Public function Virtual Const

EStatusCode

 

Get

(
    const FString& Key,
    FDateTime& OutValue
)

Public function Virtual Const

EStatusCode

 

Get

(
    const FString& Key,
    FString& OutValue
)

Public function Virtual Const

EStatusCode

 

Get

(
    const FString& Key,
    bool& OutValue
)

Public function Virtual Const

EStatusCode

 

Get

(
    const FString& Key,
    double& OutValue
)

Public function Virtual Const

EStatusCode

 

Get

(
    const FString& Key,
    float& OutValue
)

Public function Virtual Const

EStatusCode

 

Get

(
    const FString& Key,
    uint64& OutValue
)

Public function Virtual Const

EStatusCode

 

Get

(
    const FString& Key,
    uint32& OutValue
)

Public function Virtual Const

EStatusCode

 

Get

(
    const FString& Key,
    int64& OutValue
)

Public function Virtual Const

EStatusCode

 

Get

(
    const FString& Key,
    int32& OutValue
)

Reads the specified key value from the store.

Public function Virtual Const

uint32

 

Num()

Returns the number of elements in the store.

Public function Virtual

bool

 

Remove

(
    const FString& Key
)

Removes the specified key from the store.

Public function Virtual

void

 

RemoveAll()

Removes all existing keys from the store.

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    int64 Value,
    const TFunction< bool&...
)

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    uint64 Value,
    const TFunction< bool ...
)

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    float Value,
    const TFunction< bool(const float&...
)

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    uint32 Value,
    const TFunction< bool ...
)

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    bool Value,
    const TFunction< bool&#...
)

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    const FString& Value,
    const TFunction< bool...
)

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    const FDateTime& Value,
    const TFunction< bool...
)

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    double Value,
    const TFunction< bool(const double ...
)

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    int32 Value,
    const TFunction< bool&...
)

Conditionnnaly adds or updates the specified key/value pair.

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    uint32 Value
)

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    const FDateTime& Value
)

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    bool Value
)

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    double Value
)

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    float Value
)

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    uint64 Value
)

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    int64 Value
)

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    int32 Value
)

Adds or updates the specified key/value pair.

Public function Virtual

EStatusCode

 

Set

(
    const FString& Key,
    const FString& Value,
    uint32 CharCountCapacityHint
)

Public function Virtual

EStatusCode

 

Update

(
    const FString& Key,
    const TFunction< bool&)>& Up...
)

Public function Virtual

EStatusCode

 

Update

(
    const FString& Key,
    const TFunction< bool>& ...
)

Public function Virtual

EStatusCode

 

Update

(
    const FString& Key,
    const TFunction< bool>& U...
)

Public function Virtual

EStatusCode

 

Update

(
    const FString& Key,
    const TFunction< bool&)>& ...
)

Public function Virtual

EStatusCode

 

Update

(
    const FString& Key,
    const TFunction< bool&)>...
)

Public function Virtual

EStatusCode

 

Update

(
    const FString& Key,
    const TFunction< bool&)>& ...
)

Public function Virtual

EStatusCode

 

Update

(
    const FString& Key,
    const TFunction< bool&)>& U...
)

Updates an exiting value.

Public function Virtual

EStatusCode

 

Update

(
    const FString& Key,
    const TFunction< bool&)>&...
)

Public function Virtual

EStatusCode

 

Update

(
    const FString& Key,
    const TFunction< bool&)>& U...
)

Public function Virtual Const

void

 

VisitAll

(
    const TFunction< void...
)

Iterates the keys currently stored and invokes the visitor function for each key, converting the value to its string representation.

Operators

Name Description

Public function

FAnalyticsPr...

 

operator=

Public function

FAnalyticsPr...

 

operator=

(
    const FAnalyticsPropertyStore&
)

Enums

Name

Description

Private enum

ETypeCode