java.lang.Object | ||||||
↳ | java.util.AbstractMap<K, V> | |||||
↳ | com.google.api.client.util.GenericData | |||||
↳ | com.kinvey.java.core.AbstractKinveyClientRequest<T> | |||||
↳ | com.kinvey.java.core.AbstractKinveyJsonClientRequest<T> | |||||
↳ | com.kinvey.java.offline.AbstractKinveyOfflineClientRequest<T> | |||||
↳ | com.kinvey.java.cache.AbstractKinveyCachedClientRequest<T> |
![]() |
Implementation of a Client Request, which can either pull a response from a Cache instance or from online.
Behavior is determined by a CachePolicy
, which must be set along with an instance of a Cache
.
This class provides all available functionality through public methods, but most of the implementation is handled by the specified cache policy.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
T |
execute()
@return
| ||||||||||
T |
fromCache()
This method retrieves an entity from the cache.
| ||||||||||
T |
fromService(boolean persist)
This method retrieves an entity from the service.
| ||||||||||
AsyncExecutor | getExecutor() | ||||||||||
void | setExecutor(AsyncExecutor executor) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
@return
IOException |
---|
This method retrieves an entity from the cache. The complete URL of the request is used as a key in the cache.
This method is synchronized on an object lock, providing threadsafe accesss to the cache.IOException |
---|
This method retrieves an entity from the service. The request is executed as normal, and, if persisted, the response can be added to the cache.
persist | - true if the response should be added to the cache, false if the cache shouldn't be updated. |
---|
IOException |
---|