@Documented @Retention(value=RUNTIME) @Target(value={METHOD,FIELD,PARAMETER,LOCAL_VARIABLE,TYPE_USE}) public @interface ScopeConfined
@ScopeConfined signals that an object must not escape the annotated
scope. It is aimed at tooling and library maintainers dealing with
reused objects.
Retention and effect: Retained at runtime but only meaningful if Chronicle tooling enforces the confinement.
@ScopeConfined
void accept(Buffer b) { }
Object contents will be scrubbed after hand-off. When used with off-heap
resources such as Bytes, the Cleaner may reclaim memory once the
callback completes.
void onMessage(@ScopeConfined Bytes<?> b) { ringBuffer.write(b); }
public abstract String value
Copyright © 2026 Chronicle Software Ltd. All rights reserved.