net.sf.ehcache.config.Configuration.assertArgumentNotNull()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(11.7k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中net.sf.ehcache.config.Configuration.assertArgumentNotNull()方法的一些代码示例,展示了Configuration.assertArgumentNotNull()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.assertArgumentNotNull()方法的具体详情如下:
包路径:net.sf.ehcache.config.Configuration
类名称:Configuration
方法名:assertArgumentNotNull

Configuration.assertArgumentNotNull介绍

暂无

代码示例

代码示例来源:origin: net.sf.ehcache/ehcache

/**
 * Allows BeanHandler to set the monitoring flag
 */
public final void setMonitoring(String monitoring) {
  assertArgumentNotNull("Monitoring", monitoring);
  monitoring(Monitoring.valueOf(Monitoring.class, monitoring.toUpperCase()));
}

代码示例来源:origin: net.sf.ehcache/ehcache

/**
 * Sets maximum amount of bytes the CacheManager will use on the Disk Tier.
 * @param maxBytesOnDisk String representation of the size.
 * @see MemoryUnit#parseSizeInBytes(String)
 */
public void setMaxBytesLocalDisk(final String maxBytesOnDisk) {
  assertArgumentNotNull("MaxBytesLocalDisk", maxBytesOnDisk);
  
  final String origInput = maxBytesLocalDiskInput;
  try {
    maxBytesLocalDiskInput = maxBytesOnDisk;
    setMaxBytesLocalDisk(MemoryUnit.parseSizeInBytes(maxBytesOnDisk));
  } catch (RuntimeException rte) {
    maxBytesLocalDiskInput = origInput;
    throw rte;
  }
}

代码示例来源:origin: net.sf.ehcache/ehcache

/**
 * Allows BeanHandler to set the CacheManager name.
 * <p>
 * Cache manager names have constraints on the characters they can use:
 * <ul>
 *     <li>cache managers that are registered as MBeans must obey the {@link javax.management.ObjectName} rules for unquoted value.
 *         This means the following characters are illegal: ',', '=', ':', '"', '*' and '?'.</li>
 * </ul>
 * Note that a clustered cache manager is by default registered as MBean.
 */
public final void setName(String name) {
  assertArgumentNotNull("name", name);
  final String prop = "cacheManagerName";
  final boolean publishChange = checkDynChange(prop);
  String oldValue = this.cacheManagerName;
  this.cacheManagerName = name;
  if (publishChange) {
    firePropertyChange(prop, oldValue, name);
  }
}

代码示例来源:origin: net.sf.ehcache/ehcache

/**
 * Sets maximum amount of bytes the CacheManager will use on the Disk Tier.
 * @param maxBytesOnHeap String representation of the size.
 * @see MemoryUnit#parseSizeInBytes(String)
 */
public void setMaxBytesLocalHeap(final String maxBytesOnHeap) {
  assertArgumentNotNull("MaxBytesLocalHeap", maxBytesOnHeap);
  
  final String origInput = maxBytesLocalHeapInput;
  try {
    maxBytesLocalHeapInput = maxBytesOnHeap;
    if (isPercentage(maxBytesOnHeap)) {
      long maxMemory = Runtime.getRuntime().maxMemory();
      long mem = maxMemory / HUNDRED * parsePercentage(maxBytesOnHeap);
      setMaxBytesLocalHeap(mem);
    } else {
      setMaxBytesLocalHeap(MemoryUnit.parseSizeInBytes(maxBytesOnHeap));
    }
  } catch (RuntimeException rte) {
    maxBytesLocalHeapInput = origInput;
    throw rte;
  }
}

代码示例来源:origin: net.sf.ehcache/ehcache

/**
 * Sets maximum amount of bytes the CacheManager will use on the OffHeap Tier.
 * @param maxBytesOffHeap String representation of the size.
 * @see MemoryUnit#parseSizeInBytes(String)
 */
public void setMaxBytesLocalOffHeap(final String maxBytesOffHeap) {
  assertArgumentNotNull("MaxBytesLocalOffHeap", maxBytesOffHeap);
  
  final String origInput = maxBytesLocalOffHeapInput;
  try {
    maxBytesLocalOffHeapInput = maxBytesOffHeap;
    if (isPercentage(maxBytesOffHeap)) {
      long maxMemory = getOffHeapLimit();
      long mem = maxMemory / HUNDRED * parsePercentage(maxBytesOffHeap);
      setMaxBytesLocalOffHeap(mem);
    } else {
      setMaxBytesLocalOffHeap(MemoryUnit.parseSizeInBytes(maxBytesOffHeap));
    }
  } catch (RuntimeException rte) {
    maxBytesLocalOffHeapInput = origInput;
    throw rte;
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

/**
 * Allows BeanHandler to set the monitoring flag
 */
public final void setMonitoring(String monitoring) {
  assertArgumentNotNull("Monitoring", monitoring);
  monitoring(Monitoring.valueOf(Monitoring.class, monitoring.toUpperCase()));
}

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

/**
 * Allows BeanHandler to set the monitoring flag
 */
public final void setMonitoring(String monitoring) {
  assertArgumentNotNull("Monitoring", monitoring);
  monitoring(Monitoring.valueOf(Monitoring.class, monitoring.toUpperCase()));
}

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

/**
 * Allows BeanHandler to set the monitoring flag
 */
public final void setMonitoring(String monitoring) {
  assertArgumentNotNull("Monitoring", monitoring);
  monitoring(Monitoring.valueOf(Monitoring.class, monitoring.toUpperCase()));
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

/**
 * Sets maximum amount of bytes the CacheManager will use on the Disk Tier.
 * @param maxBytesOnDisk String representation of the size.
 * @see MemoryUnit#parseSizeInBytes(String)
 */
public void setMaxBytesLocalDisk(final String maxBytesOnDisk) {
  assertArgumentNotNull("MaxBytesLocalDisk", maxBytesOnDisk);
  setMaxBytesLocalDisk(MemoryUnit.parseSizeInBytes(maxBytesOnDisk));
  maxBytesLocalDiskInput = maxBytesOnDisk;
}

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

/**
 * Allows BeanHandler to set the CacheManager name.
 */
public final void setName(String name) {
  assertArgumentNotNull("name", name);
  final String prop = "cacheManagerName";
  final boolean publishChange = checkDynChange(prop);
  String oldValue = this.cacheManagerName;
  this.cacheManagerName = name;
  if (publishChange) {
    firePropertyChange(prop, oldValue, name);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

/**
 * Allows BeanHandler to set the CacheManager name.
 */
public final void setName(String name) {
  assertArgumentNotNull("name", name);
  final String prop = "cacheManagerName";
  final boolean publishChange = checkDynChange(prop);
  String oldValue = this.cacheManagerName;
  this.cacheManagerName = name;
  if (publishChange) {
    firePropertyChange(prop, oldValue, name);
  }
}

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

/**
 * Sets maximum amount of bytes the CacheManager will use on the Disk Tier.
 * @param maxBytesOnDisk String representation of the size.
 * @see MemoryUnit#parseSizeInBytes(String)
 */
public void setMaxBytesLocalDisk(final String maxBytesOnDisk) {
  assertArgumentNotNull("MaxBytesLocalDisk", maxBytesOnDisk);
  
  final String origInput = maxBytesLocalDiskInput;
  try {
    maxBytesLocalDiskInput = maxBytesOnDisk;
    setMaxBytesLocalDisk(MemoryUnit.parseSizeInBytes(maxBytesOnDisk));
  } catch (RuntimeException rte) {
    maxBytesLocalDiskInput = origInput;
    throw rte;
  }
}

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

/**
 * Sets maximum amount of bytes the CacheManager will use on the Disk Tier.
 * @param maxBytesOnDisk String representation of the size.
 * @see MemoryUnit#parseSizeInBytes(String)
 */
public void setMaxBytesLocalDisk(final String maxBytesOnDisk) {
  assertArgumentNotNull("MaxBytesLocalDisk", maxBytesOnDisk);
  
  final String origInput = maxBytesLocalDiskInput;
  try {
    maxBytesLocalDiskInput = maxBytesOnDisk;
    setMaxBytesLocalDisk(MemoryUnit.parseSizeInBytes(maxBytesOnDisk));
  } catch (RuntimeException rte) {
    maxBytesLocalDiskInput = origInput;
    throw rte;
  }
}

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

/**
 * Allows BeanHandler to set the CacheManager name.
 * <p>
 * Cache manager names have constraints on the characters they can use:
 * <ul>
 *     <li>cache managers that are registered as MBeans must obey the {@link javax.management.ObjectName} rules for unquoted value.
 *         This means the following characters are illegal: ',', '=', ':', '"', '*' and '?'.</li>
 * </ul>
 * Note that a clustered cache manager is by default registered as MBean.
 */
public final void setName(String name) {
  assertArgumentNotNull("name", name);
  final String prop = "cacheManagerName";
  final boolean publishChange = checkDynChange(prop);
  String oldValue = this.cacheManagerName;
  this.cacheManagerName = name;
  if (publishChange) {
    firePropertyChange(prop, oldValue, name);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

/**
 * Sets maximum amount of bytes the CacheManager will use on the Disk Tier.
 * @param maxBytesOnHeap String representation of the size.
 * @see MemoryUnit#parseSizeInBytes(String)
 */
public void setMaxBytesLocalHeap(final String maxBytesOnHeap) {
  assertArgumentNotNull("MaxBytesLocalHeap", maxBytesOnHeap);
  if (isPercentage(maxBytesOnHeap)) {
    long maxMemory = Runtime.getRuntime().maxMemory();
    long mem = maxMemory / HUNDRED * parsePercentage(maxBytesOnHeap);
    setMaxBytesLocalHeap(mem);
  } else {
    setMaxBytesLocalHeap(MemoryUnit.parseSizeInBytes(maxBytesOnHeap));
  }
  maxBytesLocalHeapInput = maxBytesOnHeap;
}

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

/**
 * Sets maximum amount of bytes the CacheManager will use on the Disk Tier.
 * @param maxBytesOnHeap String representation of the size.
 * @see MemoryUnit#parseSizeInBytes(String)
 */
public void setMaxBytesLocalHeap(final String maxBytesOnHeap) {
  assertArgumentNotNull("MaxBytesLocalHeap", maxBytesOnHeap);
  
  final String origInput = maxBytesLocalHeapInput;
  try {
    maxBytesLocalHeapInput = maxBytesOnHeap;
    if (isPercentage(maxBytesOnHeap)) {
      long maxMemory = Runtime.getRuntime().maxMemory();
      long mem = maxMemory / HUNDRED * parsePercentage(maxBytesOnHeap);
      setMaxBytesLocalHeap(mem);
    } else {
      setMaxBytesLocalHeap(MemoryUnit.parseSizeInBytes(maxBytesOnHeap));
    }
  } catch (RuntimeException rte) {
    maxBytesLocalHeapInput = origInput;
    throw rte;
  }
}

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

/**
 * Sets maximum amount of bytes the CacheManager will use on the Disk Tier.
 * @param maxBytesOnHeap String representation of the size.
 * @see MemoryUnit#parseSizeInBytes(String)
 */
public void setMaxBytesLocalHeap(final String maxBytesOnHeap) {
  assertArgumentNotNull("MaxBytesLocalHeap", maxBytesOnHeap);
  
  final String origInput = maxBytesLocalHeapInput;
  try {
    maxBytesLocalHeapInput = maxBytesOnHeap;
    if (isPercentage(maxBytesOnHeap)) {
      long maxMemory = Runtime.getRuntime().maxMemory();
      long mem = maxMemory / HUNDRED * parsePercentage(maxBytesOnHeap);
      setMaxBytesLocalHeap(mem);
    } else {
      setMaxBytesLocalHeap(MemoryUnit.parseSizeInBytes(maxBytesOnHeap));
    }
  } catch (RuntimeException rte) {
    maxBytesLocalHeapInput = origInput;
    throw rte;
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

/**
 * Sets maximum amount of bytes the CacheManager will use on the OffHeap Tier.
 * @param maxBytesOffHeap String representation of the size.
 * @see MemoryUnit#parseSizeInBytes(String)
 */
public void setMaxBytesLocalOffHeap(final String maxBytesOffHeap) {
  assertArgumentNotNull("MaxBytesLocalOffHeap", maxBytesOffHeap);
  if (isPercentage(maxBytesOffHeap)) {
    long maxMemory = getOffHeapLimit();
    long mem = maxMemory / HUNDRED * parsePercentage(maxBytesOffHeap);
    setMaxBytesLocalOffHeap(mem);
  } else {
    setMaxBytesLocalOffHeap(MemoryUnit.parseSizeInBytes(maxBytesOffHeap));
  }
  maxBytesLocalOffHeapInput = maxBytesOffHeap;
}

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

/**
 * Sets maximum amount of bytes the CacheManager will use on the OffHeap Tier.
 * @param maxBytesOffHeap String representation of the size.
 * @see MemoryUnit#parseSizeInBytes(String)
 */
public void setMaxBytesLocalOffHeap(final String maxBytesOffHeap) {
  assertArgumentNotNull("MaxBytesLocalOffHeap", maxBytesOffHeap);
  
  final String origInput = maxBytesLocalOffHeapInput;
  try {
    maxBytesLocalOffHeapInput = maxBytesOffHeap;
    if (isPercentage(maxBytesOffHeap)) {
      long maxMemory = getOffHeapLimit();
      long mem = maxMemory / HUNDRED * parsePercentage(maxBytesOffHeap);
      setMaxBytesLocalOffHeap(mem);
    } else {
      setMaxBytesLocalOffHeap(MemoryUnit.parseSizeInBytes(maxBytesOffHeap));
    }
  } catch (RuntimeException rte) {
    maxBytesLocalOffHeapInput = origInput;
    throw rte;
  }
}

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

/**
 * Sets maximum amount of bytes the CacheManager will use on the OffHeap Tier.
 * @param maxBytesOffHeap String representation of the size.
 * @see MemoryUnit#parseSizeInBytes(String)
 */
public void setMaxBytesLocalOffHeap(final String maxBytesOffHeap) {
  assertArgumentNotNull("MaxBytesLocalOffHeap", maxBytesOffHeap);
  
  final String origInput = maxBytesLocalOffHeapInput;
  try {
    maxBytesLocalOffHeapInput = maxBytesOffHeap;
    if (isPercentage(maxBytesOffHeap)) {
      long maxMemory = getOffHeapLimit();
      long mem = maxMemory / HUNDRED * parsePercentage(maxBytesOffHeap);
      setMaxBytesLocalOffHeap(mem);
    } else {
      setMaxBytesLocalOffHeap(MemoryUnit.parseSizeInBytes(maxBytesOffHeap));
    }
  } catch (RuntimeException rte) {
    maxBytesLocalOffHeapInput = origInput;
    throw rte;
  }
}

相关文章

微信公众号

最新文章

更多

Configuration类方法