Class MultiBinaryLongMap.SafeBinaryLongMap

    • Field Detail

      • f_lockShared

        protected final Lock f_lockShared
        The shared lock.
      • f_lockExclusive

        protected final Lock f_lockExclusive
        The exclusive lock.
    • Constructor Detail

      • SafeBinaryLongMap

        public SafeBinaryLongMap​(BinaryLongMap blm,
                                 Lock lockShared,
                                 Lock lockExclusive)
        Construct a SafeBinaryLongMap around the specified map, protected by the specified locks.

        It is assumed that the specified locks have the following reentrant properties:

        • a thread holding one or both of the locks may reacquire those locks (and must release them accordingly)
        • a thread holding the exclusive lock may acquire the shared lock (but not vice-versa).

        Parameters:
        blm - the underlying BinaryLongMap
        lockShared - the lock to acquire for shared access
        lockExclusive - the lock to acquire for exclusive access