Java 8 ConcurrentSkipListSet - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 ConcurrentSkipListSet class.

This code example shows how to use the following methods:
 */ 
public class DummyClassFileTransformer1 implements ClassFileTransformer { 
 
    public static boolean wasActive = false;
 
    public static Set<String> transformedClassNames = new ConcurrentSkipListSet<String>();
 
    @Override 
    public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException {
        transformedClassNames.add(className);
        wasActive = true;
        return classfileBuffer;
    } 
} 
7
CodeRank
This code example shows how to use the following methods:add
  public void loadSegment( 
      DataSegment segment, 
      LoadPeonCallback callback 
  ) 
  { 
    segmentsToLoad.add(segment); 
  } 
 
  public ConcurrentSkipListSet<DataSegment> getSegmentsToLoad() 
  { 
    return segmentsToLoad; 
  } 
} 
7
CodeRank
This code example shows how to use the following methods:
 */ 
public class DummyClassFileTransformer2 implements ClassFileTransformer { 
 
    public static boolean wasActive = false;
 
    public static Set<String> transformedClassNames = new ConcurrentSkipListSet<String> ();
 
    @Override 
    public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException {
        transformedClassNames.add(className);
        wasActive = true;
        return classfileBuffer;
    } 
} 
7
CodeRank
This code example shows how to use the following methods:isEmpty
    return this;
  } 
 
  public boolean isEmpty() 
  { 
    return segmentsHolder.isEmpty();
  } 
 
  @Override 
  public String toString()
  { 
    return "DruidDataSource{" + 
           "properties=" + properties +
           ", partitions=" + segmentsHolder.toString() +
           '}'; 
  } 
} 
6
CodeRank
This code example shows how to use the following methods:size
		routine.run();
		return System.nanoTime() - start;
	} 
 
	private void testSkeepListSet() { 
		final ConcurrentSkipListSet<Integer> set = new ConcurrentSkipListSet<>();
		long time = invokeWithTime(new Runnable() {
			public void run() { 
				set.addAll(Arrays.asList(randomData));
			} 
		}); 
		System.out.println(set.size());
		System.out.println("SkeepListSet time: "
				+ TimeUnit.NANOSECONDS.toMillis(time) + " mils");
	} 
 
//	private void testSortedCollection() { 
//		final SkeepList<Integer> sorted = new SkeepList<>(); 
//		long time = invokeWithTime(new Runnable() { 
//			public void run() { 
5
CodeRank
This code example shows how to use the following methods:
/** 
 * @author Josh Long 
 */ 
public class ProcessVariableHeaderMapper implements HeaderMapper<Map<String, Object>> {
 
    private final Set<String> keysToPreserve = new ConcurrentSkipListSet<String>();
 
    public ProcessVariableHeaderMapper(Set<String> sync) {
        this.keysToPreserve.addAll(sync);
    } 
 
    @Override 
    public void fromHeaders(MessageHeaders headers, Map<String, Object> target) {
        // inbound SI msg. take the headers and convert it to 
        sync(this.keysToPreserve, headers, target);
    } 
 
    @Override 
    public Map<String, Object> toHeaders(Map<String, Object> source) {
        Map<String, Object> matches = sync(
5
CodeRank
This code example shows how to use the following methods:
    private String processDefinitionId = "processDefinitionId";
 
    private final ProcessVariableHeaderMapper headerMapper;
    private ProcessEngine processEngine;
 
    private Set<String> sync = new ConcurrentSkipListSet<String>();
 
    public ActivitiInboundGateway(ProcessEngine processEngine, String... pvsOrHeadersToPreserve) {
        Collections.addAll(this.sync, pvsOrHeadersToPreserve);
        this.processEngine = processEngine;
        this.headerMapper = new ProcessVariableHeaderMapper(sync);
        this.initializeDefaultPreservedHeaders();
    } 
 
    protected void initializeDefaultPreservedHeaders() { 
        this.sync.add(executionId);
        this.sync.add(processDefinitionId);
        this.sync.add(processInstanceId);
    } 
 
5
CodeRank
This code example shows how to use the following methods:
 
	/** Default servlet context file suffix */ 
	private static final String SERVLET_CONTEXT_SUFFIX = "-servlet.xml"; //$NON-NLS-1$
 
	/** The detected file patterns to search for */ 
	private Set<String> filePatterns = new ConcurrentSkipListSet<String>();
 
	private final XPathExpression servletExpression;
 
	private final XPathExpression listenerExpression;
 
	private final XPathExpression contextParamExpression;
 
	{ 
		try { 
			XPathFactory newInstance = XPathFactory.newInstance();
			XPath xpath = newInstance.newXPath();
			this.servletExpression = xpath.compile(SERVLET_XPATH_EXPRESSION);
			this.listenerExpression = xpath.compile(LISTENER_XPATH_EXPRESSION);
			this.contextParamExpression = xpath.compile(CONTEXT_PARAM_XPATH_EXPRESSION);
5
CodeRank
This code example shows how to use the following methods:add
		else 
			return true; 
	} 
	 
	static Set<String> execute0WithPresenceCheck(QueryAtom atom) {
		Set<String> queries = new ConcurrentSkipListSet<String>();
		 
		List<QueryArgument> args = atom.getArguments();
		 
		QueryArgument arg1 = args.get(0);
		QueryArgument arg2 = args.get(1);
		 
		URI iURI1 = URI.create(arg1.getValue());
		URI iURI2 = URI.create(arg2.getValue());
		 
		queries.add(Janus.sqlGenerator.getQueryToCheckPresenceOfIndividual(iURI1));
		queries.add(Janus.sqlGenerator.getQueryToCheckPresenceOfIndividual(iURI2));
		 
		return queries;
	} 

5
CodeRank
This code example shows how to use the following methods:
        this.timeoutMap = timeoutMap;
        this.timeoutMap.setListener(this);
        // create local set of correlation ids, as its easier to keep track 
        // using the listener so we can flag the dirty flag upon changes 
        // must support concurrent access 
        this.correlationIds = new ConcurrentSkipListSet<String>();
    } 
 
    public synchronized String get() {
        if (!dirty) {
            return expression.toString();
        } 
 
        expression = new StringBuilder("JMSCorrelationID='");
 
        if (correlationIds.size() == 0) {
            // no id's so use a dummy to select nothing 
            expression.append("CamelDummyJmsMessageSelector'");
        } else { 
            boolean first = true;
5
CodeRank
See Code Examples for Java 8 ConcurrentSkipListSet Methods: