/** * exports the contents of BaseRole to a primitive Map, which can be Serialized * if necessary to support Terracotta cluster caching. BaseRole cannot be serialized by * Terracotta because of classloader issues. * @return */ public SimpleRole exportToSimpleRole() { SimpleRole role = new SimpleRole(); role.setId(m_id); role.setLocks(m_locks); role.setDescription(m_description); role.setProviderOnly(m_providerOnly); role.setActive(m_active); return role; }
/** * creates a new BaseRole, based on a SimpleRole which was exported in a previous * step, in order to support distributed cluster caching. BaseRole cannot be serialized by * distributed caches because of ClassLoader issues. * @param map */ public BaseRole(SimpleRole role) { if (role != null) { m_id = role.getId(); m_locks = role.getLocks(); m_description = role.getDescription(); m_providerOnly = role.isProviderOnly(); m_active = role.isActive(); } }