提交 d14af56a 编写于 作者: M mduigou

Merge

...@@ -44,8 +44,8 @@ import java.util.concurrent.atomic.*; ...@@ -44,8 +44,8 @@ import java.util.concurrent.atomic.*;
* creation time, depending on which constructor is used. * creation time, depending on which constructor is used.
* *
* <p>This class implements a concurrent variant of <a * <p>This class implements a concurrent variant of <a
* href="http://www.cs.umd.edu/~pugh/">SkipLists</a> providing * href="http://en.wikipedia.org/wiki/Skip_list" target="_top">SkipLists</a>
* expected average <i>log(n)</i> time cost for the * providing expected average <i>log(n)</i> time cost for the
* <tt>containsKey</tt>, <tt>get</tt>, <tt>put</tt> and * <tt>containsKey</tt>, <tt>get</tt>, <tt>put</tt> and
* <tt>remove</tt> operations and their variants. Insertion, removal, * <tt>remove</tt> operations and their variants. Insertion, removal,
* update, and access operations safely execute concurrently by * update, and access operations safely execute concurrently by
......
...@@ -164,8 +164,8 @@ public class Exchanger<V> { ...@@ -164,8 +164,8 @@ public class Exchanger<V> {
* races between two threads or thread pre-emptions occurring * races between two threads or thread pre-emptions occurring
* between reading and CASing. Also, very transient peak * between reading and CASing. Also, very transient peak
* contention can be much higher than the average sustainable * contention can be much higher than the average sustainable
* levels. The max limit is decreased on average 50% of the times * levels. An attempt to decrease the max limit is usually made
* that a non-slot-zero wait elapses without being fulfilled. * when a non-slot-zero wait elapses without being fulfilled.
* Threads experiencing elapsed waits move closer to zero, so * Threads experiencing elapsed waits move closer to zero, so
* eventually find existing (or future) threads even if the table * eventually find existing (or future) threads even if the table
* has been shrunk due to inactivity. The chosen mechanics and * has been shrunk due to inactivity. The chosen mechanics and
......
...@@ -69,7 +69,7 @@ public class Basic { ...@@ -69,7 +69,7 @@ public class Basic {
throw new RuntimeException("entry not found"); throw new RuntimeException("entry not found");
// check filtering: f* should match foo // check filtering: f* should match foo
DirectoryStream.Filter<Path> filter = new DirectoryStream.Filter<>() { DirectoryStream.Filter<Path> filter = new DirectoryStream.Filter<Path>() {
private PathMatcher matcher = private PathMatcher matcher =
dir.getFileSystem().getPathMatcher("glob:f*"); dir.getFileSystem().getPathMatcher("glob:f*");
public boolean accept(Path file) { public boolean accept(Path file) {
......
...@@ -53,7 +53,7 @@ import java.util.concurrent.PriorityBlockingQueue; ...@@ -53,7 +53,7 @@ import java.util.concurrent.PriorityBlockingQueue;
public class NoNulls { public class NoNulls {
void test(String[] args) throws Throwable { void test(String[] args) throws Throwable {
final Comparator<String> nullTolerantComparator final Comparator<String> nullTolerantComparator
= new Comparator<>() { = new Comparator<String>() {
public int compare(String x, String y) { public int compare(String x, String y) {
return (x == null ? -1 : return (x == null ? -1 :
y == null ? 1 : y == null ? 1 :
...@@ -65,7 +65,7 @@ public class NoNulls { ...@@ -65,7 +65,7 @@ public class NoNulls {
nullSortedSet.add(null); nullSortedSet.add(null);
final PriorityQueue<String> nullPriorityQueue final PriorityQueue<String> nullPriorityQueue
= new PriorityQueue<>() { = new PriorityQueue<String>() {
public Object[] toArray() { return new Object[] { null };}}; public Object[] toArray() { return new Object[] { null };}};
final Collection<String> nullCollection = new ArrayList<>(); final Collection<String> nullCollection = new ArrayList<>();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册