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

How to use
isAlive
method
in
org.eclipse.leshan.server.registration.Registration

Best Java code snippets using org.eclipse.leshan.server.registration.Registration.isAlive (Showing top 6 results out of 315)

origin: eclipse/leshan

/**
 * @return true if the last registration update was done less than lifetime seconds ago.
 */
public boolean isAlive() {
  return isAlive(0);
}
origin: eclipse/leshan

  @Override
  public void run() {
    try {
      Collection<Registration> allRegs = new ArrayList<>();
      try {
        lock.readLock().lock();
        allRegs.addAll(regsByEp.values());
      } finally {
        lock.readLock().unlock();
      }
      for (Registration reg : allRegs) {
        if (!reg.isAlive()) {
          // force de-registration
          Deregistration removedRegistration = removeRegistration(reg.getId());
          expirationListener.registrationExpired(removedRegistration.getRegistration(),
              removedRegistration.getObservations());
        }
      }
    } catch (Exception e) {
      LOG.warn("Unexpected Exception while registration cleaning", e);
    }
  }
}
origin: eclipse/leshan

  @Override
  public void run() {
    try (Jedis j = pool.getResource()) {
      Set<byte[]> endpointsExpired = j.zrangeByScore(EXP_EP, Double.NEGATIVE_INFINITY,
          System.currentTimeMillis(), 0, cleanLimit);
      for (byte[] endpoint : endpointsExpired) {
        Registration r = deserializeReg(j.get(toEndpointKey(endpoint)));
        if (!r.isAlive(gracePeriod)) {
          Deregistration dereg = removeRegistration(j, r.getId(), true);
          if (dereg != null)
            expirationListener.registrationExpired(dereg.getRegistration(), dereg.getObservations());
        }
      }
    } catch (Exception e) {
      LOG.warn("Unexpected Exception while registration cleaning", e);
    }
  }
}
origin: org.eclipse.leshan/leshan-server-cluster

  @Override
  public void run() {
    try (Jedis j = pool.getResource()) {
      Set<byte[]> endpointsExpired = j.zrangeByScore(EXP_EP, Double.NEGATIVE_INFINITY,
          System.currentTimeMillis(), 0, cleanLimit);
      for (byte[] endpoint : endpointsExpired) {
        Registration r = deserializeReg(j.get(toEndpointKey(endpoint)));
        if (!r.isAlive(gracePeriod)) {
          Deregistration dereg = removeRegistration(j, r.getId(), true);
          if (dereg != null)
            expirationListener.registrationExpired(dereg.getRegistration(), dereg.getObservations());
        }
      }
    } catch (Exception e) {
      LOG.warn("Unexpected Exception while registration cleaning", e);
    }
  }
}
origin: eclipse/leshan

if (!removeOnlyIfNotAlive || !r.isAlive(gracePeriod)) {
  long nbRemoved = j.del(toRegIdKey(r.getId()));
  if (nbRemoved > 0) {
origin: org.eclipse.leshan/leshan-server-cluster

if (!removeOnlyIfNotAlive || !r.isAlive(gracePeriod)) {
  long nbRemoved = j.del(toRegIdKey(r.getId()));
  if (nbRemoved > 0) {
org.eclipse.leshan.server.registrationRegistrationisAlive

Popular methods of Registration

  • getEndpoint
  • getId
  • getIdentity
  • getAdditionalRegistrationAttributes
  • getBindingMode
  • getLifeTimeInSec
  • getLwM2mVersion
  • getRegistrationDate
  • getRegistrationEndpointAddress
  • getRootPath
  • getSmsNumber
  • usesQueueMode
  • getSmsNumber,
  • usesQueueMode,
  • getExpirationTimeStamp,
  • getLastUpdate,
  • getObjectLinks,
  • getSocketAddress,
  • <init>,
  • getAddress,
  • getPort

Popular in Java

  • Finding current android device location
  • onCreateOptionsMenu (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • onRequestPermissionsResult (Fragment)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Sublime Text for Python
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