|
BEA Systems, Inc. | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweblogic.security.acl.DefaultGroupImpl
weblogic.security.acl.FlatGroup
Caching group implementation. Cooperates with classes that inherit from AbstractListableRealm, to provide a group implementation that remains up-to-date when its backing store changes.
FlatGroup attempts to avoid the problem of a Group object being created with a snapshot of the "real" group which is never afterwards updated. For example, if you store group information in a remote server and create a WebLogic ACL that refers to that group, the ACL will become out of date if the membership of that group ever changes on the remote server.
FlatGroup avoids that problem by maintaining its group membership in a cache, instead of a never-changing set. When the cache expires, this group implementation will query the realm that created it to obtain the most recent membership information. This query is performed by calling the FlatGroup.Source.getGroupMembers method (which is implemented by AsbtractListableRealm).
As a result of caching its membership information, a FlatGroup can occasionally become temporarily out-of-date with respect to its backing store, but this caching is necessary to maintain reasonable WebLogic Server performance.
By default, group membership information is cached for 5 minutes. If necessary, you can change this value by setting the weblogic.security.groupCacheTTL system property to the number of seconds you need (this value must be greater than zero).
AbstractListableRealm
Nested Class Summary | |
static interface |
FlatGroup.Source
Deprecated. Deprecated in WebLogic Server 7.0. |
Field Summary | |
static int |
LIFETIME_DEFAULT_SEC
Deprecated. Default cache lifetime, in seconds. |
protected Hashtable |
members
Deprecated. |
Constructor Summary | |
protected |
FlatGroup(String name,
FlatGroup.Source source)
Deprecated. Create a new group, with no membership information. |
protected |
FlatGroup(String name,
FlatGroup.Source source,
Hashtable members)
Deprecated. Create a new group, with the given membership information. |
Method Summary | |
protected boolean |
addMemberInternal(Principal principal)
Deprecated. Update this object's internal state when adding a member. |
void |
clearCache()
Deprecated. Invalidate the membership cache, which will force it to be refreshed on next use. |
protected void |
ensureFreshness()
Deprecated. Important method for implementors. |
boolean |
equals(Object obj)
Deprecated. |
static long |
getCacheTTLMillis()
Deprecated. Get the current group membership cache TTL, in milliseconds |
Hashtable |
getMembersHashtable()
Deprecated. |
protected abstract Class |
getUserClass()
Deprecated. Return the class object used by users in this realm. |
int |
hashCode()
Deprecated. |
boolean |
isMember(Principal member)
Deprecated. Returns true if the passed principal is a member of the group. |
Enumeration |
members()
Deprecated. Returns an enumeration of the members in the group. |
protected boolean |
removeMemberInternal(Principal principal)
Deprecated. Update this object's internal state when removing a member. |
protected static void |
setCacheTTL(long millis)
Deprecated. Set this group's membership cache TTL. |
String |
toString()
Deprecated. |
Methods inherited from class weblogic.security.acl.DefaultGroupImpl |
addMember, getName, removeMember |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int LIFETIME_DEFAULT_SEC
protected Hashtable members
Constructor Detail |
protected FlatGroup(String name, FlatGroup.Source source)
protected FlatGroup(String name, FlatGroup.Source source, Hashtable members)
Method Detail |
protected boolean addMemberInternal(Principal principal)
public void clearCache()
protected final void ensureFreshness()
public boolean equals(Object obj)
public static final long getCacheTTLMillis()
public Hashtable getMembersHashtable()
protected abstract Class getUserClass()
public int hashCode()
public boolean isMember(Principal member)
isMember
in interface Group
isMember
in class DefaultGroupImpl
member
- the principal whose membership is to be checked.
public Enumeration members()
members
in interface Group
members
in class DefaultGroupImpl
protected boolean removeMemberInternal(Principal principal)
protected static final void setCacheTTL(long millis)
millis
- new TTL, in milliseconds (must be positive)public String toString()
toString
in interface Principal
toString
in class DefaultGroupImpl
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs90 Copyright 2005 BEA Systems Inc. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |