Tabnine Logo
SimpleCache.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.ctc.wstx.util.SimpleCache
constructor

Best Java code snippets using com.ctc.wstx.util.SimpleCache.<init> (Showing top 10 results out of 315)

origin: org.codehaus.woodstox/woodstox-core-asl

public synchronized void addCachedDTD(DTDId id, DTDSubset extSubset)
{
  if (mDTDCache == null) {
    mDTDCache = new SimpleCache(mConfig.getDtdCacheSize());
  }
  mDTDCache.add(id, extSubset);
}
origin: stackoverflow.com

 class SimpleCacheFactory implements CacheFactory {
 private final String cacheName; //example cache parameter

 public SimpleCacheFactory( String cacheName ) {
  this.cacheName = cacheName;
 }

 public Cache newCache() {
  return new SimpleCache( cacheName );
 }
}
origin: stackoverflow.com

 public void preparePlayer(String videoUri) {
  MediaSource videoSource =
      new ExtractorMediaSource( Uri.parse( videoUri ), dataSourceFactory, extractorsFactory, handler, null );
  exoPlayer.prepare( videoSource );
  exoPlayer.setPlayWhenReady( true );
}

public DataSource.Factory buildDataSourceFactory() {
  return new DataSource.Factory() {
    @Override
    public DataSource createDataSource() {
      LeastRecentlyUsedCacheEvictor evictor = new LeastRecentlyUsedCacheEvictor( CACHE_SIZE_BYTES );
      File cacheDir = //Your cache dir
      SimpleCache simpleCache = new SimpleCache( cacheDir, evictor );
      DataSource dataSource = buildMyDataSourceFactory().createDataSource();
      int cacheFlags = CacheDataSource.FLAG_BLOCK_ON_CACHE | CacheDataSource.FLAG_CACHE_UNBOUNDED_REQUESTS;
      return new CacheDataSource( simpleCache, dataSource, cacheFlags, CACHE_SIZE_BYTES );
    }
  };
}

private DefaultDataSource.Factory buildMyDataSourceFactory() {
  return new DefaultDataSourceFactory( context, "jesty-android", new DefaultBandwidthMeter() );
}
origin: Nextdoor/bender

@Override
public synchronized void addCachedDTD(DTDId id, DTDSubset extSubset)
{
  if (mDTDCache == null) {
    mDTDCache = new SimpleCache<DTDId,DTDSubset>(mConfig.getDtdCacheSize());
  }
  mDTDCache.add(id, extSubset);
}
origin: woodstox/wstx-asl

public synchronized void addCachedDTD(DTDId id, DTDSubset extSubset)
{
  if (mDTDCache == null) {
    mDTDCache = new SimpleCache(mConfig.getDtdCacheSize());
  }
  mDTDCache.add(id, extSubset);
}
origin: com.fasterxml.woodstox/woodstox-core

@Override
public synchronized void addCachedDTD(DTDId id, DTDSubset extSubset)
{
  if (mDTDCache == null) {
    mDTDCache = new SimpleCache<DTDId,DTDSubset>(mConfig.getDtdCacheSize());
  }
  mDTDCache.add(id, extSubset);
}
origin: woodstox/wstx-lgpl

public synchronized void addCachedDTD(DTDId id, DTDSubset extSubset)
{
  if (mDTDCache == null) {
    mDTDCache = new SimpleCache(mConfig.getDtdCacheSize());
  }
  mDTDCache.add(id, extSubset);
}
origin: org.codehaus.woodstox/woodstox-core-lgpl

public synchronized void addCachedDTD(DTDId id, DTDSubset extSubset)
{
  if (mDTDCache == null) {
    mDTDCache = new SimpleCache(mConfig.getDtdCacheSize());
  }
  mDTDCache.add(id, extSubset);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.woodstox

public synchronized void addCachedDTD(DTDId id, DTDSubset extSubset)
{
  if (mDTDCache == null) {
    mDTDCache = new SimpleCache(mConfig.getDtdCacheSize());
  }
  mDTDCache.add(id, extSubset);
}
origin: FasterXML/woodstox

@Override
public synchronized void addCachedDTD(DTDId id, DTDSubset extSubset)
{
  if (mDTDCache == null) {
    mDTDCache = new SimpleCache<DTDId,DTDSubset>(mConfig.getDtdCacheSize());
  }
  mDTDCache.add(id, extSubset);
}
com.ctc.wstx.utilSimpleCache<init>

Popular methods of SimpleCache

  • add
  • find

Popular in Java

  • Finding current android device location
  • runOnUiThread (Activity)
  • requestLocationUpdates (LocationManager)
  • setContentView (Activity)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JTable (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now