Codota Logo
Interners$InternerBuilder.build
Code IndexAdd Codota to your IDE (free)

How to use
build
method
in
com.google.common.collect.Interners$InternerBuilder

Best Java code snippets using com.google.common.collect.Interners$InternerBuilder.build (Showing top 14 results out of 315)

  • Common ways to obtain Interners$InternerBuilder
private void myMethod () {
Interners$InternerBuilder i =
  • Codota Iconnew InternerBuilder()
  • Smart code suggestions by Codota
}
origin: google/guava

public void testStrong_builder() {
 int concurrencyLevel = 42;
 Interner<Object> interner =
   Interners.newBuilder().strong().concurrencyLevel(concurrencyLevel).build();
 InternerImpl<Object> internerImpl = (InternerImpl<Object>) interner;
 assertEquals(Strength.STRONG, internerImpl.map.keyStrength());
}
origin: google/guava

/**
 * Returns a new thread-safe interner which retains a weak reference to each instance it has
 * interned, and so does not prevent these instances from being garbage-collected. This most
 * likely does not perform as well as {@link #newStrongInterner}, but is the best alternative when
 * the memory usage of that implementation is unacceptable.
 */
@GwtIncompatible("java.lang.ref.WeakReference")
public static <E> Interner<E> newWeakInterner() {
 return newBuilder().weak().build();
}
origin: google/j2objc

/**
 * Returns a new thread-safe interner which retains a strong reference to each instance it has
 * interned, thus preventing these instances from being garbage-collected. If this retention is
 * acceptable, this implementation may perform better than {@link #newWeakInterner}.
 */
public static <E> Interner<E> newStrongInterner() {
 return newBuilder().strong().build();
}
origin: google/j2objc

/**
 * Returns a new thread-safe interner which retains a weak reference to each instance it has
 * interned, and so does not prevent these instances from being garbage-collected. This most
 * likely does not perform as well as {@link #newStrongInterner}, but is the best alternative when
 * the memory usage of that implementation is unacceptable.
 */
@GwtIncompatible("java.lang.ref.WeakReference")
public static <E> Interner<E> newWeakInterner() {
 return newBuilder().weak().build();
}
origin: wildfly/wildfly

/**
 * Returns a new thread-safe interner which retains a weak reference to each instance it has
 * interned, and so does not prevent these instances from being garbage-collected. This most
 * likely does not perform as well as {@link #newStrongInterner}, but is the best alternative when
 * the memory usage of that implementation is unacceptable.
 */
@GwtIncompatible("java.lang.ref.WeakReference")
public static <E> Interner<E> newWeakInterner() {
 return newBuilder().weak().build();
}
origin: google/guava

public void testWeak_builder() {
 int concurrencyLevel = 42;
 Interner<Object> interner =
   Interners.newBuilder().weak().concurrencyLevel(concurrencyLevel).build();
 InternerImpl<Object> internerImpl = (InternerImpl<Object>) interner;
 assertEquals(Strength.WEAK, internerImpl.map.keyStrength());
 assertEquals(concurrencyLevel, internerImpl.map.concurrencyLevel);
}
origin: com.google.guava/guava-tests

public void testStrong_builder() {
 int concurrencyLevel = 42;
 Interner<Object> interner = Interners.newBuilder()
   .strong()
   .concurrencyLevel(concurrencyLevel)
   .build();
 InternerImpl<Object> internerImpl = (InternerImpl<Object>) interner;
 assertEquals(Strength.STRONG, internerImpl.map.keyStrength());
}
origin: org.jboss.eap/wildfly-client-all

/**
 * Returns a new thread-safe interner which retains a weak reference to each instance it has
 * interned, and so does not prevent these instances from being garbage-collected. This most
 * likely does not perform as well as {@link #newStrongInterner}, but is the best alternative when
 * the memory usage of that implementation is unacceptable.
 */
@GwtIncompatible("java.lang.ref.WeakReference")
public static <E> Interner<E> newWeakInterner() {
 return newBuilder().weak().build();
}
origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

/**
 * Returns a new thread-safe interner which retains a weak reference to each instance it has
 * interned, and so does not prevent these instances from being garbage-collected. This most
 * likely does not perform as well as {@link #newStrongInterner}, but is the best alternative when
 * the memory usage of that implementation is unacceptable.
 */
@GwtIncompatible("java.lang.ref.WeakReference")
public static <E> Interner<E> newWeakInterner() {
 return newBuilder().weak().build();
}
origin: org.jboss.eap/wildfly-client-all

/**
 * Returns a new thread-safe interner which retains a strong reference to each instance it has
 * interned, thus preventing these instances from being garbage-collected. If this retention is
 * acceptable, this implementation may perform better than {@link #newWeakInterner}.
 */
public static <E> Interner<E> newStrongInterner() {
 return newBuilder().strong().build();
}
origin: com.google.guava/guava-tests

public void testWeak_builder() {
 int concurrencyLevel = 42;
 Interner<Object> interner = Interners.newBuilder()
   .weak()
   .concurrencyLevel(concurrencyLevel)
   .build();
 InternerImpl<Object> internerImpl = (InternerImpl<Object>) interner;
 assertEquals(Strength.WEAK, internerImpl.map.keyStrength());
 assertEquals(concurrencyLevel, internerImpl.map.concurrencyLevel);
}
origin: google/guava

/**
 * Returns a new thread-safe interner which retains a strong reference to each instance it has
 * interned, thus preventing these instances from being garbage-collected. If this retention is
 * acceptable, this implementation may perform better than {@link #newWeakInterner}.
 */
public static <E> Interner<E> newStrongInterner() {
 return newBuilder().strong().build();
}
origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

/**
 * Returns a new thread-safe interner which retains a strong reference to each instance it has
 * interned, thus preventing these instances from being garbage-collected. If this retention is
 * acceptable, this implementation may perform better than {@link #newWeakInterner}.
 */
public static <E> Interner<E> newStrongInterner() {
 return newBuilder().strong().build();
}
origin: wildfly/wildfly

/**
 * Returns a new thread-safe interner which retains a strong reference to each instance it has
 * interned, thus preventing these instances from being garbage-collected. If this retention is
 * acceptable, this implementation may perform better than {@link #newWeakInterner}.
 */
public static <E> Interner<E> newStrongInterner() {
 return newBuilder().strong().build();
}
com.google.common.collectInterners$InternerBuilderbuild

Popular methods of Interners$InternerBuilder

  • strong
    Instructs the InternerBuilder to build a strong interner.
  • weak
    Instructs the InternerBuilder to build a weak interner.
  • <init>
  • concurrencyLevel
    Sets the concurrency level that will be used by the to-be-built Interner.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getContentResolver (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now