Class

polynote.server

SubscriberUpdateBuffer

Related Doc: package server

Permalink

final class SubscriberUpdateBuffer extends VersionBuffer[(SubscriberId, NotebookUpdate)]

Linear Supertypes
VersionBuffer[(SubscriberId, NotebookUpdate)], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SubscriberUpdateBuffer
  2. VersionBuffer
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SubscriberUpdateBuffer()

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def add(version: Int, value: (SubscriberId, NotebookUpdate)): Unit

    Permalink
    Definition Classes
    VersionBuffer
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def discardUntil(version: Int): Unit

    Permalink
    Definition Classes
    VersionBuffer
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def getRange(startVersion: Int, endVersion: Int): List[(SubscriberId, NotebookUpdate)]

    Permalink
    Definition Classes
    VersionBuffer
  13. def getRangeV(startVersion: Int, endVersion: Int): List[(Int, (SubscriberId, NotebookUpdate))]

    Permalink
    Definition Classes
    VersionBuffer
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. def newestVersion: Option[Int]

    Permalink
    Definition Classes
    VersionBuffer
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def numVersions: Int

    Permalink
    Attributes
    protected
    Definition Classes
    VersionBuffer
  21. def oldestVersion: Option[Int]

    Permalink
    Definition Classes
    VersionBuffer
  22. def rebaseThrough(update: NotebookUpdate, subscriberId: SubscriberId, targetVersion: GlobalVersion, log: Option[StringBuilder] = None, updateBuffer: Boolean = true): NotebookUpdate

    Permalink

    Rebase the given update from its globalVersion through the target globalVersion.

    Rebase the given update from its globalVersion through the target globalVersion.

    At each buffered global version, the given update will be rebased onto that global version, and the global version will also be rebased on to the given update. Then, the stored global version will be replaced with the "leftovers" of that rebase. This is because any future update received from the this client is already on top of the given update, even if its globalVersion hasn't been updated. Note that this logic only affects edits to cell content where the same cell was edited by both the client update and a subsequent global version (of which the client was unaware).

    This is the same logic as the client's EditBuffer (see edit_buffer.ts in polynote-frontend), except that the rebasing logic for equal updates are opposite: on the server side, equal updates cancel each other out, while on the client side, equal updates are preserved. Equal updates can't be preserved on the server, because that would result in duplicate edits affecting the final state – but equal edits must be preserved on the client, because the client's edit has already affected the client's state. This has been experimentally verified to be the only behavior under which concurrent editing reliably operates (see KernelPublisherIntegrationTest in which simulates "keyboard-mashing" clients using the client-side logic replicated in the polynote-frontend's EditBuffer)

    The server-side logic also has additional filtering to ensure that it's not rebasing through the client's own edits, and it has some optional debug logging (TODO: remove the debug logging)

    returns

    the rebased edit

  23. final def setValueAt(index: Int, value: (SubscriberId, NotebookUpdate)): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    VersionBuffer
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. def updateRange(values: Seq[(Int, (SubscriberId, NotebookUpdate))]): Unit

    Permalink
    Definition Classes
    VersionBuffer
  27. final def versionIndex(version: Int): Int

    Permalink
    Attributes
    protected
    Definition Classes
    VersionBuffer
  28. final def versionedValueAt(index: Int): (Int, (SubscriberId, NotebookUpdate))

    Permalink
    Attributes
    protected
    Definition Classes
    VersionBuffer
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from VersionBuffer[(SubscriberId, NotebookUpdate)]

Inherited from AnyRef

Inherited from Any

Ungrouped