Examples of BulkActivityDeleteResponse


Examples of org.eurekastreams.server.persistence.mappers.requests.BulkActivityDeleteResponse

        }

        List<String> keys = listsMapper.execute(activityIds);

        // Deletes the activities and their comments from the database
        BulkActivityDeleteResponse response = deleteMapper.execute(activityIds);

        // Put an action on the queue to delete the activities from the appropriate lists
        if (log.isInfoEnabled())
        {
            log.info("Queuing UserActionRequest for removing expired activities from index (num of ids): "
                    + response.getActivityIds().size());
        }
        // Put an action on the queue to delete the activities from search index
        inActionContext.getUserActionRequests().add(
                new UserActionRequest("deleteFromSearchIndexAction", null, new DeleteFromSearchIndexRequest(
                        Activity.class, response.getActivityIds())));

        if (log.isInfoEnabled())
        {
            log.info("Queuing UserActionRequest for removing expired activity ids from lists cache keys: " + keys);
        }
        inActionContext.getUserActionRequests().add(
                new UserActionRequest("deleteIdsFromLists", null, new DeleteIdsFromListsRequest(keys, response
                        .getActivityIds())));

        if (log.isInfoEnabled())
        {
            log.info("Queuing UserActionRequests for removing expired activity ids from cache: "
                    + response.getActivityIds().size());
        }
        // remove ALL activities from cache (low priority should we even do this?)
        generateIndividualDeleteKeyFromCacheTasks(new HashSet<String>(createKeys(CacheKeys.ACTIVITY_BY_ID, response
                .getActivityIds())), inActionContext);

        // Clean up security records.
        generateIndividualDeleteKeyFromCacheTasks(new HashSet<String>(createKeys(CacheKeys.ACTIVITY_SECURITY_BY_ID,
                response.getActivityIds())), inActionContext);

        if (log.isInfoEnabled())
        {
            log.info("Queuing UserActionRequests for removing expired activitys' comment ids from cache: "
                    + response.getCommentIds());
        }
        // remove ALL comments from cache (low priority should we even do this?)
        generateIndividualDeleteKeyFromCacheTasks(new HashSet<String>(createKeys(CacheKeys.COMMENT_BY_ID, response
                .getCommentIds())), inActionContext);

        return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.