congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
CacheInvalidationPolicy.getRemainingValidTime
Code IndexAdd Tabnine to your IDE (free)

How to use
getRemainingValidTime
method
in
org.eclipse.persistence.descriptors.invalidation.CacheInvalidationPolicy

Best Java code snippets using org.eclipse.persistence.descriptors.invalidation.CacheInvalidationPolicy.getRemainingValidTime (Showing top 3 results out of 315)

origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * ADVANCED:
 * Return the remaining life of this object.  This method is associated with use of
 * cache invalidation and returns the difference between the next expiry
 * time of the object and its read time.  The method will return 0 for invalidated objects.
 */
public long getRemainingValidTime(Object object) {
  Object primaryKey = getSession().getId(object);
  ClassDescriptor descriptor = getSession().getDescriptor(object);
  CacheKey key = getCacheKeyForObjectForLock(primaryKey, object.getClass(), descriptor);
  if (key == null) {
    throw QueryException.objectDoesNotExistInCache(object);
  }
  return descriptor.getCacheInvalidationPolicy().getRemainingValidTime(key);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * ADVANCED:
 * Return the remaining life of this object.  This method is associated with use of
 * cache invalidation and returns the difference between the next expiry
 * time of the object and its read time.  The method will return 0 for invalidated objects.
 */
public long getRemainingValidTime(Object object) {
  Vector primaryKey = getSession().keyFromObject(object);
  ClassDescriptor descriptor = getSession().getDescriptor(object);
  CacheKey key = getCacheKeyForObjectForLock(primaryKey, object.getClass(), descriptor);
  if (key == null) {
    throw QueryException.objectDoesNotExistInCache(object);
  }
  return descriptor.getCacheInvalidationPolicy().getRemainingValidTime(key);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * ADVANCED:
 * Return the remaining life of this object.  This method is associated with use of
 * cache invalidation and returns the difference between the next expiry
 * time of the object and its read time.  The method will return 0 for invalidated objects.
 */
public long getRemainingValidTime(Object object) {
  Object primaryKey = getSession().getId(object);
  ClassDescriptor descriptor = getSession().getDescriptor(object);
  CacheKey key = getCacheKeyForObjectForLock(primaryKey, object.getClass(), descriptor);
  if (key == null) {
    throw QueryException.objectDoesNotExistInCache(object);
  }
  return descriptor.getCacheInvalidationPolicy().getRemainingValidTime(key);
}
org.eclipse.persistence.descriptors.invalidationCacheInvalidationPolicygetRemainingValidTime

Javadoc

INTERNAL: Return the remaining life of this object

Popular methods of CacheInvalidationPolicy

  • getExpiryTimeInMillis
    INTERNAL: Get the next time when this object will become invalid
  • isInvalidated
  • shouldUpdateReadTimeOnUpdate
    PUBLIC: Return whether objects affected by this CacheInvalidationPolicy should have the read time on
  • clone
  • setIsInvalidationRandomized
    PUBLIC: Allows the timeToLive to be randomized to avoid bottlenecks.
  • setShouldRefreshInvalidObjectsOnClone
    PUBLIC: Set if expired object should be refreshed prior to cloning, default is true. Applies to Prot
  • setShouldUpdateReadTimeOnUpdate
    PUBLIC: Set whether to update the stored time an object was read when an object is updated. When the
  • shouldRefreshInvalidObjectsOnClone
    PUBLIC: Return if expired object should be refreshed prior to cloning. Applies to Protected Entities
  • shouldRefreshInvalidObjectsInUnitOfWork
    PUBLIC: Return if expired object registered in the unit of work should be refreshed.

Popular in Java

  • Updating database using SQL prepared statement
  • getSystemService (Context)
  • getExternalFilesDir (Context)
  • onCreateOptionsMenu (Activity)
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Reference (javax.naming)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now