Search in sources :

Example 1 with MCRProcessable

use of org.mycore.common.processing.MCRProcessable in project mycore by MyCoRe-Org.

the class MCRProcessableWebsocketSenderImpl method remove.

public synchronized Integer remove(Object object) {
    Integer id = ID_MAP.get(object);
    if (id == null) {
        return null;
    }
    ID_MAP.remove(id);
    if (object instanceof MCRProcessable) {
        PROCESSABLE_COLLECTION_MAP.remove(id);
    } else if (object instanceof MCRProcessableCollection) {
        PROCESSABLE_COLLECTION_MAP.values().removeIf(id::equals);
    }
    return id;
}
Also used : AtomicInteger(java.util.concurrent.atomic.AtomicInteger) MCRProcessable(org.mycore.common.processing.MCRProcessable) MCRProcessableCollection(org.mycore.common.processing.MCRProcessableCollection)

Aggregations

AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 MCRProcessable (org.mycore.common.processing.MCRProcessable)1 MCRProcessableCollection (org.mycore.common.processing.MCRProcessableCollection)1