主权项 |
1. A system comprising:
an immutable buffer that protects the data populated within the immutable buffer from changing during the lifetime of the immutable buffer, and also protects the immutable buffer from having its physical address changed during the lifetime of the immutable buffer; a first computing entity that maintains a cache of the immutable buffer and has a strong reference to the immutable buffer, wherein so long as any entity has a strong reference to the immutable buffer, the immutable buffer is guaranteed to continue to exist for at least the duration of the strong reference for each entity that has the strong reference; and a second computing entity that communicates with the first computing entity to obtain a strong reference to the immutable buffer and thereafter read data from the immutable buffer, wherein upon or after reading the data from the cache, the second computing entity demotes the strong reference to the immutable buffer to a weak reference to the immutable buffer, wherein a weak reference to the immutable buffer does not guarantee that the immutable buffer will continue to exist for the duration of the weak reference. |