|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.store.raw.xact.TransactionMapFactory
org.apache.derby.impl.store.raw.xact.ConcurrentTransactionMapFactory
class ConcurrentTransactionMapFactory
A helper class that enables use of ConcurrentHashMap
instead of
Hashtable
on platforms that support it. This class will be used if
we are running on a Java 1.5 or higher.
Constructor Summary | |
---|---|
ConcurrentTransactionMapFactory()
|
Method Summary | |
---|---|
(package private) java.util.Map |
newMap()
Create a new map instance. |
(package private) void |
visitEntries(java.util.Map map,
TransactionTable.EntryVisitor visitor)
Traverse the values of a map, and apply the specified visitor on each value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
ConcurrentTransactionMapFactory()
Method Detail |
---|
java.util.Map newMap()
TransactionMapFactory
Create a new map instance. The map implementation must be thread-safe so that its instances can be accessed concurrently by multiple threads. That is, the map implemenation must guarantee that every method is atomic and does not fail or make the map become inconsistent just because it is accessed concurrently by another thread.
Callers should never synchronize on the returned object in order to get consistency/atomicity guarantees across multiple accesses to the map. Instead, they should use the helper methods defined in this class, so that a mechanism appropriate for this particular map implementation is used to ensure thread-safety.
newMap
in class TransactionMapFactory
void visitEntries(java.util.Map map, TransactionTable.EntryVisitor visitor)
TransactionMapFactory
Traverse the values of a map, and apply the specified visitor on each
value. The traversal should be thread-safe in the sense that it should
not fail because other threads access and potentially modify the map
while the traversal takes place, and it must also provide all the
thread-safety guarantees that are given by
TransactionTable.visitEntries(TransactionTable.EntryVisitor)
.
visitEntries
in class TransactionMapFactory
map
- the map that contains theTransactionTable.visitEntries(TransactionTable.EntryVisitor)
|
Built on Thu 2010-12-23 20:49:13+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |