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
.Modifier and Type | Field and Description |
---|---|
private FaceQueueListener |
askfaceFaceQueueListener
The
FaceQueueListener attached to faceQueue . |
private FaceQueue |
faceQueue
The
FaceQueue instance used to query faces from the Crossfire
server. |
private FileCacheFaceQueue |
fileCacheFaceQueue
The
FileCacheFaceQueue instance used to load faces from the file
cache. |
private FaceQueueListener |
fileCacheFaceQueueListener
The
FaceQueueListener attached to fileCacheFaceQueue . |
Constructor and Description |
---|
FacesQueue(FaceQueue faceQueue,
ImageCache imageCacheOriginal,
ImageCache imageCacheScaled,
ImageCache imageCacheMagicMap)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
loadFace(Face face)
Request a face.
|
void |
reset()
Reset the processing: forget about pending faces.
|
addFaceQueueListener, fireFaceFailed, fireFaceLoaded, removeFaceQueueListener
@NotNull private final FaceQueueListener askfaceFaceQueueListener
FaceQueueListener
attached to faceQueue
.@NotNull private final FaceQueue faceQueue
FaceQueue
instance used to query faces from the Crossfire
server.@NotNull private final FileCacheFaceQueue fileCacheFaceQueue
FileCacheFaceQueue
instance used to load faces from the file
cache.@NotNull private final FaceQueueListener fileCacheFaceQueueListener
FaceQueueListener
attached to fileCacheFaceQueue
.public FacesQueue(@NotNull FaceQueue faceQueue, @NotNull ImageCache imageCacheOriginal, @NotNull ImageCache imageCacheScaled, @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 loadFace(@NotNull Face face)
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 reset()