Class OortList<E>

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
Type Parameters:
E - the element type
All Implemented Interfaces:
Iterable<OortObject.Info<List<E>>>, EventListener, ConfigurableServerChannel.Initializer, Oort.CometListener, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.LifeCycle

public class OortList<E> extends OortContainer<List<E>>

A specialized oort object whose entity is a List.

OortList specializes OortObject and allows optimized replication of elements across the cluster: instead of replicating the whole list, that may be contain a lot of elements, only elements that are added or removed are replicated.

Applications can use addAndShare(Result, Object[]) and removeAndShare(Result, Object[]) to broadcast changes related to elements, as well as OortObject.setAndShare(Object, Result) to change the whole list.

When one or more elements are changed, OortList.ElementListeners are notified. OortList.DeltaListener converts whole list updates triggered by OortObject.setAndShare(Object, Result) into events for OortList.ElementListeners, giving applications a single listener type to implement their business logic.