Loading...
Searching...
No Matches
AccelByte::FAccelByteNotificationBuffer Class Reference

Public Member Functions

bool TryAddBuffer (const FAccelByteModelsUserNotification &InNotification)
 Try buffer incoming notification if needed. Internally it will determine if incoming notification need to be buffered due to missing notification.
bool AddMissingNotifications (const TArray< FAccelByteModelsUserNotification > &Notifications)
 Add missing notification (only can be called when buffering).
FDateTime GetLastNotificationReceivedTime () const
 Get the time when last valid notification received.
FLobbySequenceID GetLastNotificationSequenceID () const
 Get the sequence ID of the last valid notification.
FLobbySequenceNumber GetLastNotificationSequenceNumber () const
 Get the sequence number of the last valid notification.
void Clear ()
 Clear all buffered notifications.
TArray< FAccelByteModelsUserNotificationGetSortedBuffer ()
 Get all sorted buffer based on it's SentAt field.
bool IsBuffering () const
 Check if this buffer is in process of retrieving missing notification.

Member Function Documentation

◆ AddMissingNotifications()

bool AccelByte::FAccelByteNotificationBuffer::AddMissingNotifications ( const TArray< FAccelByteModelsUserNotification > & Notifications)

Add missing notification (only can be called when buffering).

Parameters
NotificationsThe missing notifications
Returns
true if missing notification added to buffer.

◆ GetLastNotificationReceivedTime()

FDateTime AccelByte::FAccelByteNotificationBuffer::GetLastNotificationReceivedTime ( ) const

Get the time when last valid notification received.

Returns
The FDateTime object representing the time last notification received.

◆ GetLastNotificationSequenceID()

FLobbySequenceID AccelByte::FAccelByteNotificationBuffer::GetLastNotificationSequenceID ( ) const

Get the sequence ID of the last valid notification.

Returns
integer representing last valid sequence ID.

◆ GetLastNotificationSequenceNumber()

FLobbySequenceNumber AccelByte::FAccelByteNotificationBuffer::GetLastNotificationSequenceNumber ( ) const

Get the sequence number of the last valid notification.

Returns
integer representing last valid sequence number.

◆ GetSortedBuffer()

TArray< FAccelByteModelsUserNotification > AccelByte::FAccelByteNotificationBuffer::GetSortedBuffer ( )

Get all sorted buffer based on it's SentAt field.

Returns
Array of sorted notifications buffer

◆ IsBuffering()

bool AccelByte::FAccelByteNotificationBuffer::IsBuffering ( ) const

Check if this buffer is in process of retrieving missing notification.

Returns
true if buffering.

◆ TryAddBuffer()

bool AccelByte::FAccelByteNotificationBuffer::TryAddBuffer ( const FAccelByteModelsUserNotification & InNotification)

Try buffer incoming notification if needed. Internally it will determine if incoming notification need to be buffered due to missing notification.

Parameters
InNotificationIncoming notification.
Returns
true if missing notification detected and the incoming notification buffered. false means no missing notification detected, incoming notification not buffered and internal lastSequenceId & lastSequenceNumber updated