APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.media.jfxmedia.locator

public Class LocatorCache

extends Object
Class Inheritance
Imports
com.sun.media.jfxmedia.logging.Logger, com.sun.media.jfxmediaimpl.MediaDisposer, java.lang.ref.WeakReference, java.net.URI, java.nio.ByteBuffer, java.util.HashMap, .Map

Local in-memory cache for frequently loaded media, e.g., AudioClips

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private static class
public static class

Field Summary

Modifier and TypeField and Description
private final LocatorCache.CacheDisposer
private final Map<URI, WeakReference<LocatorCache.CacheReference>>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public LocatorCache.CacheReference
fetchURICache(URI sourceURI)

public boolean
isCached(URI sourceURI)

public static LocatorCache
public LocatorCache.CacheReference
registerURICache(URI sourceURI, ByteBuffer data, String mimeType)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheDisposerback to summary
private final LocatorCache.CacheDisposer cacheDisposer
uriCacheback to summary
private final Map<URI, WeakReference<LocatorCache.CacheReference>> uriCache

Constructor Detail

LocatorCacheback to summary
private LocatorCache()

Method Detail

fetchURICacheback to summary
public LocatorCache.CacheReference fetchURICache(URI sourceURI)
isCachedback to summary
public boolean isCached(URI sourceURI)
locatorCacheback to summary
public static LocatorCache locatorCache()
registerURICacheback to summary
public LocatorCache.CacheReference registerURICache(URI sourceURI, ByteBuffer data, String mimeType)
com.sun.media.jfxmedia.locator back to summary

private Class LocatorCache.CacheDisposer

extends Object
implements ResourceDisposer
Class Inheritance
All Implemented Interfaces
com.sun.media.jfxmediaimpl.MediaDisposer.ResourceDisposer

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CacheDisposerback to summary
private CacheDisposer()

Method Detail

disposeResourceback to summary
public void disposeResource(Object resource)

Implements com.sun.media.jfxmediaimpl.MediaDisposer.ResourceDisposer.disposeResource.

Doc from com.sun.media.jfxmediaimpl.MediaDisposer.ResourceDisposer.disposeResource.

Dispose the provided resource.

Annotations
@Override
com.sun.media.jfxmedia.locator back to summary

private Class LocatorCache.CacheInitializer

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final LocatorCache

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

globalInstanceback to summary
private static final LocatorCache globalInstance

Constructor Detail

CacheInitializerback to summary
private CacheInitializer()
com.sun.media.jfxmedia.locator back to summary

public Class LocatorCache.CacheReference

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final ByteBuffer
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ByteBuffer
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferback to summary
private final ByteBuffer buffer
mimeTypeback to summary
private String mimeType

Constructor Detail

CacheReferenceback to summary
public CacheReference(ByteBuffer buf, String mimeType)

Method Detail

getBufferback to summary
public ByteBuffer getBuffer()
getMIMETypeback to summary
public String getMIMEType()