/** * Called when the users asks to show or hide all known information about a certain object from * the database. * * @param user User ID * @param anchor Unique ID of Anchor * @param show If true, show more information, if false, hide information * @param type Session type (edit, query, browse) * @param key browsing session id (null if session type is EDIT) * @return AnchorInfo[] with serialisable version of feedback text, empty if the user's session is * expired or null if an error occurred */ public AnchorInfo[] changeTextContent( String user, String anchor, boolean show, int type, String key) { if (!userMap.containsKey(user)) return new AnchorInfo[0]; LiberSession session = userMap.get(user); Runtime r = Runtime.getRuntime(); r.gc(); // FORCES GARBAGE COLLECTION r.runFinalization(); synchronized (session) { session.setLastUpdated(); return session.changeTextContent(anchor, show, type, key); } }