com.evernote.edam.notestore
Class SyncState

java.lang.Object
  extended by com.evernote.edam.notestore.SyncState
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<SyncState>, org.apache.thrift.TBase<SyncState._Fields>

public class SyncState
extends java.lang.Object
implements org.apache.thrift.TBase<SyncState._Fields>, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<SyncState>

This structure encapsulates the information about the state of the user's account for the purpose of "state based" synchronization.

currentTime
The server's current date and time.
fullSyncBefore
The cutoff date and time for client caches to be updated via incremental synchronization. Any clients that were last synched with the server before this date/time must do a full resync of all objects. This cutoff point will change over time as archival data is deleted or special circumstances on the service require resynchronization.
updateCount
Indicates the total number of transactions that have been committed within the account. This reflects (for example) the number of discrete additions or modifications that have been made to the data in this account (tags, notes, resources, etc.). This number is the "high water mark" for Update Sequence Numbers (USN) within the account.
uploaded
The total number of bytes that have been uploaded to this account in the current monthly period. This can be compared against Accounting.uploadLimit (from the UserStore) to determine how close the user is to their monthly upload limit.

See Also:
Serialized Form

Nested Class Summary
static class SyncState._Fields
          The set of fields this struct contains, along with convenience methods for finding and manipulating them.
 
Field Summary
static java.util.Map<SyncState._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
           
 
Constructor Summary
SyncState()
           
SyncState(long currentTime, long fullSyncBefore, int updateCount)
           
SyncState(SyncState other)
          Performs a deep copy on other.
 
Method Summary
 SyncState clone()
          Deprecated. 
 int compareTo(SyncState other)
           
 SyncState deepCopy()
           
 boolean equals(java.lang.Object that)
           
 boolean equals(SyncState that)
           
 long getCurrentTime()
           
 java.lang.Object getFieldValue(int fieldId)
           
 java.lang.Object getFieldValue(SyncState._Fields field)
           
 long getFullSyncBefore()
           
 int getUpdateCount()
           
 long getUploaded()
           
 int hashCode()
           
 boolean isSet(int fieldID)
           
 boolean isSet(SyncState._Fields field)
          Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
 boolean isSetCurrentTime()
          Returns true if field currentTime is set (has been asigned a value) and false otherwise
 boolean isSetFullSyncBefore()
          Returns true if field fullSyncBefore is set (has been asigned a value) and false otherwise
 boolean isSetUpdateCount()
          Returns true if field updateCount is set (has been asigned a value) and false otherwise
 boolean isSetUploaded()
          Returns true if field uploaded is set (has been asigned a value) and false otherwise
 void read(org.apache.thrift.protocol.TProtocol iprot)
           
 void setCurrentTime(long currentTime)
           
 void setCurrentTimeIsSet(boolean value)
           
 void setFieldValue(int fieldID, java.lang.Object value)
           
 void setFieldValue(SyncState._Fields field, java.lang.Object value)
           
 void setFullSyncBefore(long fullSyncBefore)
           
 void setFullSyncBeforeIsSet(boolean value)
           
 void setUpdateCount(int updateCount)
           
 void setUpdateCountIsSet(boolean value)
           
 void setUploaded(long uploaded)
           
 void setUploadedIsSet(boolean value)
           
 java.lang.String toString()
           
 void unsetCurrentTime()
           
 void unsetFullSyncBefore()
           
 void unsetUpdateCount()
           
 void unsetUploaded()
           
 void validate()
           
 void write(org.apache.thrift.protocol.TProtocol oprot)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

metaDataMap

public static final java.util.Map<SyncState._Fields,org.apache.thrift.meta_data.FieldMetaData> metaDataMap
Constructor Detail

SyncState

public SyncState()

SyncState

public SyncState(long currentTime,
                 long fullSyncBefore,
                 int updateCount)

SyncState

public SyncState(SyncState other)
Performs a deep copy on other.

Method Detail

deepCopy

public SyncState deepCopy()
Specified by:
deepCopy in interface org.apache.thrift.TBase<SyncState._Fields>

clone

@Deprecated
public SyncState clone()
Deprecated. 

Overrides:
clone in class java.lang.Object

getCurrentTime

public long getCurrentTime()

setCurrentTime

public void setCurrentTime(long currentTime)

unsetCurrentTime

public void unsetCurrentTime()

isSetCurrentTime

public boolean isSetCurrentTime()
Returns true if field currentTime is set (has been asigned a value) and false otherwise


setCurrentTimeIsSet

public void setCurrentTimeIsSet(boolean value)

getFullSyncBefore

public long getFullSyncBefore()

setFullSyncBefore

public void setFullSyncBefore(long fullSyncBefore)

unsetFullSyncBefore

public void unsetFullSyncBefore()

isSetFullSyncBefore

public boolean isSetFullSyncBefore()
Returns true if field fullSyncBefore is set (has been asigned a value) and false otherwise


setFullSyncBeforeIsSet

public void setFullSyncBeforeIsSet(boolean value)

getUpdateCount

public int getUpdateCount()

setUpdateCount

public void setUpdateCount(int updateCount)

unsetUpdateCount

public void unsetUpdateCount()

isSetUpdateCount

public boolean isSetUpdateCount()
Returns true if field updateCount is set (has been asigned a value) and false otherwise


setUpdateCountIsSet

public void setUpdateCountIsSet(boolean value)

getUploaded

public long getUploaded()

setUploaded

public void setUploaded(long uploaded)

unsetUploaded

public void unsetUploaded()

isSetUploaded

public boolean isSetUploaded()
Returns true if field uploaded is set (has been asigned a value) and false otherwise


setUploadedIsSet

public void setUploadedIsSet(boolean value)

setFieldValue

public void setFieldValue(SyncState._Fields field,
                          java.lang.Object value)
Specified by:
setFieldValue in interface org.apache.thrift.TBase<SyncState._Fields>

setFieldValue

public void setFieldValue(int fieldID,
                          java.lang.Object value)
Specified by:
setFieldValue in interface org.apache.thrift.TBase<SyncState._Fields>

getFieldValue

public java.lang.Object getFieldValue(SyncState._Fields field)
Specified by:
getFieldValue in interface org.apache.thrift.TBase<SyncState._Fields>

getFieldValue

public java.lang.Object getFieldValue(int fieldId)
Specified by:
getFieldValue in interface org.apache.thrift.TBase<SyncState._Fields>

isSet

public boolean isSet(SyncState._Fields field)
Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise

Specified by:
isSet in interface org.apache.thrift.TBase<SyncState._Fields>

isSet

public boolean isSet(int fieldID)
Specified by:
isSet in interface org.apache.thrift.TBase<SyncState._Fields>

equals

public boolean equals(java.lang.Object that)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(SyncState that)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(SyncState other)
Specified by:
compareTo in interface java.lang.Comparable<SyncState>

read

public void read(org.apache.thrift.protocol.TProtocol iprot)
          throws org.apache.thrift.TException
Specified by:
read in interface org.apache.thrift.TBase<SyncState._Fields>
Throws:
org.apache.thrift.TException

write

public void write(org.apache.thrift.protocol.TProtocol oprot)
           throws org.apache.thrift.TException
Specified by:
write in interface org.apache.thrift.TBase<SyncState._Fields>
Throws:
org.apache.thrift.TException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

validate

public void validate()
              throws org.apache.thrift.TException
Throws:
org.apache.thrift.TException