@Test public void removeEntityTest() { portletEntityCache.storeEntity(portletEntityDescriptor); IPortletEntityDescriptor _result = portletEntityCache.getEntity("u18l1n1203", 60); assertNotNull(_result); portletEntityCache.removeEntity(portletEntityId); IPortletEntityDescriptor _result1 = portletEntityCache.getEntity("u18l1n1203", 60); assertNull(_result1); }
public void removeEntity(IPortletEntityId portletEntityId) { writeLock.lock(); try { final T entity = this.entitiesById.remove(portletEntityId); if (entity != null) { final int userId = entity.getUserId(); final String layoutNodeId = entity.getLayoutNodeId(); final SubscribeKey subscribeKey = new SubscribeKey(userId, layoutNodeId); this.entitiesBySubscribeKey.remove(subscribeKey); } } finally { writeLock.unlock(); } }
PortletEntityCache implements Serializable { public void removeEntity(IPortletEntityId portletEntityId) { writeLock.lock(); try { final T entity = this.entitiesById.remove(portletEntityId); if (entity != null) { final int userId = entity.getUserId(); final String layoutNodeId = entity.getLayoutNodeId(); final SubscribeKey subscribeKey = new SubscribeKey(userId, layoutNodeId); this.entitiesBySubscribeKey.remove(subscribeKey); } } finally { writeLock.unlock(); } } }
PortletEntityCache implements Serializable { public void removeEntity(IPortletEntityId portletEntityId) { writeLock.lock(); try { final T entity = this.entitiesById.remove(portletEntityId); if (entity != null) { final int userId = entity.getUserId(); final String layoutNodeId = entity.getLayoutNodeId(); final SubscribeKey subscribeKey = new SubscribeKey(userId, layoutNodeId); this.entitiesBySubscribeKey.remove(subscribeKey); } } finally { writeLock.unlock(); } } PortletEntityCache();  PortletEntityCache(boolean threadSafe); }
PortletEntityCache implements Serializable { public void removeEntity(IPortletEntityId portletEntityId) { writeLock.lock(); try { final T entity = this.entitiesById.remove(portletEntityId); if (entity != null) { final int userId = entity.getUserId(); final String layoutNodeId = entity.getLayoutNodeId(); final SubscribeKey subscribeKey = new SubscribeKey(userId, layoutNodeId); this.entitiesBySubscribeKey.remove(subscribeKey); } } finally { writeLock.unlock(); } } PortletEntityCache();  PortletEntityCache(boolean threadSafe); T storeIfAbsentEntity(
            IPortletEntityId portletEntityId, Function<IPortletEntityId, T> entityCreator); T storeIfAbsentEntity(T entity); void storeEntity(T entity); T getEntity(String layoutNodeId, int userId); T getEntity(IPortletEntityId portletEntityId); void removeEntity(IPortletEntityId portletEntityId); }
PortletEntityCache implements Serializable { public void removeEntity(IPortletEntityId portletEntityId) { writeLock.lock(); try { final T entity = this.entitiesById.remove(portletEntityId); if (entity != null) { final int userId = entity.getUserId(); final String layoutNodeId = entity.getLayoutNodeId(); final SubscribeKey subscribeKey = new SubscribeKey(userId, layoutNodeId); this.entitiesBySubscribeKey.remove(subscribeKey); } } finally { writeLock.unlock(); } } PortletEntityCache();  PortletEntityCache(boolean threadSafe); T storeIfAbsentEntity(
            IPortletEntityId portletEntityId, Function<IPortletEntityId, T> entityCreator); T storeIfAbsentEntity(T entity); void storeEntity(T entity); T getEntity(String layoutNodeId, int userId); T getEntity(IPortletEntityId portletEntityId); void removeEntity(IPortletEntityId portletEntityId);  }