org.eclipse.jgit.storage.dht.spi.cache
Interface CacheService


public interface CacheService

Connects to the network based memory cache server(s).


Nested Class Summary
static class CacheService.Change
          A change to the cache.
 
Method Summary
 void get(java.util.Collection<CacheKey> keys, AsyncCallback<java.util.Map<CacheKey,byte[]>> callback)
          Lookup one or more cache keys and return the results.
 void modify(java.util.Collection<CacheService.Change> changes, AsyncCallback<java.lang.Void> callback)
          Modify one or more cache keys.
 

Method Detail

get

void get(java.util.Collection<CacheKey> keys,
         AsyncCallback<java.util.Map<CacheKey,byte[]>> callback)
Lookup one or more cache keys and return the results.

Callers are responsible for breaking up very large collections of chunk keys into smaller units, based on the reader's batch size option.

Parameters:
keys - keys to locate.
callback - receives the results when ready. If this is an instance of StreamingCallback, implementors should try to deliver results early.

modify

void modify(java.util.Collection<CacheService.Change> changes,
            AsyncCallback<java.lang.Void> callback)
Modify one or more cache keys.

Parameters:
changes - changes to apply to the cache.
callback - receives notification when the changes have been applied.


Copyright © 2011. All Rights Reserved.