|
|||||||||
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
class TransactionMapFactory
Helper class for TransactionTable
which allows it to plug in a
different java.util.Map
implementation for the map that contains
all the TransactionTableEntry
instances in the transaction table.
The default implementation of this class provides support for
java.util.Hashtable
.
Constructor Summary | |
---|---|
TransactionMapFactory()
|
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 |
---|
TransactionMapFactory()
Method Detail |
---|
java.util.Map newMap()
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.
void visitEntries(java.util.Map map, TransactionTable.EntryVisitor visitor)
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)
.
map
- the map that contains thevisitor
- TransactionTable.visitEntries(TransactionTable.EntryVisitor)
|
Built on Thu 2012-03-29 21:53:33+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |