(replicas int, fn Hash)
| 33 | } |
| 34 | |
| 35 | func New(replicas int, fn Hash) *Map { |
| 36 | m := &Map{ |
| 37 | replicas: replicas, |
| 38 | hash: fn, |
| 39 | hashMap: make(map[int]string), |
| 40 | } |
| 41 | if m.hash == nil { |
| 42 | m.hash = crc32.ChecksumIEEE |
| 43 | } |
| 44 | return m |
| 45 | } |
| 46 | |
| 47 | // IsEmpty returns true if there are no items available. |
| 48 | func (m *Map) IsEmpty() bool { |
no outgoing calls