public V remove( int key ) { synchronized( mutex ) { return m.remove( key ); } } public void putAll( Map<? extends Integer, ? extends V> map ) {
/** * Marks the specified priority request as completed, and returns the suspended Response object for the connection * that submitted the priority request (the UI), which probably still waiting to receive a result back over the * same connection. A HttpHandler thread can then pump data from the DELETE body back to the origin of the request, * without blocking the broker thread. * TODO rename to "deregisterSuspendedProducer" and "deregisterSuspendedConsumer" ? */ public synchronized Response deletePriorityTask (int taskId) { return highPriorityResponses.remove(taskId); }
/** * Deletes a key/value pair from the map. * * @param key an <code>Object</code> value * @return the removed value, or Integer(0) if it was not found in the map */ public V remove( Object key ) { int k; if ( key != null ) { if ( key instanceof Integer ) { k = unwrapKey( ( Integer ) key ); } else { return null; } } else { k = _map.getNoEntryKey(); } return _map.remove( k ); }
public void dispose(int buffer) { if (buffer != 0) { pool.add(buffer); IntBuffer dataBuffer = BufferUtils.createIntBuffer(1); dataBuffer.put(0); dataBuffer.flip(); VertexBufferObjectUtil.bufferVboData(buffer, dataBuffer, GL15.GL_STATIC_DRAW); dataBuffer.flip(); if (traceBufferUsage) { usageTracker.remove(buffer); } } }
public static <T> void shiftIntegerMapKeys(int startKey, int shift, TIntObjectMap<T> intToObject) { if (shift == 0) { return; } TIntList keysToShift = new TIntArrayList(intToObject.keys()); // Exclude anything before and including startKey for (int currentKey : keysToShift.toArray()) { if (currentKey <= startKey) { keysToShift.remove(currentKey); } } keysToShift.sort(); if (shift > 0) { // Shifting keys up, so start at the end to avoid overwriting keys. keysToShift.reverse(); } for (int currentKey : keysToShift.toArray()) { T obj = intToObject.get(currentKey); intToObject.remove(currentKey); intToObject.put(currentKey + shift, obj); } } }
void cancel0(BungeeTask task) { synchronized ( lock ) { tasks.remove( task.getId() ); tasksByPlugin.values().remove( task ); } }
protected void removeUserSSRC(long userId) { final AtomicInteger ssrcRef = new AtomicInteger(0); final boolean modified = ssrcMap.retainEntries((ssrc, id) -> { final boolean isEntry = id == userId; if (isEntry) ssrcRef.set(ssrc); // if isEntry == true we don't want to retain it return !isEntry; }); if (!modified) return; final Decoder decoder = opusDecoders.remove(ssrcRef.get()); if (decoder != null) // cleanup decoder decoder.close(); }
@Override public void shutdown(final int shardId) { final JDA jda = this.shards.getMap().remove(shardId); if (jda != null) { if (this.useShutdownNow) jda.shutdownNow(); else jda.shutdown(); } }
@Override public void restart(final int shardId) { Checks.notNegative(shardId, "shardId"); Checks.check(shardId < this.shardsTotal, "shardId must be lower than shardsTotal"); final JDA jda = this.shards.getMap().remove(shardId); if (jda != null) { if (this.useShutdownNow) jda.shutdownNow(); else jda.shutdown(); } enqueueShard(shardId); }
/** * Removed the texture in the unit, if present. * * @param unit The unit to remove the texture from */ public void removeTexture(int unit) { if (textures != null) { textures.remove(unit); } }
@Override public V remove( int key ) { synchronized( mutex ) { return m.remove( key ); } } @Override
public V remove( int key ) { synchronized( mutex ) { return m.remove( key ); } } public void putAll( Map<? extends Integer, ? extends V> map ) {
/** * {@inheritDoc} */ public int disconnect(int v) { Set<T> types = edges.remove(v); if (types != null) { int edges = types.size(); size -= edges; return edges; } return 0; }
void cancel0(BungeeTask task) { synchronized ( lock ) { tasks.remove( task.getId() ); tasksByPlugin.values().remove( task ); } }
/** * {@inheritDoc} */ public IntSet remove(int key) { IntSet v = map.remove(key); if (v != null) range -= v.size(); return v; }
/** * {@inheritDoc} */ public boolean remove(int vertex) { EdgeSet<T> edges = vertexToEdges.remove(vertex); if (edges == null) return false; // Call the internal remove method to perform the remaining // removal logic. removeInternal(vertex, edges); return true; }
@Override public synchronized void deletePage(int pageID) { // put id to empty nodes and // delete from cache super.deletePage(pageID); // delete from file countWrite(); file.remove(pageID); }
@Override public TIntCollection removeAll(int key) { return wrapped.containsKey(key) ? wrapped.remove(key) : EmptyTIntCollection.get(); } }
@Override public T put(DBIDRef id, T value) { if(value == null) { return data.remove(DBIDUtil.asInteger(id)); } return data.put(DBIDUtil.asInteger(id), value); }
private void processDeletedEvt(int tgtVecId) { if (this.reverseIndexer.containsKey(tgtVecId)) { TIntSet range = this.reverseIndexer.get(tgtVecId); TIntIterator iter = range.iterator(); while (iter.hasNext()) { int srcVecId = iter.next(); this.sorters.get(srcVecId).remove(tgtVecId); } } reverseIndexer.remove(tgtVecId); }