class PceccSrTeBeHandler {

    public boolean releaseAdjacencyLabel(Link link) {
        checkNotNull(link, LINK_NULL);
        checkNotNull(labelRsrcService, LABEL_RESOURCE_SERVICE_NULL);
        checkNotNull(pceStore, PCE_STORE_NULL);
        boolean retValue = true;

        // Retrieve link label from store
        LabelResourceId labelId = pceStore.getAdjLabel(link);
        if (labelId == null) {
            log.error("Unabel to retrieve label for a link {} from store.", link.toString());
            return false;
        }

        // Device
        DeviceId srcDeviceId = link.src().deviceId();

        // Release adjacency label from device
        installAdjLabelRule(srcDeviceId, labelId, link.src().port(), link.dst().port(), Objective.Operation.REMOVE);

        // Release link label from label manager
        Multimap<DeviceId, LabelResource> release = ArrayListMultimap.create();
        DefaultLabelResource defaultLabelResource = new DefaultLabelResource(srcDeviceId, labelId);
        release.put(srcDeviceId, defaultLabelResource);
        if (!labelRsrcService.releaseToDevicePool(release)) {
            log.error("Unable to release label id {} from label manager.", labelId.toString());
            retValue = false;
        }

        // Remove adjacency label from store
        if (!pceStore.removeAdjLabel(link)) {
            log.error("Unable to remove adjacency label id {} from store.", labelId.toString());
            retValue = false;
        }
        return retValue;
    }

    private  PceccSrTeBeHandler();

}