Tabnine Logo
SortedArrayStringMap.assertNoConcurrentModification
Code IndexAdd Tabnine to your IDE (free)

How to use
assertNoConcurrentModification
method
in
org.apache.logging.log4j.util.SortedArrayStringMap

Best Java code snippets using org.apache.logging.log4j.util.SortedArrayStringMap.assertNoConcurrentModification (Showing top 8 results out of 315)

origin: org.apache.logging.log4j/log4j-api

@Override
public void clear() {
  if (keys == EMPTY) {
    return;
  }
  assertNotFrozen();
  assertNoConcurrentModification();
  Arrays.fill(keys, 0, size, null);
  Arrays.fill(values, 0, size, null);
  size = 0;
}
origin: org.apache.logging.log4j/log4j-api

@Override
public void remove(final String key) {
  if (keys == EMPTY) {
    return;
  }
  final int index = indexOfKey(key);
  if (index >= 0) {
    assertNotFrozen();
    assertNoConcurrentModification();
    System.arraycopy(keys, index + 1, keys, index, size - 1 - index);
    System.arraycopy(values, index + 1, values, index, size - 1 - index);
    keys[size - 1] = null;
    values[size - 1] = null;
    size--;
  }
}
origin: org.apache.logging.log4j/log4j-api

@Override
public void putValue(final String key, final Object value) {
  assertNotFrozen();
  assertNoConcurrentModification();
  if (keys == EMPTY) {
    inflateTable(threshold);
  }
  final int index = indexOfKey(key);
  if (index >= 0) {
    keys[index] = key;
    values[index] = value;
  } else { // not found, so insert.
    insertAt(~index, key, value);
  }
}
origin: org.apache.logging.log4j/log4j-api

@Override
public void putAll(final ReadOnlyStringMap source) {
  if (source == this || source == null || source.isEmpty()) {
    // this.putAll(this) does not modify this collection
    // this.putAll(null) does not modify this collection
    // this.putAll(empty ReadOnlyStringMap) does not modify this collection
    return;
  }
  assertNotFrozen();
  assertNoConcurrentModification();
  if (source instanceof SortedArrayStringMap) {
    if (this.size == 0) {
      initFrom0((SortedArrayStringMap) source);
    } else {
      merge((SortedArrayStringMap) source);
    }
  } else if (source != null) {
    source.forEach(PUT_ALL, this);
  }
}
origin: ops4j/org.ops4j.pax.logging

@Override
public void clear() {
  if (keys == EMPTY) {
    return;
  }
  assertNotFrozen();
  assertNoConcurrentModification();
  Arrays.fill(keys, 0, size, null);
  Arrays.fill(values, 0, size, null);
  size = 0;
}
origin: ops4j/org.ops4j.pax.logging

@Override
public void remove(final String key) {
  if (keys == EMPTY) {
    return;
  }
  final int index = indexOfKey(key);
  if (index >= 0) {
    assertNotFrozen();
    assertNoConcurrentModification();
    System.arraycopy(keys, index + 1, keys, index, size - 1 - index);
    System.arraycopy(values, index + 1, values, index, size - 1 - index);
    keys[size - 1] = null;
    values[size - 1] = null;
    size--;
  }
}
origin: ops4j/org.ops4j.pax.logging

@Override
public void putValue(final String key, final Object value) {
  assertNotFrozen();
  assertNoConcurrentModification();
  if (keys == EMPTY) {
    inflateTable(threshold);
  }
  final int index = indexOfKey(key);
  if (index >= 0) {
    keys[index] = key;
    values[index] = value;
  } else { // not found, so insert.
    insertAt(~index, key, value);
  }
}
origin: ops4j/org.ops4j.pax.logging

@Override
public void putAll(final ReadOnlyStringMap source) {
  if (source == this || source == null || source.isEmpty()) {
    // this.putAll(this) does not modify this collection
    // this.putAll(null) does not modify this collection
    // this.putAll(empty ReadOnlyStringMap) does not modify this collection
    return;
  }
  assertNotFrozen();
  assertNoConcurrentModification();
  if (source instanceof SortedArrayStringMap) {
    if (this.size == 0) {
      initFrom0((SortedArrayStringMap) source);
    } else {
      merge((SortedArrayStringMap) source);
    }
  } else if (source != null) {
    source.forEach(PUT_ALL, this);
  }
}
org.apache.logging.log4j.utilSortedArrayStringMapassertNoConcurrentModification

Popular methods of SortedArrayStringMap

  • <init>
  • putValue
  • getKeyAt
  • getValueAt
  • indexOfKey
  • size
  • assertNotFrozen
  • ceilingNextPowerOfTwo
    Calculate the next power of 2, greater than or equal to x. From Hacker's Delight, Chapter 3, Harry S
  • ensureCapacity
  • handleSerializationException
  • hashCode
  • inflateTable
    Inflates the table.
  • hashCode,
  • inflateTable,
  • initFrom0,
  • insertAt,
  • marshall,
  • merge,
  • nullKeyIndex,
  • putAll,
  • resize

Popular in Java

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • getSystemService (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now