Skip to content

Commit

Permalink
Refactored and cleaned up Javadoc.
Browse files Browse the repository at this point in the history
  • Loading branch information
John Blum committed Apr 17, 2014
1 parent e6066d6 commit dc289b4
Show file tree
Hide file tree
Showing 124 changed files with 251 additions and 267 deletions.
Expand Up @@ -20,9 +20,8 @@
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
* Hello World startup class.
* Bootstraps the Spring container which in turns starts GemFire and the actual application.
* <p/>
* Hello World startup class. Bootstraps the Spring container which in turns starts GemFire and the actual application.
*
* Accepts as optional parameters location of one (or multiple) application contexts that will
* be used for configuring the Spring container. See the reference documentation for more
* {@link http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/resources.html information}.
Expand Down
Expand Up @@ -23,7 +23,7 @@
/**
* The ClientRegionShortcutConverter class is a Spring Converter implementation converting String value Client Region
* Shortcut representations into actual GemFire ClientRegionShortcut enumerated values.
* <p/>
*
* @author John Blum
* @see org.springframework.core.convert.converter.Converter
* @see com.gemstone.gemfire.cache.client.ClientRegionShortcut
Expand All @@ -35,7 +35,7 @@ public class ClientRegionShortcutConverter implements Converter<String, ClientRe
/**
* Converts the String value to upper case, trimming all whitespace. This method guards against null values
* and returns the "null" String if value is null.
* <p/>
*
* @param value the String to convert to a trimmed, upper case value.
* @return a trimmed, upper case value of the specified String, or "null" if the String value reference is null.
* @see java.lang.String#toUpperCase()
Expand All @@ -49,7 +49,7 @@ protected static String toUpperCase(final String value) {
/**
* Converts the source String representation of a Client Region Shortcut into a ClientRegionShortcut enumerated
* value.
* <p/>
*
* @param source the String representation of the Client Region Shortcut to convert.
* @return a ClientRegionShortcut enumerated value for the String representation.
* @throws IllegalArgumentException if the String source is not a valid ClientRegionShortcut enumerated value.
Expand Down
Expand Up @@ -32,7 +32,7 @@

/**
* FactoryBean for creating a GemFire DiskStore.
* <p/>
*
* @author David Turanski
* @author John Blum
* @see org.springframework.beans.factory.BeanNameAware
Expand All @@ -42,8 +42,6 @@
@SuppressWarnings("unused")
public class DiskStoreFactoryBean implements FactoryBean<DiskStore>, InitializingBean, BeanNameAware {

private DiskStoreFactory diskStoreFactory;

private Boolean allowForceCompaction;
private Boolean autoCompact;

Expand Down Expand Up @@ -81,7 +79,7 @@ public void afterPropertiesSet() throws Exception {
Assert.state(cache != null, String.format("A reference to the GemFire Cache must be set for Disk Store '%1$s'.",
getName()));

diskStoreFactory = cache.createDiskStoreFactory();
DiskStoreFactory diskStoreFactory = cache.createDiskStoreFactory();

if (allowForceCompaction != null) {
diskStoreFactory.setAllowForceCompaction(allowForceCompaction);
Expand Down
Expand Up @@ -27,7 +27,7 @@

/**
* Base class for GemfireTemplate and GemfireInterceptor, defining common properties such as {@link Region}.
* <p/>
*
* Not intended to be used directly.
*
* @author Costin Leau
Expand Down Expand Up @@ -73,7 +73,6 @@ public DataAccessException convertGemFireAccessException(GemFireException ex) {
* is called only for GemFire querying exception that do <b>NOT</b> extend from GemFire exception.
* May be overridden in subclasses.
*
* @see com.gemstone.gemfire.cache.query.CqInvalidException
* @param ex GemFireException that occurred
* @return the corresponding DataAccessException instance
*/
Expand All @@ -98,4 +97,4 @@ public DataAccessException convertGemFireQueryException(RuntimeException ex) {
public void setRegion(Region<?, ?> region) {
this.region = region;
}
}
}
Expand Up @@ -43,7 +43,7 @@
* and aliases of the bean (so the same "registry" can be used for storing multiple BeanFactories).
* If there is only one BeanFactory registered then a null value can be used with {@link #setBeanName(String)}.
*
* <p/> In most cases, one does not need to use this class directly as it is used internally
* In most cases, one does not need to use this class directly as it is used internally
* by {@link com.gemstone.gemfire.cache.CacheFactory}.
*
* @author Costin Leau
Expand Down Expand Up @@ -161,4 +161,4 @@ public void setBeanName(String name) {
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
this.beanFactory = beanFactory;
}
}
}
Expand Up @@ -32,7 +32,7 @@ public interface GemfireCallback<T> {
/**
* Gets called by {@link GemfireTemplate#execute(GemfireCallback)}. Does not need to care about handling transactions
* or exceptions.
* <p/>
*
* Allows for returning a result object created within the callback, i.e. a domain object or a collection of domain
* objects. A thrown custom RuntimeException is treated as an application exception: It gets propagated to the caller
* of the template.
Expand Down
Expand Up @@ -71,10 +71,10 @@ public interface GemfireOperations {
/**
* Executes a GemFire query with the given (optional) parameters and returns the result. Note this method expects the query to return multiple results; for queries that return only one
* element use {@link #findUnique(String, Object...)}.
* <p/>
*
* As oppose, to the {@link #query(String)} method, this method allows for more generic queries (against multiple regions even) to be executed.
*
* <p/>Note that the local query service is used if the region is configured as a client without any pool configuration or server connectivity - otherwise the query service on the default pool
* Note that the local query service is used if the region is configured as a client without any pool configuration or server connectivity - otherwise the query service on the default pool
* is being used.
*
* @see QueryService#newQuery(String)
Expand All @@ -90,10 +90,10 @@ public interface GemfireOperations {
/**
* Executes a GemFire query with the given (optional) parameters and returns the result. Note this method expects the query to return a single result; for queries that return multiple
* elements use {@link #find(String, Object...)}.
* <p/>
*
* As oppose, to the {@link #query(String)} method, this method allows for more generic queries (against multiple regions even) to be executed.
*
* <p/>Note that the local query service is used if the region is configured as a client without any pool configuration or server connectivity - otherwise the query service on the default pool
* Note that the local query service is used if the region is configured as a client without any pool configuration or server connectivity - otherwise the query service on the default pool
* is being used.
*
* @see QueryService#newQuery(String)
Expand All @@ -118,4 +118,4 @@ public interface GemfireOperations {
*/
public abstract <T> T execute(GemfireCallback<T> action, boolean exposeNativeRegion) throws DataAccessException;

}
}
Expand Up @@ -45,7 +45,7 @@
* {@link GemFireException} into Spring {@link DataAccessException}, following the <tt>org.springframework.dao</tt>
* exception hierarchy.
*
* <p/>
*
* The central method is <tt>execute</tt>, supporting GemFire access code implementing the GemfireCallback interface.
* It provides dedicated handling such that neither the GemfireCallback implementation nor the calling code needs to
* explicitly care about handling {@link Region} life-cycle exceptions.
Expand Down Expand Up @@ -433,4 +433,4 @@ else if (method.getName().equals("close")) {
}
}
}
}
}
Expand Up @@ -226,7 +226,7 @@ public <K, V> void setRegion(Region<K, V> region) {
* objects (default) it manages. While copies imply additional work for
* every fetch operation, direct references can cause dirty reads across
* concurrent threads in the same VM, whether or not transactions are used.
* <p/>
*
* One could explicitly deep copy objects before making changes (for example
* by using {@link com.gemstone.gemfire.CopyHelper#copy(Object)} in which
* case this setting can be set to <code>false</code>. However, unless there
Expand Down Expand Up @@ -280,4 +280,4 @@ public void setRollbackOnly() {
rollbackOnly = true;
}
}
}
}
Expand Up @@ -26,7 +26,7 @@
/**
* The GemfireUtils class is a utility class encapsulating common functionality to access features and capabilities
* of GemFire based on version and other configuration meta-data.
* <p/>
*
* @author John Blum
* @since 1.3.3
*/
Expand Down
Expand Up @@ -37,8 +37,9 @@
/**
* The LazyWiringDeclarableSupport class is an implementation of the GemFire Declarable interface that enables support
* for wiring GemFire components with Spring bean dependencies defined in the Spring context.
* <p/>
*
* @author John Blum
* @see java.util.Properties
* @see org.springframework.beans.factory.DisposableBean
* @see org.springframework.context.ApplicationListener
* @see org.springframework.context.event.ContextRefreshedEvent
Expand All @@ -65,7 +66,7 @@ public abstract class LazyWiringDeclarableSupport implements ApplicationListener
* SpringContextBootstrappingInitializer to receive notification when the Spring context is created and initialized
* (refreshed) by GemFire in order for this Declarable component to be configured and properly initialized with any
* required Spring bean dependencies.
* <p/>
*
* @see org.springframework.data.gemfire.support.SpringContextBootstrappingInitializer
* #register(org.springframework.context.ApplicationListener)
*/
Expand All @@ -78,7 +79,7 @@ public LazyWiringDeclarableSupport() {
* after GemFire has constructed this Declarable object during startup. It is recommended that this method
* be called in any GemFire CacheCallback/Declarable object operational method (e.g. CacheLoader.load(..))
* before use in order to ensure that this Declarable was properly constructed, configured and initialized.
* <p/>
*
* @throws IllegalStateException if the Declarable object has not been properly configured or initialized
* by the Spring container.
* @see #init(java.util.Properties)
Expand All @@ -94,7 +95,7 @@ protected void assertInitialized() {
* Performs the actual configuration and initialization of this Declarable object before use. This method
* is triggered by an ApplicationEvent (specifically, the ContextRefreshedEvent) indicating that the Spring context
* has been created and refreshed.
* <p/>
*
* @param beanFactory the ConfigurableListableBeanFactory used to configure and initialize this Declarable GemFire
* component.
* @param parameters Properties instance containing the parameters from GemFire's configuration file
Expand Down Expand Up @@ -139,7 +140,7 @@ protected void assertInitialized() {
/**
* Default no operation method performed post initialization of this Declarable GemFire component to be overridden
* by subclasses for application specific extension and behavior.
* <p/>
*
* @param parameters Properties instance containing the parameters from GemFire's configuration file
* (e.g. cache.xml) to configure and initialize this Declarable object.
* @see #doInit(org.springframework.beans.factory.config.ConfigurableListableBeanFactory, java.util.Properties)
Expand All @@ -150,7 +151,7 @@ protected void doPostInit(final Properties parameters) {
/**
* Initialization method called by GemFire with the configured parameters once this Declarable object has been
* constructed during GemFire startup using an &lt;initalizer&gt; element in GemFire's configuration meta-data.
* <p/>
*
* @param parameters the configured parameters passed from the GemFire configuration (e.g. cache.xml) to this
* Declarable as a Properties instance.
* @throws IllegalStateException if the Declarable object's init method has already been invoked.
Expand All @@ -166,7 +167,7 @@ public final void init(final Properties parameters) {
/**
* Determines whether this Declarable object has been configured and initialized (i.e. the doInit method
* has been called) by the Spring container.
* <p/>
*
* @return a boolean value indicating whether this Declarable object has been configured and initialized by
* the Spring container.
* @see #assertInitialized()
Expand All @@ -179,7 +180,7 @@ protected boolean isInitialized() {
/**
* Event handler method called when GemFire has created and initialized (refreshed) the Spring ApplicationContext
* using the SpringContextBootstrappingInitializer Declarable class.
* <p/>
*
* @param event the ContextRefreshedEvent published by the Spring ApplicationContext after it is successfully
* created and initialized by GemFire.
* @throws IllegalStateException if the parameters have not been passed to this Declarable (i.e. GemFire has not
Expand Down Expand Up @@ -207,7 +208,7 @@ public final void onApplicationEvent(final ContextRefreshedEvent event) {
/**
* When this bean gets destroyed by the Spring container, make sure this component gets unregistered from the
* SpringContextBootstrappingInitializer.
* <p/>
*
* @throws Exception if bean destruction is unsuccessful.
* @see org.springframework.data.gemfire.support.SpringContextBootstrappingInitializer#unregister(
* org.springframework.context.ApplicationListener)
Expand Down
Expand Up @@ -65,7 +65,7 @@ else if (DataPolicy.PERSISTENT_REPLICATE.equals(dataPolicy)
* Resolves the Data Policy used by this "local" GemFire Region (i.e. locally Scoped; Scope.LOCAL) based on the
* enumerated value from com.gemstone.gemfire.cache.RegionShortcuts (LOCAL, LOCAL_PERSISTENT, LOCAL_HEAP_LRU,
* LOCAL_OVERFLOW, and LOCAL_PERSISTENT_OVERFLOW), but without consideration of the Eviction settings.
* <p/>
*
* @param regionFactory the GemFire RegionFactory used to created the Local Region.
* @param persistent a boolean value indicating whether the Local Region should persist it's data.
* @param dataPolicy requested Data Policy as set by the user in the Spring GemFire configuration meta-data.
Expand Down
Expand Up @@ -24,7 +24,7 @@
/**
* Spring-friendly bean for creating {@link RegionAttributes}. Eliminates the need of using
* a XML 'factory-method' tag.
* <p/>
*
* @author Costin Leau
* @author John Blum
* @see org.springframework.beans.factory.FactoryBean
Expand Down

0 comments on commit dc289b4

Please sign in to comment.