teller
Module Contents
alltypes
Module Contents
data
class
AgeOfData
Module Contents
AgeOfData
(
time
:
Int
,
unit
:
Unit
)
enum
class
Unit
Module Contents
DAYS
HOURS
MINUTES
MONTHS
SECONDS
YEARS
val
time
:
Int
fun
toDate
(
)
:
Date
val
unit
:
Unit
typealias
GetDataRequirementsTag
=
String
data
class
LocalDataState
<
CACHE
:
Any
>
Module Contents
val
cacheData
:
CACHE
?
fun
deliverState
(
listener
:
LocalDataStateListener
<
CACHE
>
)
:
Unit
val
isEmpty
:
Boolean
interface
LocalDataStateListener
<
in
DATA
>
Module Contents
abstract
fun
data
(
data
:
DATA
)
:
Unit
abstract
fun
isEmpty
(
)
:
Unit
abstract
class
LocalRepository
<
CACHE
:
Any
,
GET_CACHE_REQUIREMENTS
:
GetCacheRequirements
>
Module Contents
LocalRepository
(
)
interface
GetCacheRequirements
fun
dispose
(
)
:
Unit
protected
abstract
fun
isCacheEmpty
(
cache
:
CACHE
,
requirements
:
GET_CACHE_REQUIREMENTS
)
:
Boolean
@Synchronized
fun
newCache
(
cache
:
CACHE
,
requirements
:
GET_CACHE_REQUIREMENTS
)
:
Unit
fun
observe
(
)
:
Observable
<
LocalDataState
<
CACHE
>
>
protected
abstract
fun
observeCache
(
requirements
:
GET_CACHE_REQUIREMENTS
)
:
Observable
<
CACHE
>
var
requirements
:
GET_CACHE_REQUIREMENTS
?
protected
abstract
fun
saveCache
(
cache
:
CACHE
,
requirements
:
GET_CACHE_REQUIREMENTS
)
:
Unit
data
class
OnlineDataState
<
CACHE
:
Any
>
Module Contents
val
cacheData
:
CACHE
?
fun
deliverAllStates
(
listener
:
OnlineDataStateListener
<
CACHE
>
)
:
Unit
fun
deliverCacheState
(
listener
:
OnlineDataStateCacheListener
<
CACHE
>
)
:
Unit
fun
deliverFetchingFreshCacheState
(
listener
:
OnlineDataStateFetchingListener
)
:
Unit
fun
deliverNoCacheState
(
listener
:
OnlineDataStateNoCacheStateListener
)
:
Unit
fun
equals
(
other
:
Any
?
)
:
Boolean
val
errorDuringFetch
:
Throwable
?
val
errorDuringFirstFetch
:
Throwable
?
val
fetchingForFirstTime
:
Boolean
fun
hashCode
(
)
:
Int
val
isFetchingFreshData
:
Boolean
val
justCompletedSuccessfulFirstFetch
:
Boolean
val
justCompletedSuccessfullyFetchingFreshData
:
Boolean
val
lastTimeFetched
:
Date
?
val
noCacheExists
:
Boolean
val
requirements
:
GetDataRequirements
?
fun
toString
(
)
:
String
interface
OnlineDataStateCacheListener
<
in
CACHE
>
Module Contents
abstract
fun
cacheData
(
data
:
CACHE
,
fetched
:
Date
)
:
Unit
abstract
fun
cacheEmpty
(
fetched
:
Date
)
:
Unit
interface
OnlineDataStateFetchingListener
Module Contents
abstract
fun
fetching
(
)
:
Unit
abstract
fun
finishedFetching
(
errorDuringFetch
:
Throwable
?
)
:
Unit
interface
OnlineDataStateListener
<
in
DATA
>
:
OnlineDataStateFetchingListener
,
OnlineDataStateNoCacheStateListener
,
OnlineDataStateCacheListener
<
DATA
>
interface
OnlineDataStateNoCacheStateListener
Module Contents
abstract
fun
finishedFirstFetch
(
errorDuringFetch
:
Throwable
?
)
:
Unit
abstract
fun
firstFetch
(
)
:
Unit
abstract
fun
noCache
(
)
:
Unit
abstract
class
OnlineRepository
<
CACHE
:
Any
,
GET_DATA_REQUIREMENTS
:
GetDataRequirements
,
FETCH_RESPONSE
:
Any
>
:
Listener
Module Contents
OnlineRepository
(
)
class
FetchResponse
<
FETCH_RESPONSE
:
Any
>
Module Contents
class
ResponseFail
:
Throwable
Module Contents
ResponseFail
(
message
:
String
)
val
data
:
FETCH_RESPONSE
?
@JvmStatic
fun
<
FETCH_RESPONSE
:
Any
>
fail
(
message
:
String
)
:
FetchResponse
<
FETCH_RESPONSE
>
@JvmStatic
fun
<
FETCH_RESPONSE
:
Any
>
fail
(
throwable
:
Throwable
)
:
FetchResponse
<
FETCH_RESPONSE
>
val
failure
:
Throwable
?
fun
isFailure
(
)
:
Boolean
fun
isSuccessful
(
)
:
Boolean
@JvmStatic
fun
<
FETCH_RESPONSE
:
Any
>
success
(
data
:
FETCH_RESPONSE
)
:
FetchResponse
<
FETCH_RESPONSE
>
interface
GetDataRequirements
Module Contents
abstract
var
tag
:
GetDataRequirementsTag
class
RefreshResult
Module Contents
enum
class
SkippedReason
Module Contents
CANCELLED
DATA_NOT_TOO_OLD
fun
didFail
(
)
:
Boolean
fun
didSkip
(
)
:
Boolean
fun
didSucceed
(
)
:
Boolean
fun
equals
(
other
:
Any
?
)
:
Boolean
val
failedError
:
Throwable
?
fun
hashCode
(
)
:
Int
val
skipped
:
SkippedReason
?
val
successful
:
Boolean
fun
dispose
(
)
:
Unit
protected
abstract
fun
fetchFreshData
(
requirements
:
GET_DATA_REQUIREMENTS
)
:
Single
<
FetchResponse
<
FETCH_RESPONSE
>
>
protected
abstract
fun
isDataEmpty
(
cache
:
CACHE
,
requirements
:
GET_DATA_REQUIREMENTS
)
:
Boolean
abstract
var
maxAge
:
AgeOfData
fun
observe
(
)
:
Observable
<
OnlineDataState
<
CACHE
>
>
protected
abstract
fun
observeCachedData
(
requirements
:
GET_DATA_REQUIREMENTS
)
:
Observable
<
CACHE
>
fun
refresh
(
force
:
Boolean
)
:
Single
<
RefreshResult
>
@Synchronized
open
fun
refreshBegin
(
)
:
Unit
@Synchronized
open
fun
<
RefreshResultDataType
:
Any
>
refreshComplete
(
response
:
FetchResponse
<
RefreshResultDataType
>
)
:
Unit
var
requirements
:
GET_DATA_REQUIREMENTS
?
protected
abstract
fun
saveData
(
data
:
FETCH_RESPONSE
,
requirements
:
GET_DATA_REQUIREMENTS
)
:
Unit
class
Teller
Module Contents
fun
clear
(
)
:
Unit
@JvmStatic
fun
init
(
application
:
Application
)
:
Unit
@JvmStatic
val
shared
:
Teller
@JvmStatic
fun
sharedInstance
(
)
:
Teller
package
com.levibostian.teller
Module Contents
class
Teller
Module Contents
fun
clear
(
)
:
Unit
@JvmStatic
fun
init
(
application
:
Application
)
:
Unit
@JvmStatic
val
shared
:
Teller
@JvmStatic
fun
sharedInstance
(
)
:
Teller
package
com.levibostian.teller.cachestate
Module Contents
data
class
LocalDataState
<
CACHE
:
Any
>
Module Contents
val
cacheData
:
CACHE
?
fun
deliverState
(
listener
:
LocalDataStateListener
<
CACHE
>
)
:
Unit
val
isEmpty
:
Boolean
data
class
OnlineDataState
<
CACHE
:
Any
>
Module Contents
val
cacheData
:
CACHE
?
fun
deliverAllStates
(
listener
:
OnlineDataStateListener
<
CACHE
>
)
:
Unit
fun
deliverCacheState
(
listener
:
OnlineDataStateCacheListener
<
CACHE
>
)
:
Unit
fun
deliverFetchingFreshCacheState
(
listener
:
OnlineDataStateFetchingListener
)
:
Unit
fun
deliverNoCacheState
(
listener
:
OnlineDataStateNoCacheStateListener
)
:
Unit
fun
equals
(
other
:
Any
?
)
:
Boolean
val
errorDuringFetch
:
Throwable
?
val
errorDuringFirstFetch
:
Throwable
?
val
fetchingForFirstTime
:
Boolean
fun
hashCode
(
)
:
Int
val
isFetchingFreshData
:
Boolean
val
justCompletedSuccessfulFirstFetch
:
Boolean
val
justCompletedSuccessfullyFetchingFreshData
:
Boolean
val
lastTimeFetched
:
Date
?
val
noCacheExists
:
Boolean
val
requirements
:
GetDataRequirements
?
fun
toString
(
)
:
String
package
com.levibostian.teller.cachestate.listener
Module Contents
interface
LocalDataStateListener
<
in
DATA
>
Module Contents
abstract
fun
data
(
data
:
DATA
)
:
Unit
abstract
fun
isEmpty
(
)
:
Unit
interface
OnlineDataStateCacheListener
<
in
CACHE
>
Module Contents
abstract
fun
cacheData
(
data
:
CACHE
,
fetched
:
Date
)
:
Unit
abstract
fun
cacheEmpty
(
fetched
:
Date
)
:
Unit
interface
OnlineDataStateFetchingListener
Module Contents
abstract
fun
fetching
(
)
:
Unit
abstract
fun
finishedFetching
(
errorDuringFetch
:
Throwable
?
)
:
Unit
interface
OnlineDataStateListener
<
in
DATA
>
:
OnlineDataStateFetchingListener
,
OnlineDataStateNoCacheStateListener
,
OnlineDataStateCacheListener
<
DATA
>
interface
OnlineDataStateNoCacheStateListener
Module Contents
abstract
fun
finishedFirstFetch
(
errorDuringFetch
:
Throwable
?
)
:
Unit
abstract
fun
firstFetch
(
)
:
Unit
abstract
fun
noCache
(
)
:
Unit
package
com.levibostian.teller.repository
Module Contents
typealias
GetDataRequirementsTag
=
String
abstract
class
LocalRepository
<
CACHE
:
Any
,
GET_CACHE_REQUIREMENTS
:
GetCacheRequirements
>
Module Contents
LocalRepository
(
)
interface
GetCacheRequirements
fun
dispose
(
)
:
Unit
protected
abstract
fun
isCacheEmpty
(
cache
:
CACHE
,
requirements
:
GET_CACHE_REQUIREMENTS
)
:
Boolean
@Synchronized
fun
newCache
(
cache
:
CACHE
,
requirements
:
GET_CACHE_REQUIREMENTS
)
:
Unit
fun
observe
(
)
:
Observable
<
LocalDataState
<
CACHE
>
>
protected
abstract
fun
observeCache
(
requirements
:
GET_CACHE_REQUIREMENTS
)
:
Observable
<
CACHE
>
var
requirements
:
GET_CACHE_REQUIREMENTS
?
protected
abstract
fun
saveCache
(
cache
:
CACHE
,
requirements
:
GET_CACHE_REQUIREMENTS
)
:
Unit
abstract
class
OnlineRepository
<
CACHE
:
Any
,
GET_DATA_REQUIREMENTS
:
GetDataRequirements
,
FETCH_RESPONSE
:
Any
>
:
Listener
Module Contents
OnlineRepository
(
)
class
FetchResponse
<
FETCH_RESPONSE
:
Any
>
Module Contents
class
ResponseFail
:
Throwable
Module Contents
ResponseFail
(
message
:
String
)
val
data
:
FETCH_RESPONSE
?
@JvmStatic
fun
<
FETCH_RESPONSE
:
Any
>
fail
(
message
:
String
)
:
FetchResponse
<
FETCH_RESPONSE
>
@JvmStatic
fun
<
FETCH_RESPONSE
:
Any
>
fail
(
throwable
:
Throwable
)
:
FetchResponse
<
FETCH_RESPONSE
>
val
failure
:
Throwable
?
fun
isFailure
(
)
:
Boolean
fun
isSuccessful
(
)
:
Boolean
@JvmStatic
fun
<
FETCH_RESPONSE
:
Any
>
success
(
data
:
FETCH_RESPONSE
)
:
FetchResponse
<
FETCH_RESPONSE
>
interface
GetDataRequirements
Module Contents
abstract
var
tag
:
GetDataRequirementsTag
class
RefreshResult
Module Contents
enum
class
SkippedReason
Module Contents
CANCELLED
DATA_NOT_TOO_OLD
fun
didFail
(
)
:
Boolean
fun
didSkip
(
)
:
Boolean
fun
didSucceed
(
)
:
Boolean
fun
equals
(
other
:
Any
?
)
:
Boolean
val
failedError
:
Throwable
?
fun
hashCode
(
)
:
Int
val
skipped
:
SkippedReason
?
val
successful
:
Boolean
fun
dispose
(
)
:
Unit
protected
abstract
fun
fetchFreshData
(
requirements
:
GET_DATA_REQUIREMENTS
)
:
Single
<
FetchResponse
<
FETCH_RESPONSE
>
>
protected
abstract
fun
isDataEmpty
(
cache
:
CACHE
,
requirements
:
GET_DATA_REQUIREMENTS
)
:
Boolean
abstract
var
maxAge
:
AgeOfData
fun
observe
(
)
:
Observable
<
OnlineDataState
<
CACHE
>
>
protected
abstract
fun
observeCachedData
(
requirements
:
GET_DATA_REQUIREMENTS
)
:
Observable
<
CACHE
>
fun
refresh
(
force
:
Boolean
)
:
Single
<
RefreshResult
>
@Synchronized
open
fun
refreshBegin
(
)
:
Unit
@Synchronized
open
fun
<
RefreshResultDataType
:
Any
>
refreshComplete
(
response
:
FetchResponse
<
RefreshResultDataType
>
)
:
Unit
var
requirements
:
GET_DATA_REQUIREMENTS
?
protected
abstract
fun
saveData
(
data
:
FETCH_RESPONSE
,
requirements
:
GET_DATA_REQUIREMENTS
)
:
Unit
package
com.levibostian.teller.type
Module Contents
data
class
AgeOfData
Module Contents
AgeOfData
(
time
:
Int
,
unit
:
Unit
)
enum
class
Unit
Module Contents
DAYS
HOURS
MINUTES
MONTHS
SECONDS
YEARS
val
time
:
Int
fun
toDate
(
)
:
Date
val
unit
:
Unit