- java.lang.Object
-
- xyz.cofe.collection.BasicEventMap<K,V>
-
- Type Parameters:
K- Тип ключаV- Тип значения
- All Implemented Interfaces:
Map<K,V>,CollectionEventPublisher<EventMap<K,V>,V>,EventMap<K,V>,GetReadLock,GetWriteLock,ReadWriteLockSupport,LongScn<EventMap<K,V>,CollectionEvent<EventMap<K,V>,V>>,Scn<EventMap<K,V>,Long,CollectionEvent<EventMap<K,V>,V>>
public class BasicEventMap<K,V> extends Object implements EventMap<K,V>
Базовая реализация карты с поддержкой уведомлений
-
-
Field Summary
Fields Modifier and Type Field Description protected ReadWriteLockreadWriteLockБлокировка чтения/записиprotected Map<K,V>targetСсылка на оригинальный набор
-
Constructor Summary
Constructors Constructor Description BasicEventMap()Конструктор по умолчаниюBasicEventMap(Map<K,V> target)КонструкторBasicEventMap(Map<K,V> target, ReadWriteLock rwLock)Конструктор
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LockgetReadLock()Возвращает блокировку чтенияLockgetWriteLock()Возвращает блокировку записиListenersHelper<CollectionListener<EventMap<K,V>,V>,CollectionEvent<EventMap<K,V>,V>>listenerHelper()Возвращает подписчиковListenersHelper<ScnListener<EventMap<K,V>,Long,CollectionEvent<EventMap<K,V>,V>>,ScnEvent<EventMap<K,V>,Long,CollectionEvent<EventMap<K,V>,V>>>scnListenerHelper()Возвращает помощника издателя для поддержи событийMap<K,V>target()Возвращает целевую карту, над которой происходят преобразования-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface xyz.cofe.collection.CollectionEventPublisher
addCollectionEvent, addCollectionListener, addCollectionListener, getCollectionEventQueue, getCollectionListeners, hasCollectionListener, removeCollectionListener, withCollectionEventQueue, withCollectionEventQueue
-
Methods inherited from interface xyz.cofe.collection.EventMap
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, fireCollectionEvent, fireDeleted, fireInserted, fireUpdated, get, getOrDefault, isEmpty, keySet, merge, onChanged, onDeleted, onInserted, onUpdated, put, putAll, putIfAbsent, remove, remove, replace, replace, size, values
-
Methods inherited from interface java.util.Map
equals, forEach, hashCode, replaceAll
-
Methods inherited from interface xyz.cofe.ecolls.ReadWriteLockSupport
readLock, readLock, writeLock, writeLock
-
Methods inherited from interface xyz.cofe.scn.Scn
addScnChangedListener, addScnChangedListener, fireScnChanged, fireScnChanged, getScnChangedListeners, hasScnChangedListener, onScn, removeAllScnChangedListeners, removeScnChangedListener, scn, scn
-
-
-
-
Field Detail
-
readWriteLock
protected volatile ReadWriteLock readWriteLock
Блокировка чтения/записи
-
-
Constructor Detail
-
BasicEventMap
public BasicEventMap()
Конструктор по умолчанию
-
BasicEventMap
public BasicEventMap(Map<K,V> target)
Конструктор- Parameters:
target- целевая карта
-
BasicEventMap
public BasicEventMap(Map<K,V> target, ReadWriteLock rwLock)
Конструктор- Parameters:
target- целевая картаrwLock- Блокировка чтения/записи
-
-
Method Detail
-
scnListenerHelper
public ListenersHelper<ScnListener<EventMap<K,V>,Long,CollectionEvent<EventMap<K,V>,V>>,ScnEvent<EventMap<K,V>,Long,CollectionEvent<EventMap<K,V>,V>>> scnListenerHelper()
Возвращает помощника издателя для поддержи событий
-
target
public Map<K,V> target()
Description copied from interface:EventMapВозвращает целевую карту, над которой происходят преобразования
-
listenerHelper
public ListenersHelper<CollectionListener<EventMap<K,V>,V>,CollectionEvent<EventMap<K,V>,V>> listenerHelper()
Возвращает подписчиков- Specified by:
listenerHelperin interfaceCollectionEventPublisher<K,V>- Returns:
- подписчики
-
getReadLock
public Lock getReadLock()
Description copied from interface:ReadWriteLockSupportВозвращает блокировку чтения- Specified by:
getReadLockin interfaceGetReadLock- Specified by:
getReadLockin interfaceReadWriteLockSupport- Returns:
- блокировка чтения
-
getWriteLock
public Lock getWriteLock()
Description copied from interface:ReadWriteLockSupportВозвращает блокировку записи- Specified by:
getWriteLockin interfaceGetWriteLock- Specified by:
getWriteLockin interfaceReadWriteLockSupport- Returns:
- блокировка записи
-
-