Implement Transactions, Locks, and Concurrency:
"Coherence provides several options for managing concurrent access to data.
- Explicit locking (The ConcurrentMap interface (part of the NamedCache interface) supports explicit locking operations. Many developers find this simple locking API to be the most natural approach.)
- Transactions (The TransactionMap API builds on top of the explicit locking operations to support ACID-style transactions. )
- Container Integration (For transaction management in a Java EE container, Coherence provides a JCA resource adaptor in order to allow transactions to be managed via JTA. Although Coherence does not support XA transactions at this time, it can participate in XA transactions as the last resource.)
- EntryProcessors (Coherence also supports a lock-free programming model through the EntryProcessor API. For many transaction types, this minimizes contention and latency and improves system throughput, without compromising the fault-tolerance of data operations.)
- Data Source Integration(Guidelines on maintaining caches with local (non XA) data resources.)"
Показаны сообщения с ярлыком lock. Показать все сообщения
Показаны сообщения с ярлыком lock. Показать все сообщения
вторник, 29 декабря 2009 г.
суббота, 26 сентября 2009 г.
лекция #2: BoundedBuffer
Реализации ограниченного буфера
1) с использованием synchronized/wait()/notifyAll()
2) с использованием Lock/Condition
3) тест
Обе реализации получены модификацией исходного кода класса java.util.concurrent.ArrayBlockingQueue.
1) с использованием synchronized/wait()/notifyAll()
2) с использованием Lock/Condition
3) тест
Обе реализации получены модификацией исходного кода класса java.util.concurrent.ArrayBlockingQueue.
Ярлыки:
BoundedBuffer,
Condition,
lock,
ReentrantLock,
synchronized
A Survey of Concurrency Constructs
В презентации от SUN "A Survey of Concurrency Constructs" рассматриваются различные подходы в утилизации многоядерности + перечисляются плюсы/минусы каждого подхода:
- Threads/Locks
- Actors
- Dataflow
- Tuple spaces
- Threads/Locks
- Actors
- Dataflow
- Tuple spaces
Подписаться на:
Сообщения (Atom)