Package org.microspace.table
Class Isolator<T>
- java.lang.Object
-
- org.microspace.table.SimpleUnsafeTable<T>
-
- org.microspace.table.Isolator<T>
-
- All Implemented Interfaces:
Table<T>
public class Isolator<T> extends SimpleUnsafeTable<T>
A front map that can be used as a transaction map.- Author:
- Gaspar Sinai - gaspar.sinai@microspace.org
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIsolator.State
-
Field Summary
Fields Modifier and Type Field Description protected IndexedMap<Object,BigInteger>backUpdateCountprotected IndexedSet<Object>updates-
Fields inherited from class org.microspace.table.SimpleUnsafeTable
currentTimeProvider, entries, indexedColumns, updateCounter
-
-
Constructor Summary
Constructors Constructor Description Isolator(Class<T> clazz, CurrentTimeProvider currentTimeProvider)Isolator(Accessor<T> accessor, CurrentTimeProvider currentTimeProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()BigIntegergetBackUpdateCount(Object o)Isolator.StategetState()IndexedSet<Object>getUpdatedKeys()IndexedSet<Object>keySet()protected voidremove(Entry<T> container)Removes are marke only.voidsetEntry(Entry<T> container)The updateCounter at the end of the operation will show our update count.voidsetFirstEntry(Entry<T> container)Set the first entry without update count modification.voidsetState(Isolator.State state)-
Methods inherited from class org.microspace.table.SimpleUnsafeTable
autoTimestamp, getAccessor, getCurrentTimeProvider, getObjectCopy, getObjectListCopy, move, read, readById, readMultiple, remove, size, take, takeByIdAndRemove, takeMultiple, takeMultipleAndRemove, write
-
-
-
-
Field Detail
-
backUpdateCount
protected final IndexedMap<Object,BigInteger> backUpdateCount
-
updates
protected final IndexedSet<Object> updates
-
-
Constructor Detail
-
Isolator
public Isolator(Class<T> clazz, CurrentTimeProvider currentTimeProvider)
-
Isolator
public Isolator(Accessor<T> accessor, CurrentTimeProvider currentTimeProvider)
-
-
Method Detail
-
keySet
public IndexedSet<Object> keySet()
- Overrides:
keySetin classSimpleUnsafeTable<T>
-
setFirstEntry
public void setFirstEntry(Entry<T> container)
Description copied from class:SimpleUnsafeTableSet the first entry without update count modification.- Overrides:
setFirstEntryin classSimpleUnsafeTable<T>- Parameters:
container- will be moved or removed
-
getBackUpdateCount
public BigInteger getBackUpdateCount(Object o)
-
getUpdatedKeys
public IndexedSet<Object> getUpdatedKeys()
-
getState
public Isolator.State getState()
-
setState
public void setState(Isolator.State state)
-
remove
protected void remove(Entry<T> container)
Removes are marke only.- Overrides:
removein classSimpleUnsafeTable<T>- Parameters:
container- is the container.
-
setEntry
public void setEntry(Entry<T> container)
Description copied from class:SimpleUnsafeTableThe updateCounter at the end of the operation will show our update count. Container will be owned by this object.- Overrides:
setEntryin classSimpleUnsafeTable<T>- Parameters:
container- will be moved or removed
-
clear
public void clear()
- Overrides:
clearin classSimpleUnsafeTable<T>
-
-