Tabnine Logo
Clearable
Code IndexAdd Tabnine to your IDE (free)

How to use
Clearable
in
com.tc.object.bytecode

Best Java code snippets using com.tc.object.bytecode.Clearable (Showing top 20 results out of 315)

origin: org.terracotta.modules/tim-ehcache-2.0

private static void setNotClearable(Object o) {
 if (o instanceof Clearable) {
  ((Clearable) o).setEvictionEnabled(false);
 }
}
origin: org.terracotta/terracotta-ee

@Override
protected int clearReferences(final Object pojo, final int toClear) {
 if (!(pojo instanceof Clearable)) {
  Assert.fail("TCObjectLogical.clearReferences expected Clearable but got "
        + (pojo == null ? "null" : pojo.getClass().getName()));
 }
 final Clearable clearable = (Clearable) pojo;
 return clearable.__tc_clearReferences(toClear);
}
origin: org.terracotta/terracotta-ee

@Override
protected boolean isEvictable() {
 Object peer;
 if ((peer = getPeerObject()) instanceof Clearable) {
  return ((Clearable) peer).isEvictionEnabled();
 } else {
  return false;
 }
}
origin: org.terracotta.modules/tim-ehcache-1.7

private static void setNotClearable(Object o) {
 if (o instanceof Clearable) {
  ((Clearable) o).setEvictionEnabled(false);
 }
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.3-impl

/**
 * Attempt to disable eviction for the given clustered object.
 * <p>
 * If eviction is disabled, then this object will remain in the local heap on the VM from which this method was
 * called.
 * 
 * @param o target object
 * @return {@code true} if eviction was disabled
 */
public static boolean disableEviction(Object o) {
 if (o instanceof Clearable) {
  ((Clearable) o).setEvictionEnabled(false);
  return true;
 }
 return false;
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.4-impl

/**
 * Attempt to disable eviction for the given clustered object.
 * <p>
 * If eviction is disabled, then this object will remain in the local heap on the VM from which this method was
 * called.
 * 
 * @param o target object
 * @return {@code true} if eviction was disabled
 */
public static boolean disableEviction(Object o) {
 if (o instanceof Clearable) {
  ((Clearable) o).setEvictionEnabled(false);
  return true;
 }
 return false;
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.0-impl

/**
 * Attempt to enabled eviction for the given clustered object.
 * <p>
 * If eviction is enabled, then the cluster is free to remove this object
 * from the local heap on the VM from which this method is called.
 * 
 * @param o target object
 * @return {@code true} if eviction was enabled
 */
public static boolean enableEviction(Object o) {
 if (o instanceof Clearable) {
  ((Clearable) o).setEvictionEnabled(true);
  return true;
 }
 return false;
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.3-impl

/**
 * Attempt to enabled eviction for the given clustered object.
 * <p>
 * If eviction is enabled, then the cluster is free to remove this object from the local heap on the VM from which
 * this method is called.
 * 
 * @param o target object
 * @return {@code true} if eviction was enabled
 */
public static boolean enableEviction(Object o) {
 if (o instanceof Clearable) {
  ((Clearable) o).setEvictionEnabled(true);
  return true;
 }
 return false;
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.4-impl

/**
 * Attempt to enabled eviction for the given clustered object.
 * <p>
 * If eviction is enabled, then the cluster is free to remove this object from the local heap on the VM from which
 * this method is called.
 * 
 * @param o target object
 * @return {@code true} if eviction was enabled
 */
public static boolean enableEviction(Object o) {
 if (o instanceof Clearable) {
  ((Clearable) o).setEvictionEnabled(true);
  return true;
 }
 return false;
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.0-impl

/**
 * Attempt to disable eviction for the given clustered object.
 * <p>
 * If eviction is disabled, then this object will remain in the local heap
 * on the VM from which this method was called.
 * 
 * @param o target object
 * @return {@code true} if eviction was disabled
 */
public static boolean disableEviction(Object o) {
 if (o instanceof Clearable) {
  ((Clearable) o).setEvictionEnabled(false);
  return true;
 }
 return false;
}
origin: org.terracotta.modules/tim-searchable

public void initialize() {
  localClassCache = new ConcurrentHashMap<Integer, ObjectStreamClass>();
  localMappingCache = new ConcurrentHashMap<String, Integer>();
  // There isn't anything clearable in this map so don't waste time visiting it
   ((Clearable) mappings).setEvictionEnabled(false);
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.0-impl

public void initialize() {
 lookup = DEFAULT_LOOKUP;
 localCache = new ConcurrentHashMap<Integer, ObjectStreamClass>();
 // There isn't anything clearable in this map so don't waste time visiting it
 for (Map map : mappings.getConstituentMaps()) {
  if (map instanceof Clearable) {
   ((Clearable) map).setEvictionEnabled(false);
  }
 }
}
origin: org.terracotta.modules/tim-distributed-cache

public void initialize() {
 lookup = DEFAULT_LOOKUP;
 localCache = new ConcurrentHashMap<Integer, ObjectStreamClass>();
 // There isn't anything clearable in this map so don't waste time visiting it
 for (Map map : mappings.getConstituentMaps()) {
  if (map instanceof Clearable) {
   ((Clearable) map).setEvictionEnabled(false);
  }
 }
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.4-impl

public void initialize() {
 oscSoftQueue = new ReferenceQueue<ObjectStreamClass>();
 localCache = new ConcurrentHashMap<Integer, CachedOscReference>();
 // There isn't anything clearable in this map so don't waste time visiting
 // it
 for (Map<?, ?> map : mappings.getConstituentMaps()) {
  if (map instanceof Clearable) {
   ((Clearable) map).setEvictionEnabled(false);
  }
 }
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.3-impl

public void initialize() {
 localCache = new ConcurrentHashMap<Integer, ObjectStreamClass>();
 // There isn't anything clearable in this map so don't waste time visiting
 // it
 for (Map<?, ?> map : mappings.getConstituentMaps()) {
  if (map instanceof Clearable) {
   ((Clearable) map).setEvictionEnabled(false);
  }
 }
}
origin: org.terracotta.modules/tim-map-evictor

public CHMDistributedMap(Config config) {
 this.config = config;
 final int INITIAL_CAPACITY = 128;
 final float LOAD_FACTOR = 0.75f;
 this.data = new ConcurrentHashMap<K, V>(INITIAL_CAPACITY, LOAD_FACTOR, config.getConcurrency());
 this.timestamps = new ConcurrentHashMap<K, Timestamp>(INITIAL_CAPACITY, LOAD_FACTOR, config.getConcurrency());
 ((Clearable) timestamps).setEvictionEnabled(false);
 this.globalKeySet = new GlobalKeySet<K>();
 this.orphanEvictorLock = new ReentrantLock();
 initializeOnLoad();
}
origin: org.terracotta.modules/tim-ehcache-commons

private void initializeStore() {
 for (int i = 0; i < config.getConcurrency(); i++) {
  this.store[i] = new CacheDataStoreSegment();
  this.dtmStore[i] = new CacheDataStoreSegment();
  ((Clearable) dtmStore[i]).setEvictionEnabled(false);
 }
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.0-impl

protected ConcurrentDistributedMapDsoArray(final CacheConfig cacheConfig, final LockType lockType, final LockStrategy<? super K> lockStrategy, final int concurrency) {
 // ensure that DSO is active at construction time, ie. fail fast concurrency
 Assert.pre(!(ManagerUtil.getManager() instanceof NullManager));
 int sshift = 0;
 int ssize = 1;
 while (ssize < concurrency) {
  ++sshift;
  ssize <<= 1;
 }
 this.segmentShift = 32 - sshift;
 this.segmentMask = ssize - 1;
 this.storeList = new ArrayList<ClusteredMap<K, V>>(ssize);
 if (this.storeList instanceof Clearable) {
  // ArrayList isn't currently clearable but it might be someday
  ((Clearable) this.storeList).setEvictionEnabled(false);
 }
 createConstituentMaps(cacheConfig, lockType, lockStrategy, ssize);
 onLoad();
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.4-impl

protected ConcurrentDistributedMapDsoArray(final CacheConfig cacheConfig, final LockType lockType,
                      final GenericLockStrategy<L, ? super K> lockStrategy,
                      final int concurrency, final boolean invalidateOnChange,
                      final boolean localCacheEnabled, final boolean deleteValueOnRemove) {
 // ensure that DSO is active at construction time, ie. fail fast concurrency
 Assert.pre(!(ManagerUtil.getManager() instanceof NullManager));
 this.invalidateOnChange = invalidateOnChange;
 this.localCacheEnabled = localCacheEnabled;
 this.deleteValueOnRemove = deleteValueOnRemove;
 int sshift = 0;
 int ssize = 1;
 while (ssize < concurrency) {
  ++sshift;
  ssize <<= 1;
 }
 this.segmentShift = 32 - sshift;
 this.segmentMask = ssize - 1;
 this.storeList = new ArrayList<InternalClusteredMap<K, V>>(ssize);
 if (this.storeList instanceof Clearable) {
  // ArrayList isn't currently clearable but it might be someday
  ((Clearable) this.storeList).setEvictionEnabled(false);
 }
 createConstituentMaps(cacheConfig, lockType, lockStrategy, ssize);
 hasMutateCallbackSupport = probeForMutateCallbackSupport();
 onLoad();
}
origin: org.terracotta.toolkit/terracotta-toolkit-1.3-impl

protected ConcurrentDistributedMapDsoArray(final CacheConfig cacheConfig, final LockType lockType,
                      final GenericLockStrategy<L, ? super K> lockStrategy,
                      final int concurrency, final boolean invalidateOnChange) {
 // ensure that DSO is active at construction time, ie. fail fast concurrency
 Assert.pre(!(ManagerUtil.getManager() instanceof NullManager));
 this.invalidateOnChange = invalidateOnChange;
 int sshift = 0;
 int ssize = 1;
 while (ssize < concurrency) {
  ++sshift;
  ssize <<= 1;
 }
 this.segmentShift = 32 - sshift;
 this.segmentMask = ssize - 1;
 this.storeList = new ArrayList<InternalClusteredMap<K, V>>(ssize);
 if (this.storeList instanceof Clearable) {
  // ArrayList isn't currently clearable but it might be someday
  ((Clearable) this.storeList).setEvictionEnabled(false);
 }
 createConstituentMaps(cacheConfig, lockType, lockStrategy, ssize);
 hasMutateCallbackSupport = probeForMutateCallbackSupport();
 onLoad();
}
com.tc.object.bytecodeClearable

Most used methods

  • setEvictionEnabled
  • __tc_clearReferences
  • isEvictionEnabled

Popular in Java

  • Reactive rest calls using spring rest template
  • requestLocationUpdates (LocationManager)
  • notifyDataSetChanged (ArrayAdapter)
  • getResourceAsStream (ClassLoader)
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Best plugins for Eclipse
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