java.util.concurrent.ConcurrentSkipListSet.tailSet()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中java.util.concurrent.ConcurrentSkipListSet.tailSet()方法的一些代码示例,展示了ConcurrentSkipListSet.tailSet()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ConcurrentSkipListSet.tailSet()方法的具体详情如下:
包路径:java.util.concurrent.ConcurrentSkipListSet
类名称:ConcurrentSkipListSet
方法名:tailSet

ConcurrentSkipListSet.tailSet介绍

暂无

代码示例

代码示例来源:origin: robovm/robovm

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> tailSet(E fromElement) {
  return tailSet(fromElement, true);
}

代码示例来源:origin: wildfly/wildfly

private List<ServiceName> listChildren(final ServiceName name, boolean isContextBinding) throws NamingException {
  final ConcurrentSkipListSet<ServiceName> boundServices = this.boundServices;
  if (!isContextBinding && boundServices.contains(name)) {
    throw NamingLogger.ROOT_LOGGER.cannotListNonContextBinding();
  }
  final NavigableSet<ServiceName> tail = boundServices.tailSet(name);
  final List<ServiceName> children = new ArrayList<ServiceName>();
  for (ServiceName next : tail) {
    if (name.isParentOf(next)) {
      if (!name.equals(next)) {
        children.add(next);
      }
    } else {
      break;
    }
  }
  return children;
}

代码示例来源:origin: apache/geode

private OffHeapStoredObject allocateHuge(int size, boolean useFragments) {
 // sizeHolder is a fake Chunk used to search our sorted hugeChunkSet.
 OffHeapStoredObject sizeHolder = new SearchMarker(size);
 NavigableSet<OffHeapStoredObject> ts = this.hugeChunkSet.tailSet(sizeHolder);
 OffHeapStoredObject result = ts.pollFirst();
 if (result != null) {
  if (result.getSize() - (HUGE_MULTIPLE - OffHeapStoredObject.HEADER_SIZE) < size) {
   // close enough to the requested size; just return it.
   checkDataIntegrity(result);
   result.readyForAllocation();
   return result;
  } else {
   this.hugeChunkSet.add(result);
  }
 }
 if (useFragments) {
  // We round it up to the next multiple of TINY_MULTIPLE to make
  // sure we always have chunks allocated on an 8 byte boundary.
  return allocateFromFragments(round(TINY_MULTIPLE, size));
 } else {
  return null;
 }
}

代码示例来源:origin: MobiVM/robovm

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> tailSet(E fromElement) {
  return tailSet(fromElement, true);
}

代码示例来源:origin: org.codehaus.jsr166-mirror/jsr166

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> tailSet(E fromElement) {
  return tailSet(fromElement, true);
}

代码示例来源:origin: ibinti/bugvm

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> tailSet(E fromElement) {
  return tailSet(fromElement, true);
}

代码示例来源:origin: org.apidesign.bck2brwsr/emul

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> tailSet(E fromElement) {
  return tailSet(fromElement, true);
}

代码示例来源:origin: de.dentrassi.eclipse.neoscada.utils/org.eclipse.scada.utils

@Override
public SortedSet<E> tailSet ( final E fromElement )
{
  return this.internalSet.tailSet ( fromElement );
}

代码示例来源:origin: jtulach/bck2brwsr

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> tailSet(E fromElement) {
  return tailSet(fromElement, true);
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> tailSet(E fromElement) {
  return tailSet(fromElement, true);
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> tailSet(E fromElement) {
  return tailSet(fromElement, true);
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> tailSet(E fromElement) {
  return tailSet(fromElement, true);
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> tailSet(E fromElement) {
  return tailSet(fromElement, true);
}

代码示例来源:origin: com.jtransc/jtransc-rt

public NavigableSet<E> tailSet(E fromElement) {
  return tailSet(fromElement, true);
}

代码示例来源:origin: com.sap.cloud.s4hana.cloudplatform/core

private NavigableSet<SimpleImmutableEntry<ZonedDateTime, Throwable>> getEntriesAfter(
  final ZonedDateTime cutoffTime )
{
  final SimpleImmutableEntry<ZonedDateTime, Throwable> cutoffEntry = createCutoffEntry(cutoffTime);
  return timestampedThrowables.tailSet(cutoffEntry, false);
}

代码示例来源:origin: com.orientechnologies/orientdb-core

public File[] nonActiveSegments(final long fromSegment) {
 final OLogSequenceNumber writtenUpTo = this.writtenUpTo.get().lsn;
 long maxSegment = currentSegment;
 if (writtenUpTo.getSegment() < maxSegment) {
  maxSegment = writtenUpTo.getSegment();
 }
 final List<File> result = new ArrayList<>();
 for (final long segment : segments.tailSet(fromSegment)) {
  if (segment < maxSegment) {
   final String segmentName = getSegmentName(segment);
   final Path segmentPath = walLocation.resolve(segmentName);
   final File segFile = segmentPath.toFile();
   if (segFile.exists()) {
    result.add(segFile);
   }
  } else {
   break;
  }
 }
 return result.toArray(new File[0]);
}

代码示例来源:origin: org.jboss.as/jboss-as-naming

private List<ServiceName> listChildren(final ServiceName name, boolean isContextBinding) throws NamingException {
  final ConcurrentSkipListSet<ServiceName> boundServices = this.boundServices;
  if (!isContextBinding && boundServices.contains(name)) {
    throw MESSAGES.cannotListNonContextBinding();
  }
  final NavigableSet<ServiceName> tail = boundServices.tailSet(name);
  final List<ServiceName> children = new ArrayList<ServiceName>();
  for (ServiceName next : tail) {
    if (name.isParentOf(next)) {
      if (!name.equals(next)) {
        children.add(next);
      }
    } else {
      break;
    }
  }
  return children;
}

代码示例来源:origin: org.jboss.eap/wildfly-naming

private List<ServiceName> listChildren(final ServiceName name, boolean isContextBinding) throws NamingException {
  final ConcurrentSkipListSet<ServiceName> boundServices = this.boundServices;
  if (!isContextBinding && boundServices.contains(name)) {
    throw NamingLogger.ROOT_LOGGER.cannotListNonContextBinding();
  }
  final NavigableSet<ServiceName> tail = boundServices.tailSet(name);
  final List<ServiceName> children = new ArrayList<ServiceName>();
  for (ServiceName next : tail) {
    if (name.isParentOf(next)) {
      if (!name.equals(next)) {
        children.add(next);
      }
    } else {
      break;
    }
  }
  return children;
}

代码示例来源:origin: org.wildfly/wildfly-naming

private List<ServiceName> listChildren(final ServiceName name, boolean isContextBinding) throws NamingException {
  final ConcurrentSkipListSet<ServiceName> boundServices = this.boundServices;
  if (!isContextBinding && boundServices.contains(name)) {
    throw NamingLogger.ROOT_LOGGER.cannotListNonContextBinding();
  }
  final NavigableSet<ServiceName> tail = boundServices.tailSet(name);
  final List<ServiceName> children = new ArrayList<ServiceName>();
  for (ServiceName next : tail) {
    if (name.isParentOf(next)) {
      if (!name.equals(next)) {
        children.add(next);
      }
    } else {
      break;
    }
  }
  return children;
}

代码示例来源:origin: io.snappydata/gemfire-core

private Chunk allocateHuge(int size, boolean useFragments, ChunkType chunkType) {
 NavigableSet<Chunk> ts = this.hugeChunkSet.tailSet(sizeHolder);
 Chunk result = ts.pollFirst();
 if (result != null) {

相关文章

微信公众号

最新文章

更多