-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Invalidate sessions on password change (#5994)
- Loading branch information
1 parent
4151d2b
commit dbae26e
Showing
6 changed files
with
138 additions
and
20 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
api/src/org/labkey/api/collections/ConcurrentSetValuedMap.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.labkey.api.collections; | ||
|
||
import org.apache.commons.collections4.multimap.AbstractSetValuedMap; | ||
|
||
import java.util.Collections; | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
import java.util.concurrent.ConcurrentHashMap; | ||
|
||
// A concurrent multivalued map that's appropriate when each key is mapped to a small number of values | ||
public class ConcurrentSetValuedMap<K, V> extends AbstractSetValuedMap<K, V> | ||
{ | ||
public ConcurrentSetValuedMap() | ||
{ | ||
super(new ConcurrentHashMap<>()); | ||
} | ||
|
||
@Override | ||
protected Set<V> createCollection() | ||
{ | ||
// Be sure to review all usages of ConcurrentSetValuedMap before changing this implementation. Callers | ||
// currently expect the behavior of synchronizedSet(). | ||
return Collections.synchronizedSet(new HashSet<>(5)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters