Core stores the current version of the object held by Observer. It also keeps all dependencies and dependents of the Observer.
Declared in <folly/observer/detail/Core.h>
class Core
: public std::enable_shared_from_this<Core>
| Name | Description |
|---|---|
std::enable_shared_from_this<Core> |
| Name | Description |
|---|---|
CreatorContext | Describes the creator functor and its result type. |
VersionedData | View of the observed object as well as its version and created time |
| Name | Description |
|---|---|
Ptr | Shared pointer to a Core. |
WeakPtr | Weak pointer to a Core. |
| Name | Description |
|---|---|
~Core [destructor] | Destroys the Core. |
getCreatorContext | Returns the context describing the creator functor. |
getData | Gets current view of the observed object. This is safe to call from any thread. If this is called from other Observer functor then that Observer is marked as dependent on current Observer. |
getSnapshotOfDependencies | Returns a copy of the current set of dependencies. |
getVersion | Gets the version of the observed object. |
getVersionLastChange | Get the last version at which the observed object was actually changed. |
refresh | Check if the observed object needs to be re-computed. Returns the version of last change. |
setForceRefresh | Force the next call to refresh to unconditionally re-compute the observed object, even if dependencies didn't change. |
shared_from_this | |
weak_from_this |
| Name | Description |
|---|---|
create | Blocks until creator is successfully run by ObserverManager |
| Name |
|---|
operator= |