org.jtoolkit.essence.data
Interface Store<K,V>

All Superinterfaces:
java.io.Closeable, Event.Listenable, Named, Visitor.Visitable<Store<K,V>>

public interface Store<K,V>
extends Event.Listenable, Closeable, Named, Visitor.Visitable<Store<K,V>>

Author:
Peter Lawrey

Nested Class Summary
static class Store.CollectionType
          What types of Collections are allowed.
static class Store.PersistMode
          How is the data persisted.
static class Store.ReadMode
          How is the data read.
static interface Store.StoreListener<K,V>
          An implmentation can be notified of changes to the Store.
static class Store.StoreType
          How is the Store represented/persisted.
 
Nested classes/interfaces inherited from interface org.jtoolkit.essence.utils.Named
Named.ContextSource<T>, Named.MapSource<T>, Named.Source<T>
 
Field Summary
 
Fields inherited from interface org.jtoolkit.essence.utils.Closeable
CLOSED
 
Method Summary
 java.util.Map<K,V> asMap()
           
 javax.cache.Cache<K,V> getCacheView()
           
 Cluster getCluster()
           
 Event.ListenerSet getListenerSet()
          Set to add/remove event listeners and event handlers to/from
 java.util.concurrent.ConcurrentMap<K,V> getMapView()
           
 java.util.Queue<V> getQueueView()
           
 int removeMatching(Predicate<java.util.Map.Entry<K,V>> predicate)
           
 java.util.Map<K,V> selectMatching(Predicate<java.util.Map.Entry<K,V>> predicate)
           
 
Methods inherited from interface org.jtoolkit.essence.utils.Closeable
close, isClosed
 
Methods inherited from interface org.jtoolkit.essence.utils.Named
getName
 
Methods inherited from interface org.jtoolkit.essence.data.Visitor.Visitable
visit
 

Method Detail

getCluster

@Nullable
Cluster getCluster()
Returns:
The cluster this store is a member of.

getListenerSet

@NotNull
Event.ListenerSet getListenerSet()
Set to add/remove event listeners and event handlers to/from

Specified by:
getListenerSet in interface Event.Listenable
Returns:
This object has a set of listeners.

getCacheView

@NotNull
javax.cache.Cache<K,V> getCacheView()
Returns:
The contents of this Store as a Map.

getMapView

@NotNull
java.util.concurrent.ConcurrentMap<K,V> getMapView()
Returns:
The contents of this Store as a Map.

getQueueView

@NotNull
java.util.Queue<V> getQueueView()
Returns:
The contents of this Store as a Queue.

asMap

@NotNull
java.util.Map<K,V> asMap()
Returns:
A snap shot copy of the Store.

selectMatching

java.util.Map<K,V> selectMatching(Predicate<java.util.Map.Entry<K,V>> predicate)
Returns:
The matching results.

removeMatching

int removeMatching(Predicate<java.util.Map.Entry<K,V>> predicate)


Copyright © Peter Lawrey. All Rights Reserved.