Interface ObjectWatchEvent

  • All Implemented Interfaces:

    
    public interface ObjectWatchEvent
    
                        

    What an Object Store watch delivers when the initial snapshot is worth telling apart from the changes that follow it

    A watch begins by replaying what the bucket already holds and only then follows live changes, with nothing in the element type to say where one ends and the other begins. The signal that separates them is a callback on the jnats watcher, not a value (io/nats/client/api/Watcher.java:30-34), so natsy carries it as an element of its own: warm a cache from every Entry, flip the readiness probe on InitialSyncComplete, and treat what arrives afterwards as an update.

    InitialSyncComplete arrives exactly once per watch, and every entry of the initial snapshot precedes it - both are sent from the one dispatcher thread that delivers them, in the order it delivers them (io/nats/client/impl/NatsObjectStoreWatchSubscription.java:67-69, io/nats/client/impl/NatsDispatcher.java:108). A connection built with jnatsOptions { useDispatcherWithExecutor() } hands delivery to a pool instead, and voids that ordering. An empty bucket, and an ObjectWatchOption.UPDATES_ONLY watch, complete their sync with no entry at all.

    This is the object-store twin of KvWatchEvent; the two watches carry the same shape because they are the same jnats mechanism (io/nats/client/impl/NatsWatchSubscription.java:36-76).

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail