本文整理了Java中java.util.concurrent.ConcurrentSkipListMap.clear()
方法的一些代码示例,展示了ConcurrentSkipListMap.clear()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ConcurrentSkipListMap.clear()
方法的具体详情如下:
包路径:java.util.concurrent.ConcurrentSkipListMap
类名称:ConcurrentSkipListMap
方法名:clear
[英]Removes all of the mappings from this map.
[中]从此映射中删除所有映射。
代码示例来源:origin: apache/ignite
/** {@inheritDoc} */
@Override public void onDisconnected(IgniteFuture<?> reconnectFut) throws IgniteCheckedException {
affMap.clear();
}
代码示例来源:origin: apache/hbase
public void clear() {
regionsMap.clear();
regionInTransition.clear();
regionOffline.clear();
serverMap.clear();
}
代码示例来源:origin: lealone/Lealone
@Override
public void clear() {
skipListMap.clear();
}
代码示例来源:origin: lealone/Lealone
@Override
public synchronized void clear() {
buffer.clear();
map.clear();
}
代码示例来源:origin: lealone/Lealone
@Override
public synchronized void remove() {
buffer.clear();
map.remove();
}
代码示例来源:origin: apache/incubator-druid
@Override
public void stop()
{
synchronized (lock) {
if (stopped) {
return;
}
stopped = true;
for (SegmentHolder holder : segmentsToDrop.values()) {
holder.requestFailed("Stopping load queue peon.");
}
for (SegmentHolder holder : segmentsToLoad.values()) {
holder.requestFailed("Stopping load queue peon.");
}
segmentsToDrop.clear();
segmentsToLoad.clear();
queuedSize.set(0L);
failedAssignCount.set(0);
}
}
代码示例来源:origin: lealone/Lealone
@Override
public synchronized void close() {
merge();
buffer.clear();
map.close();
AOStorageService.removeBufferedMap(this);
}
代码示例来源:origin: io.dropwizard.metrics/metrics-core
private void rescale(long now, long next) {
lockForRescale();
try {
if (nextScaleTime.compareAndSet(next, now + RESCALE_THRESHOLD)) {
final long oldStartTime = startTime;
this.startTime = currentTimeInSeconds();
final double scalingFactor = exp(-alpha * (startTime - oldStartTime));
if (Double.compare(scalingFactor, 0) == 0) {
values.clear();
} else {
final ArrayList<Double> keys = new ArrayList<>(values.keySet());
for (Double key : keys) {
final WeightedSample sample = values.remove(key);
final WeightedSample newSample = new WeightedSample(sample.value, sample.weight * scalingFactor);
if (Double.compare(newSample.weight, 0) == 0) {
continue;
}
values.put(key * scalingFactor, newSample);
}
}
// make sure the counter is in sync with the number of stored samples.
count.set(values.size());
}
} finally {
unlockForRescale();
}
}
代码示例来源:origin: apache/incubator-druid
@Override
public void stop()
{
synchronized (lock) {
if (currentlyProcessing != null) {
executeCallbacks(currentlyProcessing.getCallbacks());
currentlyProcessing = null;
}
if (!segmentsToDrop.isEmpty()) {
for (SegmentHolder holder : segmentsToDrop.values()) {
executeCallbacks(holder.getCallbacks());
}
}
segmentsToDrop.clear();
if (!segmentsToLoad.isEmpty()) {
for (SegmentHolder holder : segmentsToLoad.values()) {
executeCallbacks(holder.getCallbacks());
}
}
segmentsToLoad.clear();
queuedSize.set(0L);
failedAssignCount.set(0);
stopped = true;
}
}
代码示例来源:origin: oracle/helidon
private void rescale(long now, long next) {
lockForRescale();
try {
if (nextScaleTime.compareAndSet(next, now + RESCALE_THRESHOLD)) {
final long oldStartTime = startTime;
this.startTime = currentTimeInSeconds();
final double scalingFactor = exp(-alpha * (startTime - oldStartTime));
if (Double.compare(scalingFactor, 0) == 0) {
values.clear();
} else {
final ArrayList<Double> keys = new ArrayList<Double>(values.keySet());
for (Double key : keys) {
final WeightedSnapshot.WeightedSample sample = values.remove(key);
final WeightedSnapshot.WeightedSample newSample = new WeightedSnapshot.WeightedSample(sample.getValue(),
sample.getWeight() * scalingFactor);
values.put(key * scalingFactor, newSample);
}
}
// make sure the counter is in sync with the number of stored samples.
count.set(values.size());
}
} finally {
unlockForRescale();
}
}
代码示例来源:origin: mulesoft/mule
@Override
public void clear() throws ObjectStoreException {
synchronized (store) {
store.clear();
}
}
代码示例来源:origin: rackerlabs/blueflood
public void close() {
locatorToTimestampToPoint.clear();
}
代码示例来源:origin: palantir/atlasdb
@Override
public void truncateTable(TableReference tableRef) {
Table table = tables.get(tableRef);
if (table != null) {
table.entries.clear();
} else {
throw new IllegalStateException(
String.format("Truncate called on a table (%s) that did not exist", tableRef));
}
}
代码示例来源:origin: Audiveris/audiveris
@Override
public void reset ()
{
lastId.set(0);
entities.clear();
}
代码示例来源:origin: kg.apc/jmeter-plugins-cmn-jmeter
@Override
public void clearData() {
super.clearData();
state.clear();
}
}
代码示例来源:origin: io.snappydata/gemfire-core
@Override
public boolean clear() {
this.valueToEntriesMap.clear();
if (IndexManager.isObjectModificationInplace()) {
this.entryToValuesMap.clear();
}
numIndexKeys.set(0);
return true;
}
代码示例来源:origin: hazelcast/hazelcast-jet
@Override
public void clear() {
takeWriteLock();
try {
recordsWithNullValue.clear();
recordMap.clear();
} finally {
releaseWriteLock();
}
}
代码示例来源:origin: com.yammer.metrics/metrics-core
@Override
public void clear() {
lockForRescale();
try {
values.clear();
count.set(0);
this.startTime = currentTimeInSeconds();
nextScaleTime.set(clock.tick() + RESCALE_THRESHOLD);
} finally {
unlockForRescale();
}
}
代码示例来源:origin: espertechinc/esper
@Override
public void clear() {
lockForRescale();
try {
values.clear();
count.set(0);
this.startTime = currentTimeInSeconds();
nextScaleTime.set(clock.tick() + RESCALE_THRESHOLD);
} finally {
unlockForRescale();
}
}
代码示例来源:origin: undera/jmeter-plugins
@Override
public void clearData() {
startTimeRef = 0;
clearRowsFromCompositeModels(getModel().getName());
model.clear();
modelAggregate.clear();
colors.reset();
graphPanel.clearRowsTab();
updateGui();
repaint();
}
内容来源于网络,如有侵权,请联系作者删除!