Class TransactionMemoryStore<V extends BasicTransaction>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<edu.uiuc.ncsa.security.core.Identifier,V>
-
- edu.uiuc.ncsa.security.storage.MemoryStore<V>
-
- org.oa4mp.delegation.common.storage.transactions.TransactionMemoryStore<V>
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Store<V>
,Serializable
,Cloneable
,Map<edu.uiuc.ncsa.security.core.Identifier,V>
,TransactionStore<V>
public class TransactionMemoryStore<V extends BasicTransaction> extends edu.uiuc.ncsa.security.storage.MemoryStore<V> implements TransactionStore<V>
In-memory transaction storage. This does nto persist between server restarts.Created by Jeff Gaynor
on 11/4/11 at 1:32 PM- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
TransactionMemoryStore.TokenIndex
Used internally to track transactions by an identifier (such as a verifier).-
Nested classes/interfaces inherited from class edu.uiuc.ncsa.security.storage.MemoryStore
edu.uiuc.ncsa.security.storage.MemoryStore.MSInitializer
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description TransactionMemoryStore(edu.uiuc.ncsa.security.core.IdentifiableProvider<V> vIdentifiableProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
protected void
clearIndices()
V
get(AccessToken accessToken)
V
get(AuthorizationGrant authorizationGrant)
V
get(Verifier verifier)
TransactionMemoryStore.TokenIndex
getAgIndex()
TransactionMemoryStore.TokenIndex
getAtIndex()
V
getByProxyID(edu.uiuc.ncsa.security.core.Identifier proxyID)
edu.uiuc.ncsa.security.storage.data.MapConverter
getMapConverter()
List<V>
getMostRecent(int n, List<String> attributes)
TransactionMemoryStore.TokenIndex
getProxyIDIndex()
TransactionMemoryStore.TokenIndex
getvIndex()
edu.uiuc.ncsa.security.core.XMLConverter<V>
getXMLConverter()
void
register(V value)
V
remove(Object key)
protected void
removeItem(V value)
Override this as needed to remove an item from all stores.void
save(V value)
List<V>
search(String key, String condition, boolean isRegEx, List<String> attr)
void
update(V value)
protected void
updateIndices(V v)
Override this as needed to update any and all indices.-
Methods inherited from class edu.uiuc.ncsa.security.storage.MemoryStore
create, getAll, getInitializer, realSave, remove, search, search, size
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, replace, replace, replaceAll, size, values
-
-
-
-
Constructor Detail
-
TransactionMemoryStore
public TransactionMemoryStore(edu.uiuc.ncsa.security.core.IdentifiableProvider<V> vIdentifiableProvider)
-
-
Method Detail
-
getMostRecent
public List<V> getMostRecent(int n, List<String> attributes)
- Specified by:
getMostRecent
in interfaceedu.uiuc.ncsa.security.core.Store<V extends BasicTransaction>
-
getAgIndex
public TransactionMemoryStore.TokenIndex getAgIndex()
-
getAtIndex
public TransactionMemoryStore.TokenIndex getAtIndex()
-
getProxyIDIndex
public TransactionMemoryStore.TokenIndex getProxyIDIndex()
-
getvIndex
public TransactionMemoryStore.TokenIndex getvIndex()
-
get
public V get(AuthorizationGrant authorizationGrant)
- Specified by:
get
in interfaceTransactionStore<V extends BasicTransaction>
-
get
public V get(AccessToken accessToken)
- Specified by:
get
in interfaceTransactionStore<V extends BasicTransaction>
-
getByProxyID
public V getByProxyID(edu.uiuc.ncsa.security.core.Identifier proxyID)
- Specified by:
getByProxyID
in interfaceTransactionStore<V extends BasicTransaction>
-
get
public V get(Verifier verifier)
- Specified by:
get
in interfaceTransactionStore<V extends BasicTransaction>
-
updateIndices
protected void updateIndices(V v)
Override this as needed to update any and all indices.- Parameters:
v
-
-
register
public void register(V value)
- Specified by:
register
in interfaceedu.uiuc.ncsa.security.core.Store<V extends BasicTransaction>
- Overrides:
register
in classedu.uiuc.ncsa.security.storage.MemoryStore<V extends BasicTransaction>
-
save
public void save(V value)
- Specified by:
save
in interfaceedu.uiuc.ncsa.security.core.Store<V extends BasicTransaction>
- Overrides:
save
in classedu.uiuc.ncsa.security.storage.MemoryStore<V extends BasicTransaction>
-
update
public void update(V value)
- Specified by:
update
in interfaceedu.uiuc.ncsa.security.core.Store<V extends BasicTransaction>
- Overrides:
update
in classedu.uiuc.ncsa.security.storage.MemoryStore<V extends BasicTransaction>
-
clear
public void clear()
- Specified by:
clear
in interfaceMap<edu.uiuc.ncsa.security.core.Identifier,V extends BasicTransaction>
- Overrides:
clear
in classHashMap<edu.uiuc.ncsa.security.core.Identifier,V extends BasicTransaction>
-
clearIndices
protected void clearIndices()
-
removeItem
protected void removeItem(V value)
Override this as needed to remove an item from all stores.- Parameters:
value
-
-
remove
public V remove(Object key)
- Specified by:
remove
in interfaceMap<edu.uiuc.ncsa.security.core.Identifier,V extends BasicTransaction>
- Overrides:
remove
in classHashMap<edu.uiuc.ncsa.security.core.Identifier,V extends BasicTransaction>
-
getXMLConverter
public edu.uiuc.ncsa.security.core.XMLConverter<V> getXMLConverter()
- Specified by:
getXMLConverter
in interfaceedu.uiuc.ncsa.security.core.Store<V extends BasicTransaction>
-
getMapConverter
public edu.uiuc.ncsa.security.storage.data.MapConverter getMapConverter()
- Specified by:
getMapConverter
in interfaceTransactionStore<V extends BasicTransaction>
- Overrides:
getMapConverter
in classedu.uiuc.ncsa.security.storage.MemoryStore<V extends BasicTransaction>
-
search
public List<V> search(String key, String condition, boolean isRegEx, List<String> attr)
- Specified by:
search
in interfaceedu.uiuc.ncsa.security.core.Store<V extends BasicTransaction>
- Overrides:
search
in classedu.uiuc.ncsa.security.storage.MemoryStore<V extends BasicTransaction>
-
-