Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set contains a collection of data elements stored in a hash set. All exported methods manipulating the hash set in Set are concurrency safe.
func (*Set) Add ¶
Add adds item to the hash set. This method is concurrency safe. Add returns false if item could not be added to the hash set as it is in the process of being deleted.
func (*Set) Delete ¶
Delete removes item from the hash set if it is contained. This method is concurrency safe. Returns true if item was contained
func (*Set) GetAll ¶
GetAll returns a slice of all elements contained in the hash set. If the hash set is in the process of being deleted GetAll return an empty slice
func (*Set) GetAllAndDelete ¶
GetAllAndDelete returns a slice of all elements contained in the hash set and sets the isDeleted flag such that no methods will access this hash set anymore in the future. If the hash set is already in the process of being deleted GetAllAndDelete return an empty slice.