Package org.apache.blur.store.blockcache_v2

Examples of org.apache.blur.store.blockcache_v2.Size


      // Set the creative rotation type to even.
      lineItem.setCreativeRotationType(CreativeRotationType.EVEN);

      // Create the creative placeholder.
      CreativePlaceholder creativePlaceholder = new CreativePlaceholder();
      creativePlaceholder.setSize(new Size(300, 250, false));

      // Set the size of creatives that can be associated with this line item.
      lineItem.setCreativePlaceholders(new CreativePlaceholder[] {creativePlaceholder});

      // Set the length of the line item to run.
View Full Code Here


        adUnit.setDescription("Ad unit description.");
        adUnit.setTargetWindow(AdUnitTargetWindow.BLANK);

        // Create ad unit size.
        AdUnitSize adUnitSize = new AdUnitSize();
        adUnitSize.setSize(new Size(300, 250, false));
        adUnitSize.setEnvironmentType(EnvironmentType.BROWSER);

        // Set the size of possible creatives that can match this ad unit.
        adUnit.setAdUnitSizes(new AdUnitSize[] {adUnitSize});
View Full Code Here

      adUnit.setTargetPlatform(TargetPlatform.MOBILE);
      adUnit.setMobilePlatform(MobilePlatform.APPLICATION);

      // Create ad unit size.
      AdUnitSize adUnitSize = new AdUnitSize();
      adUnitSize.setSize(new Size(400, 300, false));
      adUnitSize.setEnvironmentType(EnvironmentType.BROWSER);

      // Set the size of possible creatives that can match this ad unit.
      adUnit.setAdUnitSizes(new AdUnitSize[] {adUnitSize});
View Full Code Here

      adUnit.setExplicitlyTargeted(true);
      adUnit.setTargetPlatform(TargetPlatform.WEB);

      // Create master ad unit size.
      AdUnitSize masterAdUnitSize = new AdUnitSize();
      masterAdUnitSize.setSize(new Size(400, 300, false));
      masterAdUnitSize.setEnvironmentType(EnvironmentType.VIDEO_PLAYER);

      // Create companion sizes.
      AdUnitSize companionAdUnitSize1 = new AdUnitSize();
      companionAdUnitSize1.setSize(new Size(300, 250, false));
      companionAdUnitSize1.setEnvironmentType(EnvironmentType.BROWSER);

      AdUnitSize companionAdUnitSize2 = new AdUnitSize();
      companionAdUnitSize2.setSize(new Size(728, 90, false));
      companionAdUnitSize2.setEnvironmentType(EnvironmentType.BROWSER);

      // Add companions to master ad unit size.
      masterAdUnitSize.setCompanions(new AdUnitSize[] {companionAdUnitSize1, companionAdUnitSize2});
View Full Code Here

      @Override
      public boolean shouldBeQuiet(CacheDirectory directory, String fileName) {
        return false;
      }
    };
    _cache = new BaseCache(totalNumberOfBytes, fileBufferSize, cacheBlockSize, readFilter, writeFilter, quiet,
        getStore());
    Directory dir = FSDirectory.open(new File(file, "cache"));

    BufferStore.initNewBuffer(1024, 1024 * 128);
    BufferStore.initNewBuffer(8192, 8192 * 128);
 
View Full Code Here

        }
        return false;
      }
    };

    _cache = new BaseCache(totalNumberOfBytes, fileBufferSize, cacheBlockSize, readFilter, writeFilter, quiet, store);
  }
View Full Code Here

        cacheBlockSizeMap.put(fieldType, cacheBlockSizeForFile);
        LOG.info("{0}={1} for file type [{2}]", key, cacheBlockSizeForFile, fieldType);
      }
    }

    final STORE store = STORE.valueOf(configuration.get(BLUR_SHARD_BLOCK_CACHE_V2_STORE, OFF_HEAP));
    LOG.info("{0}={1}", BLUR_SHARD_BLOCK_CACHE_V2_STORE, store);

    final Set<String> cachingFileExtensionsForRead = getSet(configuration.get(
        BLUR_SHARD_BLOCK_CACHE_V2_READ_CACHE_EXT, DEFAULT_VALUE));
    LOG.info("{0}={1}", BLUR_SHARD_BLOCK_CACHE_V2_READ_CACHE_EXT, cachingFileExtensionsForRead);
View Full Code Here

        getStore());
    Directory dir = FSDirectory.open(new File(file, "cache"));

    BufferStore.initNewBuffer(1024, 1024 * 128);
    BufferStore.initNewBuffer(8192, 8192 * 128);
    return new CacheDirectory("test", "test", wrapLastModified(dir), _cache, null);
  }
View Full Code Here

  }

  @Override
  public Directory newDirectory(String table, String shard, Directory directory, Set<String> tableBlockCacheFileTypes)
      throws IOException {
    return new CacheDirectory(table, shard, directory, _cache, tableBlockCacheFileTypes);
  }
View Full Code Here

  public CacheValue detachFromCache() {
    if (_baseCacheValue instanceof ByteArrayCacheValue) {
      // already detached
      return null;
    } else if (_baseCacheValue instanceof UnsafeCacheValue) {
      final CacheValue result = _baseCacheValue;
      if (get() == 0) {
        // No one is using this so don't copy
        // NULL out reference so just in case there can't be a seg fault.
        _baseCacheValue = null;
      } else {
View Full Code Here

TOP

Related Classes of org.apache.blur.store.blockcache_v2.Size

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.