All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.belladati.sdk.util.CachedCollection Maven / Gradle / Ivy

Go to download

The BellaDati SDK allows accessing a BellaDati server from 3rd-party applications using Java. This project contains the SDK's interface definitions.

There is a newer version: 0.9.15.1
Show newest version
package com.belladati.sdk.util;

import java.util.Collection;

/**
 * A collection that is cached by the client. Call {@link #loadFirstTime()} to
 * initially load its contents from the server or {@link #load()} to clear the
 * cache and reload at a later time.
 * 
 * @author Chris Hennigfeld
 */
public interface CachedCollection> {

	/**
	 * Returns the immutable content of this cached collection.
	 * 
	 * @return the immutable content of this cached collection
	 */
	C get();

	/**
	 * Clears and loads the content of this collection from the server.
	 * 
	 * @return this collection (for chaining)
	 */
	CachedCollection load();

	/**
	 * Loads the content of this collection from the server if it hasn't been
	 * loaded before. Calling this method is equivalent to:
	 * 

* if(!collection.isLoaded() { collection.load(); } * * @return this collection (for chaining) */ CachedCollection loadFirstTime(); /** * Returns true if this cached collection has been loaded from the * server. * * @return true if this cached collection has been loaded from the * server */ boolean isLoaded(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy