Navigation
API > API/Plugins > API/Plugins/ConcertSyncCore > API/Plugins/ConcertSyncCore/Replication > API/Plugins/ConcertSyncCore/Replication/Processing
Inheritance Hierarchy
- FSharedFromThisBase
- TSharedFromThis
- FObjectReplicationCache
References
| Module | ConcertSyncCore |
| Header | /Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncCore/Source/ConcertSyncCore/Public/Replication/Processing/ObjectReplicationCache.h |
| Include | #include "Replication/Processing/ObjectReplicationCache.h" |
Syntax
class FObjectReplicationCache : public TSharedFromThis< FObjectReplicationCache >
Remarks
This is an intermediate place for received data to live before it is further processed.
IObjectCacheUsers register with the cache and decide which data is to be received. When replication data comes in IObjectCacheUsers::WantsToAcceptObject is used to determine whether the object wants the data. If the data should be received, IObjectCacheUsers::OnDataCached is called receiving a shared ptr to the data. When the data is finally consumed latently, e.g. sent to other endpoints, the cache user resets the shared ptr. If new data comes in before a cache user consumes it, the new data and old data are combined (using IObjectReplicationFormat::CombineReplicationEvents).
This allows multiple systems to reuse replication data. For example, on the server the same data may need to be distributed to different clients but the clients send the data at different times.
Constructors
| Type | Name | Description | |
|---|---|---|---|
FObjectReplicationCache
(
IObjectReplicationFormat& ReplicationFormat |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | RegisterDataCacheUser
(
TSharedRef< IReplicationCacheUser > User |
Registers a new user, which will start receiving data for any new data received from now on. | |
| FCacheStoreStats | StoreUntilConsumed
(
const FGuid& SendingEndpointId, |
Called when new data is received for an object and shares it with any IObjectCacheUser that is possibly interested in it. | |
| void | UnregisterDataCacheUser
(
const TSharedRef< IReplicationCacheUser >& User |