broke out the object cache functionality; generalized ReadOnlyVector;

finally implemented background sweeps of unreferenced cache objects;
anonymous user, when viewing profiles, now sees them as if all "privacy"
flags were switched on
This commit is contained in:
Eric J. Bowersox
2001-03-26 06:11:11 +00:00
parent 15a7fa56d2
commit 7e72407b84
29 changed files with 601 additions and 233 deletions

View File

@@ -19,6 +19,7 @@ package com.silverwrist.venice.security;
import java.sql.*;
import java.util.*;
import com.silverwrist.util.collections.*;
import com.silverwrist.venice.db.SQLUtil;
import com.silverwrist.venice.core.AuditData;
import com.silverwrist.venice.core.DataException;
@@ -26,43 +27,6 @@ import com.silverwrist.venice.core.InternalStateError;
public class AuditRecord implements AuditData
{
/*--------------------------------------------------------------------------------
* Private implementation of ReadOnlyVector
*--------------------------------------------------------------------------------
*/
static class ReadOnlyVector extends AbstractList
{
private Vector my_vec; // local vector
ReadOnlyVector(Vector vec)
{
my_vec = vec;
my_vec.trimToSize();
} // end constructor
protected void finalize() throws Throwable
{
my_vec = null;
super.finalize();
} // end finalize
public Object get(int index)
{
return my_vec.elementAt(index);
} // end get
public int size()
{
return my_vec.size();
} // end size
} // end class ReadOnlyVector
/*--------------------------------------------------------------------------------
* Internal class for caching description strings on load
*--------------------------------------------------------------------------------

View File

@@ -85,12 +85,6 @@ public class Capability implements SecLevels
} // end showHiddenSIGMembers
public static boolean canCreateSIG(int level)
{
return (level>=GLOBAL_NORMAL);
} // end canCreateSIG
public static boolean hideHiddenConferences(int level)
{
return (level<SIG_ANYADMIN);

View File

@@ -18,46 +18,10 @@
package com.silverwrist.venice.security;
import java.util.*;
import com.silverwrist.util.collections.*;
public class Role implements Comparable, SecLevels
{
/*--------------------------------------------------------------------------------
* Private implementation of ReadOnlyVector
*--------------------------------------------------------------------------------
*/
static class ReadOnlyVector extends AbstractList
{
private Vector my_vec; // local vector
ReadOnlyVector(Vector vec)
{
my_vec = vec;
my_vec.trimToSize();
} // end constructor
protected void finalize() throws Throwable
{
my_vec = null;
super.finalize();
} // end finalize
public Object get(int index)
{
return my_vec.elementAt(index);
} // end get
public int size()
{
return my_vec.size();
} // end size
} // end class ReadOnlyVector
/*--------------------------------------------------------------------------------
* Static data members
*--------------------------------------------------------------------------------