com.evernote.edam.notestore
Class SyncState

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

public class SyncState
extends java.lang.Object
implements com.evernote.thrift.TBase<SyncState>, java.io.Serializable, java.lang.Cloneable

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. This value may not be present if the SyncState has been retrieved by a caller that only has read access to the account.

See Also:
Serialized Form

Constructor Summary
SyncState()
           
SyncState(long currentTime, long fullSyncBefore, int updateCount)
           
SyncState(SyncState other)
          Performs a deep copy on other.
 
Method Summary
 void clear()
          Return to the state of having just been initialized, as though you had just called the default constructor.
 int compareTo(SyncState other)
           
 SyncState deepCopy()
          Creates a deep copy of the object.
 boolean equals(java.lang.Object that)
           
 boolean equals(SyncState that)
           
 long getCurrentTime()
           
 long getFullSyncBefore()
           
 int getUpdateCount()
           
 long getUploaded()
           
 int hashCode()
           
 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(com.evernote.thrift.protocol.TProtocol iprot)
          Reads an instance of the object from the given protocol.
 void setCurrentTime(long currentTime)
           
 void setCurrentTimeIsSet(boolean 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(com.evernote.thrift.protocol.TProtocol oprot)
          Writes the object to the given protocol.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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()
Description copied from interface: com.evernote.thrift.TBase
Creates a deep copy of the object.

Specified by:
deepCopy in interface com.evernote.thrift.TBase<SyncState>

clear

public void clear()
Description copied from interface: com.evernote.thrift.TBase
Return to the state of having just been initialized, as though you had just called the default constructor.

Specified by:
clear in interface com.evernote.thrift.TBase<SyncState>

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)

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(com.evernote.thrift.protocol.TProtocol iprot)
          throws com.evernote.thrift.TException
Description copied from interface: com.evernote.thrift.TBase
Reads an instance of the object from the given protocol.

Specified by:
read in interface com.evernote.thrift.TBase<SyncState>
Parameters:
iprot - Input protocol
Throws:
com.evernote.thrift.TException

write

public void write(com.evernote.thrift.protocol.TProtocol oprot)
           throws com.evernote.thrift.TException
Description copied from interface: com.evernote.thrift.TBase
Writes the object to the given protocol.

Specified by:
write in interface com.evernote.thrift.TBase<SyncState>
Parameters:
oprot - Output protocol
Throws:
com.evernote.thrift.TException

toString

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

validate

public void validate()
              throws com.evernote.thrift.TException
Throws:
com.evernote.thrift.TException