Class CachedRelationshipStorage
java.lang.Object
org.exoplatform.social.core.storage.cache.CachedRelationshipStorage
- All Implemented Interfaces:
org.exoplatform.social.core.storage.api.RelationshipStorage
public class CachedRelationshipStorage
extends Object
implements org.exoplatform.social.core.storage.api.RelationshipStorage
Cache support for RelationshipStorage.
-
Constructor Summary
ConstructorsConstructorDescriptionCachedRelationshipStorage(RDBMSRelationshipStorageImpl storage, org.exoplatform.social.core.storage.api.IdentityStorage identityStorage, SocialStorageCacheService cacheService) -
Method Summary
Modifier and TypeMethodDescriptionvoidWhen enable/disable an user, we need to clear all cache associated to suggestion and relationshipList<org.exoplatform.social.core.identity.model.Identity> getConnections(org.exoplatform.social.core.identity.model.Identity identity) List<org.exoplatform.social.core.identity.model.Identity> getConnections(org.exoplatform.social.core.identity.model.Identity identity, long offset, long limit) List<org.exoplatform.social.core.identity.model.Identity> getConnectionsByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit) intgetConnectionsCount(org.exoplatform.social.core.identity.model.Identity identity) intgetConnectionsCountByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter) intgetConnectionsInCommonCount(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2) List<org.exoplatform.social.core.identity.model.Identity> getIncomingByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit) intgetIncomingCountByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter) List<org.exoplatform.social.core.identity.model.Identity> getIncomingRelationships(org.exoplatform.social.core.identity.model.Identity receiver, long offset, long limit) intgetIncomingRelationshipsCount(org.exoplatform.social.core.identity.model.Identity receiver) List<org.exoplatform.social.core.identity.model.Identity> getLastConnections(org.exoplatform.social.core.identity.model.Identity identity, int limit) List<org.exoplatform.social.core.identity.model.Identity> getOutgoingByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit) intgetOutgoingCountByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter) List<org.exoplatform.social.core.identity.model.Identity> getOutgoingRelationships(org.exoplatform.social.core.identity.model.Identity sender, long offset, long limit) intgetOutgoingRelationshipsCount(org.exoplatform.social.core.identity.model.Identity sender) List<org.exoplatform.social.core.relationship.model.Relationship> getReceiverRelationships(org.exoplatform.social.core.identity.model.Identity receiver, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> listCheckIdentity) org.exoplatform.social.core.relationship.model.RelationshipgetRelationship(String uuid) org.exoplatform.social.core.relationship.model.RelationshipgetRelationship(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2) List<org.exoplatform.social.core.identity.model.Identity> getRelationships(org.exoplatform.social.core.identity.model.Identity identity, long offset, long limit) List<org.exoplatform.social.core.relationship.model.Relationship> getRelationships(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> listCheckIdentity) List<org.exoplatform.social.core.relationship.model.Relationship> getRelationshipsByStatus(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, long offset, long limit) intgetRelationshipsCount(org.exoplatform.social.core.identity.model.Identity identity) intgetRelationshipsCountByStatus(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type) List<org.exoplatform.social.core.relationship.model.Relationship> getSenderRelationships(String senderId, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> listCheckIdentity) List<org.exoplatform.social.core.relationship.model.Relationship> getSenderRelationships(org.exoplatform.social.core.identity.model.Identity sender, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> listCheckIdentity) getSuggestions(org.exoplatform.social.core.identity.model.Identity identity, int maxConnections, int maxConnectionsToLoad, int maxSuggestions) booleanhasRelationship(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2, String relationshipPath) voidremoveRelationship(org.exoplatform.social.core.relationship.model.Relationship relationship) org.exoplatform.social.core.relationship.model.RelationshipsaveRelationship(org.exoplatform.social.core.relationship.model.Relationship relationship)
-
Constructor Details
-
CachedRelationshipStorage
public CachedRelationshipStorage(RDBMSRelationshipStorageImpl storage, org.exoplatform.social.core.storage.api.IdentityStorage identityStorage, SocialStorageCacheService cacheService)
-
-
Method Details
-
clearAllRelationshipCache
public void clearAllRelationshipCache()When enable/disable an user, we need to clear all cache associated to suggestion and relationship -
saveRelationship
public org.exoplatform.social.core.relationship.model.Relationship saveRelationship(org.exoplatform.social.core.relationship.model.Relationship relationship) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
saveRelationshipin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
removeRelationship
public void removeRelationship(org.exoplatform.social.core.relationship.model.Relationship relationship) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
removeRelationshipin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getRelationship
public org.exoplatform.social.core.relationship.model.Relationship getRelationship(String uuid) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getRelationshipin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getSenderRelationships
public List<org.exoplatform.social.core.relationship.model.Relationship> getSenderRelationships(org.exoplatform.social.core.identity.model.Identity sender, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> listCheckIdentity) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getSenderRelationshipsin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getSenderRelationships
public List<org.exoplatform.social.core.relationship.model.Relationship> getSenderRelationships(String senderId, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> listCheckIdentity) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getSenderRelationshipsin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getReceiverRelationships
public List<org.exoplatform.social.core.relationship.model.Relationship> getReceiverRelationships(org.exoplatform.social.core.identity.model.Identity receiver, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> listCheckIdentity) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getReceiverRelationshipsin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getRelationship
public org.exoplatform.social.core.relationship.model.Relationship getRelationship(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getRelationshipin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
hasRelationship
public boolean hasRelationship(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2, String relationshipPath) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
hasRelationshipin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getRelationships
public List<org.exoplatform.social.core.relationship.model.Relationship> getRelationships(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> listCheckIdentity) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getRelationshipsin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getRelationships
public List<org.exoplatform.social.core.identity.model.Identity> getRelationships(org.exoplatform.social.core.identity.model.Identity identity, long offset, long limit) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getRelationshipsin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getIncomingRelationships
public List<org.exoplatform.social.core.identity.model.Identity> getIncomingRelationships(org.exoplatform.social.core.identity.model.Identity receiver, long offset, long limit) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getIncomingRelationshipsin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getIncomingRelationshipsCount
public int getIncomingRelationshipsCount(org.exoplatform.social.core.identity.model.Identity receiver) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getIncomingRelationshipsCountin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getOutgoingRelationships
public List<org.exoplatform.social.core.identity.model.Identity> getOutgoingRelationships(org.exoplatform.social.core.identity.model.Identity sender, long offset, long limit) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getOutgoingRelationshipsin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getOutgoingRelationshipsCount
public int getOutgoingRelationshipsCount(org.exoplatform.social.core.identity.model.Identity sender) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getOutgoingRelationshipsCountin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getRelationshipsCount
public int getRelationshipsCount(org.exoplatform.social.core.identity.model.Identity identity) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getRelationshipsCountin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getConnections
public List<org.exoplatform.social.core.identity.model.Identity> getConnections(org.exoplatform.social.core.identity.model.Identity identity, long offset, long limit) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getConnectionsin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getConnections
public List<org.exoplatform.social.core.identity.model.Identity> getConnections(org.exoplatform.social.core.identity.model.Identity identity) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getConnectionsin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getConnectionsCount
public int getConnectionsCount(org.exoplatform.social.core.identity.model.Identity identity) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getConnectionsCountin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getConnectionsByFilter
public List<org.exoplatform.social.core.identity.model.Identity> getConnectionsByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getConnectionsByFilterin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getIncomingByFilter
public List<org.exoplatform.social.core.identity.model.Identity> getIncomingByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getIncomingByFilterin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getOutgoingByFilter
public List<org.exoplatform.social.core.identity.model.Identity> getOutgoingByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getOutgoingByFilterin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getConnectionsCountByFilter
public int getConnectionsCountByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getConnectionsCountByFilterin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getIncomingCountByFilter
public int getIncomingCountByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getIncomingCountByFilterin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getOutgoingCountByFilter
public int getOutgoingCountByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getOutgoingCountByFilterin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getSuggestions
public Map<org.exoplatform.social.core.identity.model.Identity,Integer> getSuggestions(org.exoplatform.social.core.identity.model.Identity identity, int maxConnections, int maxConnectionsToLoad, int maxSuggestions) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getSuggestionsin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getLastConnections
public List<org.exoplatform.social.core.identity.model.Identity> getLastConnections(org.exoplatform.social.core.identity.model.Identity identity, int limit) throws org.exoplatform.social.core.storage.RelationshipStorageException - Specified by:
getLastConnectionsin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage- Throws:
org.exoplatform.social.core.storage.RelationshipStorageException
-
getRelationshipsByStatus
public List<org.exoplatform.social.core.relationship.model.Relationship> getRelationshipsByStatus(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, long offset, long limit) - Specified by:
getRelationshipsByStatusin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage
-
getRelationshipsCountByStatus
public int getRelationshipsCountByStatus(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type) - Specified by:
getRelationshipsCountByStatusin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage
-
getConnectionsInCommonCount
public int getConnectionsInCommonCount(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2) - Specified by:
getConnectionsInCommonCountin interfaceorg.exoplatform.social.core.storage.api.RelationshipStorage
-