congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Clock.getTime
Code IndexAdd Tabnine to your IDE (free)

How to use
getTime
method
in
com.moz.fiji.schema.util.Clock

Best Java code snippets using com.moz.fiji.schema.util.Clock.getTime (Showing top 3 results out of 315)

origin: com.moz.fiji.schema/fiji-schema

/**
 * Constructor.
 * @param table The table connection to wrap.
 * @param pool The pool that this Connection is associated with.
 */
public PooledFijiTable(FijiTable table, Pool pool) {
 mTable = table;
 mPool = pool;
 mLastAccessTime = pool.getClock().getTime();
}
origin: com.moz.fiji.schema/fiji-schema

/** {@inheritDoc} */
@Override
public void release() throws IOException {
 final int counter = mRetainCount.decrementAndGet();
 Preconditions.checkState(counter >= 1,
   "Cannot release FijiTable %s that was already returned: retain counter is now %s.",
   getURI(), counter);
 if (counter == 1) {
  mLastAccessTime = mPool.getClock().getTime();
  mPool.returnConnection(this);
 }
}
origin: com.moz.fiji.schema/fiji-schema

/**
 * Cleans any connections from the pool that have been idle, while maintaining the minimum pool
 * size.
 *
 * @param idleTimeout Milliseconds idle required to be closed and
 *     removed from the pool.
 */
public synchronized void clean(long idleTimeout) {
 long currentTime = mClock.getTime();
 Iterator<PooledFijiTable> iterator = mConnections.iterator();
 while (iterator.hasNext() && mPoolSize > mMinSize) {
  PooledFijiTable connection = iterator.next();
  if (currentTime - connection.getLastAccessTime() > idleTimeout) {
   final int counter = connection.mRetainCount.decrementAndGet();
   Preconditions.checkState(counter == 0,
     "Cannot clean up FijiTable %s: retain counter is %s.",
     connection.getURI(), counter);
   LOG.info("Closing idle PooledFijiTable connection to {}.", connection.getURI());
   iterator.remove();
   connection.releaseUnderlyingFijiTable();
   mPoolSize--;
  }
 }
}
com.moz.fiji.schema.utilClockgetTime

Javadoc

Gets the current time.

Popular methods of Clock

  • getDefaultClock

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (Timer)
  • getSharedPreferences (Context)
  • getContentResolver (Context)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top Sublime Text plugins
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