public class CacheIndex extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
CacheIndex.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<CacheIndex> |
CREATOR |
static JSONifiable.Creator<CacheIndex> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
CacheIndex()
Constructs a new empty instance.
|
protected |
CacheIndex(boolean noInit)
Constructs a new empty instance.
|
|
CacheIndex(CacheIndex src)
Constructs a new instance that is a deep copy of the source instance.
|
|
CacheIndex(JSONObject jsonObject)
Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
reflected in this instance and vice-versa.
|
|
CacheIndex(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCacheName()
Clears the 'cache_name' field, the 'has' method for this field will now return false
|
void |
clearIndex()
Clears the 'index' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
CacheIndex |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
String |
getCacheName()
Name of a Memcached cache.
|
protected GenericClient |
getGenericClient() |
Integer |
getIndex()
Index that is incremented when a cache is invalidated and forms part of the key used for entries stored in the cache.
|
JSONObject |
getJSONObject()
Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
reflected in this instance and vice-versa.
|
boolean |
hasCacheName()
Checks whether the 'cache_name' field has been set, however the value could be null
|
boolean |
hasIndex()
Checks whether the 'index' field has been set, however the value could be null
|
boolean |
isNotNullCacheName()
Checks whether the 'cache_name' field is set and is not null
|
boolean |
isNotNullIndex()
Checks whether the 'index' field is set and is not null
|
void |
mergeChanges(CacheIndex src)
Copy all the changed fields from the given source to this instance.
|
void |
resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
|
CacheIndex |
setCacheName(String cache_name)
Sets the field 'cache_name'.
|
CacheIndex |
setIndex(Integer index)
Sets the field 'index'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<CacheIndex> CREATOR
public static final JSONifiable.Creator<CacheIndex> JSON_CREATOR
public CacheIndex()
protected CacheIndex(boolean noInit)
public CacheIndex(String json) throws IllegalArgumentException
IllegalArgumentException
public CacheIndex(JSONObject jsonObject)
public CacheIndex(CacheIndex src)
public String getCacheName()
public Integer getIndex()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullCacheName()
public boolean isNotNullIndex()
public boolean hasCacheName()
public boolean hasIndex()
public CacheIndex setCacheName(String cache_name)
public CacheIndex setIndex(Integer index)
public void clearCacheName()
public void clearIndex()
public boolean containsChanges()
public void resetChangeLog()
public CacheIndex copyChanges()
public void mergeChanges(CacheIndex src)