|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.crypto.SHA256EntryCache
Cache the objects used in SHA256Generator's calculate method to reduce memory churn. The CacheEntry should be held onto as long as the data referenced in it is needed (which often is only one or two lines of code)
Nested Class Summary | |
static class |
SHA256EntryCache.CacheEntry
all the data alloc'ed in a calculateHash call |
Constructor Summary | |
SHA256EntryCache()
|
Method Summary | |
SHA256EntryCache.CacheEntry |
acquire(int payload)
Get the next available structure, either from the cache or a brand new one |
static void |
main(java.lang.String[] args)
|
void |
release(SHA256EntryCache.CacheEntry entry)
Put this structure back onto the available cache for reuse |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SHA256EntryCache()
Method Detail |
public final SHA256EntryCache.CacheEntry acquire(int payload)
public final void release(SHA256EntryCache.CacheEntry entry)
public static void main(java.lang.String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |