Example usage for java.util.concurrent ConcurrentSkipListSet ConcurrentSkipListSet

List of usage examples for java.util.concurrent ConcurrentSkipListSet ConcurrentSkipListSet

Introduction

In this page you can find the example usage for java.util.concurrent ConcurrentSkipListSet ConcurrentSkipListSet.

Prototype

ConcurrentSkipListSet(ConcurrentNavigableMap<E, Object> m) 

Source Link

Document

For use by submaps

Usage

From source file:org.bitbucket.ab.jfqm.Main.java

/**
 * @param args//from   w  w  w.  j a v a 2 s  .  c  o  m
 */
public static void main(String[] args) {
    beanFactory = new ClassPathXmlApplicationContext("config.xml");
    List<ITimeoutJob> bean = (List<ITimeoutJob>) beanFactory.getBean("jobList");
    ConcurrentSkipListSet<ITimeoutJob> jobsSet = new ConcurrentSkipListSet<ITimeoutJob>(bean);
    //BlockingQueue<MoveJob> b = new LinkedBlockingQueue<MoveJob>();
    MoveJobProducer m2 = new MoveJobProducer(jobsSet);
    BlockingQueue<MoveJob> b = (BlockingQueue<MoveJob>) beanFactory.getBean("jobQueue");
    MoveJobConsumer c2 = new MoveJobConsumer(b);
    new Thread(m2).start();
    new Thread(c2).start();

}

From source file:Main.java

public static <E> ConcurrentSkipListSet<E> getConcurrentSkipListSet(Collection<? extends E> collection) {
    return new ConcurrentSkipListSet<E>(collection);
}

From source file:Main.java

public static <E> ConcurrentSkipListSet<E> getConcurrentSkipListSet(Comparator<? super E> comparator) {
    return new ConcurrentSkipListSet<E>(comparator);
}

From source file:Main.java

public static <E> ConcurrentSkipListSet<E> getConcurrentSkipListSet(SortedSet<E> set) {
    return new ConcurrentSkipListSet<E>(set);
}

From source file:Main.java

public static <E> ConcurrentSkipListSet<E> newConcurrentSkipListSet(final Collection<? extends E> c) {
    return new ConcurrentSkipListSet<E>(c);
}

From source file:Main.java

public static <E> ConcurrentSkipListSet<E> newConcurrentSkipListSet(final Comparator<? super E> c) {
    return new ConcurrentSkipListSet<E>(c);
}

From source file:Main.java

public static <E> ConcurrentSkipListSet<E> newConcurrentSkipListSet(final SortedSet<? extends E> s) {
    return new ConcurrentSkipListSet<E>(s);
}

From source file:com.clustercontrol.monitor.run.util.EventCache.java

public static void initEventCache() {
    eventCache = new ConcurrentSkipListSet<EventLogEntity>(new Comparator<EventLogEntity>() {
        @Override/*from   w ww. ja v a2  s .  c  om*/
        public int compare(EventLogEntity o1, EventLogEntity o2) {
            return (int) (-o1.getId().getOutputDate() + o2.getId().getOutputDate());
        }
    });

    new JpaTransactionManager().getEntityManager().clear();
    for (EventLogEntity e : QueryUtil.getEventLogByFilter(null, null, null, null, null, null, null, null, null,
            null, null, null, null, null, null, null, false, getEventCacheLimit())) {
        addEventCache(e);
    }
    if (eventCache.size() == getEventCacheLimit()) {
        eventCacheFull = true;
    } else {
        eventCacheFull = false;
    }
    m_log.info("eventCacheFull=" + eventCacheFull);
}

From source file:org.sakaiproject.gradebookng.business.importExport.UserIdentificationReport.java

public UserIdentificationReport(Set<GbUser> allUsers) {
    missingUsers = new ConcurrentSkipListSet<>(allUsers);
    identifiedUsers = new ConcurrentSkipListSet<>();
    unknownUsers = new ConcurrentSkipListSet<>();
    duplicateUsers = new ConcurrentSkipListSet<>();
}

From source file:com.joshlong.esb.springintegration.modules.net.feed.FeedEntryReaderMessageSource.java

public FeedEntryReaderMessageSource() {
    this.receivedEntries = new ConcurrentSkipListSet<SyndEntry>(new MyComparator());
    this.entries = new ConcurrentLinkedQueue<SyndEntry>();
}