Class TransactionCache.TransactionIndices<V extends BasicTransaction>
- java.lang.Object
-
- org.oa4mp.delegation.common.transactions.storage.TransactionCache.TransactionIndices<V>
-
- Enclosing class:
- TransactionCache<V extends BasicTransaction>
public static class TransactionCache.TransactionIndices<V extends BasicTransaction> extends Object
The indices for a transaction store. This allows managing retrieval by identifier, tempCred, access token or verifier.
This does not implement map since this is to be an aggregate of indices, even though this behaves like a map in many ways. Forcing it to be one is not a clean separation of concerns. For instance, the transaction has its identifier embedded in it, so the key/value pair operations are redundant.Created by Jeff Gaynor
on Nov 22, 2010 at 11:51:33 AM
-
-
Constructor Summary
Constructors Constructor Description TransactionIndices()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(V t)
void
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
Set<Map.Entry<edu.uiuc.ncsa.security.core.Identifier,V>>
entrySet()
V
get(AccessToken accessToken)
V
get(AuthorizationGrant authorizationGrant)
V
get(Verifier verifier)
V
get(edu.uiuc.ncsa.security.core.Identifier identifier)
protected HashMap<String,edu.uiuc.ncsa.security.core.Identifier>
getAccessTokenIndex()
protected HashMap<String,edu.uiuc.ncsa.security.core.Identifier>
getAuthorizationGrantIndex()
HashMap<edu.uiuc.ncsa.security.core.Identifier,V>
getCreatedTransactions()
A list of transactions that have been created but not saved.protected Map<edu.uiuc.ncsa.security.core.Identifier,V>
getTransactions()
protected HashMap<String,edu.uiuc.ncsa.security.core.Identifier>
getVerifierIndex()
boolean
isEmpty()
Set<edu.uiuc.ncsa.security.core.Identifier>
keySet()
V
put(edu.uiuc.ncsa.security.core.Identifier key, V value)
void
putAll(Map<? extends String,? extends BasicTransaction> m)
V
remove(Object key)
void
remove(V t)
protected void
removeFromIndices(BasicTransaction t)
int
size()
protected void
updateIndices(BasicTransaction t)
Collection<V>
values()
-
-
-
Method Detail
-
getCreatedTransactions
public HashMap<edu.uiuc.ncsa.security.core.Identifier,V> getCreatedTransactions()
A list of transactions that have been created but not saved. Multiple create requests must return the same instance of a transaction.- Returns:
-
add
public void add(V t)
-
remove
public void remove(V t)
-
get
public V get(edu.uiuc.ncsa.security.core.Identifier identifier)
-
get
public V get(AuthorizationGrant authorizationGrant)
-
get
public V get(AccessToken accessToken)
-
clear
public void clear()
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
containsKey
public boolean containsKey(Object key)
-
containsValue
public boolean containsValue(Object value)
-
putAll
public void putAll(Map<? extends String,? extends BasicTransaction> m)
-
keySet
public Set<edu.uiuc.ncsa.security.core.Identifier> keySet()
-
values
public Collection<V> values()
-
getAuthorizationGrantIndex
protected HashMap<String,edu.uiuc.ncsa.security.core.Identifier> getAuthorizationGrantIndex()
-
getVerifierIndex
protected HashMap<String,edu.uiuc.ncsa.security.core.Identifier> getVerifierIndex()
-
getAccessTokenIndex
protected HashMap<String,edu.uiuc.ncsa.security.core.Identifier> getAccessTokenIndex()
-
updateIndices
protected void updateIndices(BasicTransaction t)
-
removeFromIndices
protected void removeFromIndices(BasicTransaction t)
-
-