congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Reactive rest calls using spring rest template
  • getApplicationContext (Context)
  • getSystemService (Context)
  • scheduleAtFixedRate (Timer)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JCheckBox (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top Vim 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