public class FileCacheFaceQueue extends AbstractFaceQueue
FaceQueue
loading faces from ImageCache
instances.Constructor and Description |
---|
FileCacheFaceQueue(@NotNull ImageCache imageCacheOriginal,
@NotNull ImageCache imageCacheScaled,
@NotNull ImageCache imageCacheMagicMap)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
loadFace(@NotNull Face face)
Request a face.
|
void |
reset()
Reset the processing: forget about pending faces.
|
void |
saveFace(@NotNull Face face,
@NotNull FaceImages faceImages)
Saves a face to the caches.
|
addFaceQueueListener, fireFaceFailed, fireFaceLoaded, removeFaceQueueListener
public FileCacheFaceQueue(@NotNull @NotNull ImageCache imageCacheOriginal, @NotNull @NotNull ImageCache imageCacheScaled, @NotNull @NotNull ImageCache imageCacheMagicMap)
imageCacheOriginal
- the image cache used for loading original image
filesimageCacheScaled
- the image cache used for loading scaled image
filesimageCacheMagicMap
- the image cache used for loading magic map
image filespublic void reset()
FaceQueue
public void loadFace(@NotNull @NotNull Face face)
FaceQueue
FaceQueueListener.faceLoaded(Face, FaceImages)
or
FaceQueueListener.faceFailed(Face)
for the face. Faces
re-requested while still processing may be notified only once.face
- the requested facepublic void saveFace(@NotNull @NotNull Face face, @NotNull @NotNull FaceImages faceImages)
face
- the face to writefaceImages
- the image information to write