/** * Empties the map. */ public void clear() { this._map.clear(); }
public void clear() { synchronized( mutex ) { m.clear(); } }
public void clear() { elements.clear(); }
private void closeAudioConnections() { TLongObjectMap<AudioManager> managerMap = getAudioManagerMap(); synchronized (managerMap) { managerMap.valueCollection().stream() .map(AudioManagerImpl.class::cast) .forEach(m -> m.closeAudioConnection(ConnectionStatus.SHUTTING_DOWN)); managerMap.clear(); } }
void reset() { updateStatus(GuildSetupController.Status.UNAVAILABLE); expectedMemberCount = 1; partialGuild = null; requestedChunk = false; requestedSync = false; if (members != null) members.clear(); if (removedMembers != null) removedMembers.clear(); cachedEvents.clear(); }
protected void invalidate() { sessionId = null; sentAuthInfo = false; locked("Interrupted while trying to invalidate chunk/sync queue", chunkSyncQueue::clear); api.getTextChannelMap().clear(); api.getVoiceChannelMap().clear(); api.getCategoryMap().clear(); api.getGuildMap().clear(); api.getUserMap().clear(); api.getPrivateChannelMap().clear(); api.getFakeUserMap().clear(); api.getFakePrivateChannelMap().clear(); api.getEventCache().clear(); api.getGuildSetupController().clearCache(); if (api.getAccountType() == AccountType.CLIENT) { JDAClientImpl client = api.asClient(); client.getRelationshipMap().clear(); client.getGroupMap().clear(); client.getCallUserMap().clear(); } }
public void clearCache() { setupNodes.clear(); chunkingGuilds.clear(); incompleteCount = 0; close(); synchronized (pendingChunks) { pendingChunks.clear(); } }
private void ensureMembers() { expectedMemberCount = partialGuild.getInt("member_count"); members = new TLongObjectHashMap<>(expectedMemberCount); removedMembers = new TLongHashSet(); JSONArray memberArray = partialGuild.getJSONArray("members"); if (memberArray.length() < expectedMemberCount && !requestedChunk) { updateStatus(GuildSetupController.Status.CHUNKING); getController().addGuildForChunking(id, join); requestedChunk = true; } else if (handleMemberChunk(memberArray) && !requestedChunk) { // Discord sent us enough members to satisfy the member_count // but we found duplicates and still didn't reach enough to satisfy the count // in this case we try to do chunking instead // This is caused by lazy guilds and intended behavior according to jake GuildSetupController.log.trace( "Received suspicious members with a guild payload. Attempting to chunk. " + "member_count: {} members: {} actual_members: {} guild_id: {}", expectedMemberCount, memberArray.length(), members.size(), id); members.clear(); updateStatus(GuildSetupController.Status.CHUNKING); getController().addGuildForChunking(id, join); requestedChunk = true; } }
/** * Empties the map. */ public void clear() { this._map.clear(); }
/** * Empties the map. */ public void clear() { this._map.clear(); }
/** * Empties the map. */ @Override public void clear() { this._map.clear(); }
/** * Empties the map. */ public void clear() { this._map.clear(); }
@Override public void clear() { cache.clear(); } }
@Override public void clear() { synchronized( mutex ) { m.clear(); } }
/** * {@inheritDoc} */ @Override public void clear() { cache.clear(); }
@Override public void clear() { cache.clear(); tailCacheEntries.clear(); }
@Override public void clear() { cache.clear(); tailEntries.clear(); } }
/** * Removes all entries from the map. */ public final void clear() { map.clear(); list.clear(); }
/** * Clears the map of Window positions to their position and size in the file, * and deletes the temporary file if it exists. */ @Override public void clear() throws IOException { windowPositions.clear(); deleteFileIfExists(); }
private void createFileIfNotExists() throws IOException { if (tempFile == null) { windowPositions.clear(); nextFilePos = 0; tempFile = tempDir == null? IOUtils.createTempFile() : IOUtils.createTempFile(tempDir); file = new RandomAccessFile(tempFile, "rw"); } }