public class CachedLayer extends java.lang.Object implements Layer
Layer that has been written out to a cache and has its file-backed content BLOB,
digest, size, and diff ID.| Constructor and Description |
|---|
CachedLayer(java.nio.file.Path contentFile,
BlobDescriptor blobDescriptor,
DescriptorDigest diffId)
Initializes the layer with its file-backed content BLOB, content descriptor (digest and size),
and diff ID.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
Blob |
getBlob() |
BlobDescriptor |
getBlobDescriptor() |
java.nio.file.Path |
getContentFile() |
DescriptorDigest |
getDiffId() |
int |
hashCode() |
public CachedLayer(java.nio.file.Path contentFile,
BlobDescriptor blobDescriptor,
DescriptorDigest diffId)
blobDescriptor and diffId must match the BLOB stored in
the file - no checks are made at runtime.contentFile - the file with the layer's content BLOBblobDescriptor - the content descriptor for the layer's content BLOBdiffId - the diff ID for the layerLayerpublic java.nio.file.Path getContentFile()
public Blob getBlob()
public BlobDescriptor getBlobDescriptor()
getBlobDescriptor in interface LayerBlobDescriptorpublic DescriptorDigest getDiffId()
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object