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

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

Best Java code snippets using com.google.common.collect.Interners$InternerBuilder.weak (Showing top 7 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

/**
 * 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: 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: 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: 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: 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();
}
com.google.common.collectInterners$InternerBuilderweak

Javadoc

Instructs the InternerBuilder to build a weak interner.

Popular methods of Interners$InternerBuilder

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

Popular in Java

  • Making http post requests using okhttp
  • startActivity (Activity)
  • findViewById (Activity)
  • getExternalFilesDir (Context)
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Option (scala)
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