|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.starteam.ArtifactCache
public final class ArtifactCache
An artifact cache is a collection of artifacts of different types The cache
creates and maintains a private connection to the StarTeam server, using the
credentials specified in the constructor This connection is closed when the
cache is discarded. Well behaved applications should call the
ArtifactCache.close() api. The cache manages the artifacts requested, and access
rights to these artifacts General queries may be constructed of the form Does
a given principal have the right to read (or write) to an object in this
cache Typically, the cache is built up in the context of an Administrator,
but cached objects are shared across less privileged users, depending upon
their access rights
This is a self-refreshing cache; refreshes are requested on a regular timer
With MPX enabled, the refreshes are optimized to execute the fewest possible
server commands
Note that while it is certainly reasonable and expected for the calling
application to have enabled MPX and registered the server object with a
CacheAgent, this cache itself attempts to enable MPX, if required. However,
the cache makes no attempt to auto locate a cache agent. There are two
reasons for this Auto locating a cache agent makes no guarantees about the
nearness of the cache agent. Auto location is based solely on which cache
agent responds first to a broadcast When used in the context of a web server
(the primary motif for this class) it is generally expected that the web
service application is network near to the StarTeam server. In this case, a
Cache Agent offers little to no performance benefit, and in some cases may
even cause a potential degradation in overall performance and throughput. An
application can however, explicitly locate a cache agent using
Server.locateCacheAgent(String, int)
| Method Summary | |
|---|---|
void |
cacheViewMembers(View.WebCacheView view,
ViewMember.Type.WebCacheViewMemberType type)
Caches the view members of the specified type for the specified view. |
void |
cacheViewMembers(View.WebCacheView view,
ViewMember.Type.WebCacheViewMemberType[] types)
Caches the view members of the specified types for the specified view. |
void |
cacheViewMembers(ViewMember.Type.WebCacheViewMemberType[] types)
Caches the view members of the specified types for the rolled back view. |
View.WebCacheView |
findView(User.WebCacheUser usr,
int viewID)
Returns a view cached by this artifact cache, matching the specified View ID |
DateTime |
getBaselineTime()
returns the time at which this baseline has been cached. |
DateTime |
getLastUsedAt()
Returns the time at which this Cache was last used |
ArtifactCacheManager |
getManager()
returns the artifact cache manager that owns this cache |
boolean |
isBaseline()
returns true if this is a baseline cache Baseline (rolled back) caches are historical, read only caches They are based on either a label, promotion state or historical point in time |
boolean |
isCached(View.WebCacheView view)
Returns true if this view is currently cached in this ArtifactCache Note that views may be cached and then removed (dynamic caching) and subsequently re-cached. |
boolean |
isCached(View.WebCacheView view,
ViewMember.Type.WebCacheViewMemberType type)
Returns true if the specified type is currently cached in this ArtifactCache for the specified view Note that views may be cached and then removed (dynamic caching) and subsequently re-cached. |
boolean |
isOpen()
Returns true if this artifact cache is open |
void |
remove(Project.WebCacheProject p)
Remove this project from the ArtifactCache. |
void |
remove(View.WebCacheView vw)
Close this view and remove it from the ArtifactCache. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public DateTime getLastUsedAt()
public boolean isBaseline()
public DateTime getBaselineTime()
public boolean isOpen()
public ArtifactCacheManager getManager()
public View.WebCacheView findView(User.WebCacheUser usr,
int viewID)
usr - the user in whose context the view is being requestedviewID - a viewID to search for
public boolean isCached(View.WebCacheView view)
view - the view to test for
public boolean isCached(View.WebCacheView view,
ViewMember.Type.WebCacheViewMemberType type)
view - the view to test fortype - the type to test for
public void cacheViewMembers(View.WebCacheView view,
ViewMember.Type.WebCacheViewMemberType type)
view - the view whose view members will be cachedtype - the type of view member to be cached
public void cacheViewMembers(View.WebCacheView view,
ViewMember.Type.WebCacheViewMemberType[] types)
view - the view whose view members will be cachedtypes - the types of view member to be cachedpublic void cacheViewMembers(ViewMember.Type.WebCacheViewMemberType[] types)
types - the types of view member to be cachedpublic void remove(Project.WebCacheProject p)
p - the project whose cached views and view members will be
droppedpublic void remove(View.WebCacheView vw)
vw - the view whose cached view members will be dropped
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||