Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
be sure to pluck the blob cache out of the infinispanbinarystore to r…
…un binary checks against.
  • Loading branch information
cbeer committed Jun 13, 2013
1 parent b916f69 commit c62ed3c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fcrepo-http-api/src/test/resources/test_repository.json
Expand Up @@ -11,7 +11,7 @@
"cacheConfiguration" : "config/infinispan/basic/infinispan.xml",
"binaryStorage" : {
"type" : "cache",
"dataCacheName" : "FedoraRepository",
"dataCacheName" : "FedoraRepositoryBinaryData",
"metadataCacheName" : "FedoraRepository"
}
},
Expand Down
Expand Up @@ -119,7 +119,9 @@ public static Long getContentSize(final Node ds)
* @return
*/
public static DistributedExecutorService getClusterExecutor(InfinispanBinaryStore cacheStore) {
return new DefaultExecutorService(cacheStore.getCaches().get(0));
// Watch out! This is trying to pluck out the blob cache store. This works as long as
// modeshape continues to be ordered..
return new DefaultExecutorService(cacheStore.getCaches().get(1));
}

/**
Expand Down
Expand Up @@ -164,12 +164,13 @@ private void fillBuffer() throws IOException {

protected byte[] nextChunk() throws IOException {
final String chunkKey = key + "-" + chunkNumber++;
logger.debug("Read chunk {0}", chunkKey);
logger.debug("Read chunk {0} from cache {1}", chunkKey, blobCache);

try {
final CacheEntry cacheEntry = blobCache.load(chunkKey);

if (cacheEntry == null) {
logger.trace("Unable to read chunk {0}", chunkKey);
return null;
}

Expand Down

0 comments on commit c62ed3c

Please sign in to comment.