public class FacesQueue extends AbstractFaceQueue
FaceQueue
for loading faces. It first delegates to a
FileCacheFaceQueue
to load the face from the disk cache. If this
fails, the face is requested through a AskfaceFaceQueue
.Constructor and Description |
---|
FacesQueue(@NotNull FaceQueue faceQueue,
@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.
|
addFaceQueueListener, fireFaceFailed, fireFaceLoaded, removeFaceQueueListener
public FacesQueue(@NotNull @NotNull FaceQueue faceQueue, @NotNull @NotNull ImageCache imageCacheOriginal, @NotNull @NotNull ImageCache imageCacheScaled, @NotNull @NotNull ImageCache imageCacheMagicMap)
faceQueue
- the face queue for sending askface commandsimageCacheOriginal
- 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 face