public class CacheWriter extends Object
UnwrittenLayers to the cache.| Constructor and Description |
|---|
CacheWriter(Cache cache) |
| Modifier and Type | Method and Description |
|---|---|
CachedLayer |
getCachedLayer(DescriptorDigest layerDigest,
com.google.common.io.CountingOutputStream countingOutputStream) |
com.google.common.io.CountingOutputStream |
getLayerOutputStream(DescriptorDigest layerDigest) |
CachedLayer |
writeLayer(LayerBuilder layerBuilder)
Builds an
UnwrittenLayer from a LayerBuilder and compresses and writes the
UnwrittenLayer's uncompressed layer content BLOB to cache. |
public CacheWriter(Cache cache)
public CachedLayer writeLayer(LayerBuilder layerBuilder) throws IOException, LayerPropertyNotFoundException
UnwrittenLayer from a LayerBuilder and compresses and writes the
UnwrittenLayer's uncompressed layer content BLOB to cache.layerBuilder - the layer builderIOExceptionLayerPropertyNotFoundExceptionpublic com.google.common.io.CountingOutputStream getLayerOutputStream(DescriptorDigest layerDigest) throws IOException
CountingOutputStream to write to to cache a layer with the specified
compressed digestIOExceptionpublic CachedLayer getCachedLayer(DescriptorDigest layerDigest, com.google.common.io.CountingOutputStream countingOutputStream) throws IOException, LayerPropertyNotFoundException
CachedLayer from a layer digest and the CountingOutputStream the
layer BLOB was written toIOExceptionLayerPropertyNotFoundExceptionCopyright © 2018. All rights reserved.