com.sas.edir
Interface Caching

All Known Subinterfaces:
Application, Archive, CatalogEntry, Channel, Column, Content, ContentChannel, ContentDocument, ContentItem, Cube, DeliveryUser, Dimension, EnterpriseDirectory, Entity, EntityCollection, EntityList, ExternalFile, FilteredEntityCollection, Group, Hierarchy, KeywordEntity, KeywordEntityCollection, Library, Link, Login, Map, Mddb, Profile, Server, StaticEntityCollection, StoredProcess, StoredProcessPath, StoredProcessResult, Subscriber, Table, User, WarehouseGroup, WarehouseView, WebEisDocument, Widget

public interface Caching

Caching provides a common interface for classes whose data has a limited useful lifetime.

Version:
1.0
Author:
SAS

Method Summary
 void edirUpdateStore()
          Update the persistent store from changes made to the current data.
 long getTimeToLive()
          Returns the time to live for data cached by this object.
 boolean isExpired()
          Return a flag indicating whether this object is due to refresh from the data source.
 boolean refreshCache()
          Recursively refresh cached objects.
 boolean refreshCachedObjects(EnterpriseDirectoryAttributes attributes)
          Refresh cache.
 void releaseCache()
          Release cached objects.
 void setDirty()
          Mark the data in the object as requiring a refresh from the data source.
 void setTimeToLive(long seconds)
          Sets the time to live for data cached by this object.
 void setTimeToLive(java.lang.String seconds)
          Sets the time to live for data cached by this object.
 void updateStore()
          Update the persistent store from changes made to the current data.
 

Method Detail

refreshCache

public boolean refreshCache()
Recursively refresh cached objects.

An entities cache can be thought of as a container holding objects. As the objects in this entities cache are being refreshed, recursivley ask those object to refresh their own caches.

Returns:
true if the cache changed, false otherwise.

refreshCachedObjects

public boolean refreshCachedObjects(EnterpriseDirectoryAttributes attributes)
Refresh cache. Forces the entities data to be set from the provided Attributes.

Parameters:
attributes - The attributes for the entity.
Returns:
true if the entity changed, false otherwise.

releaseCache

public void releaseCache()
Release cached objects.

updateStore

public void updateStore()
                 throws EnterpriseDirectoryException
Update the persistent store from changes made to the current data.

Throws:
NamingException - Thrown for enterprise directory failure.

edirUpdateStore

public void edirUpdateStore()
                     throws EnterpriseDirectoryException
Update the persistent store from changes made to the current data.

Throws:
EnterpriseDirectoryException - Thrown for enterprise directory failure.

setDirty

public void setDirty()
Mark the data in the object as requiring a refresh from the data source.

isExpired

public boolean isExpired()
Return a flag indicating whether this object is due to refresh from the data source.

getTimeToLive

public long getTimeToLive()
Returns the time to live for data cached by this object.

Returns:
The number of seconds this object's data should be considered valid.

setTimeToLive

public void setTimeToLive(long seconds)
Sets the time to live for data cached by this object.

Parameters:
seconds - The number of seconds this object's data should be considered valid.

setTimeToLive

public void setTimeToLive(java.lang.String seconds)
Sets the time to live for data cached by this object.

Parameters:
seconds - The number of seconds this object's data should be considered valid.