Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Public Member Functions | |
ChecksumActivity (User source, SPath path, long hash, long length, Timestamp jupiterTimestamp) | |
ChecksumActivity | withTimestamp (Timestamp jupiterTimestamp) |
String | toString () |
void | dispatch (IActivityReceiver receiver) |
int | hashCode () |
boolean | equals (Object obj) |
Timestamp | getTimestamp () |
long | getLength () |
long | getHash () |
boolean | existsFile () |
Static Public Member Functions | |
static ChecksumActivity | missing (User source, SPath path) |
Static Public Attributes | |
static final int | NON_EXISTING_DOC = -1 |
Protected Attributes | |
final long | hash |
final long | length |
final Timestamp | jupiterTimestamp |
A ChecksumActivity is used to communicate checksums from the host to the clients.
A ChecksumActivity always relates to a certain file (given a path) and contains the hash and length of the file.
To indicate that a file is missing on the host NON_EXISTING_DOC is used.
A ChecksumActivity also may contain a Timestamp to indicate at which point of time the checksum was created. A user can use this information to see whether the checksum can be used to check for consistency or whether the local user has already written additional text which invalidates the checksum.
de.fu_berlin.inf.dpp.activities.ChecksumActivity.ChecksumActivity | ( | User | source, |
SPath | path, | ||
long | hash, | ||
long | length, | ||
Timestamp | jupiterTimestamp | ||
) |
Constructor for ChecksumActivities. Timestamp can be null. ChecksumActivities created by the watchdog don't have access to the JupiterClients and therefore create an Activity without timestamp. Timestamps will be added later by the ConcurrentDocumentClient /-Server (by creating a new Activity with a timestamp)
source | The User that created this activity |
path | The SPath pointing to the document |
hash | The hashcode of the document |
length | The length of the document |
jupiterTimestamp | The current jupiterTimestamp for this document, may be null |
void de.fu_berlin.inf.dpp.activities.ChecksumActivity.dispatch | ( | IActivityReceiver | receiver | ) |
boolean de.fu_berlin.inf.dpp.activities.ChecksumActivity.equals | ( | Object | obj | ) |
Reimplemented from de.fu_berlin.inf.dpp.activities.AbstractResourceActivity.
boolean de.fu_berlin.inf.dpp.activities.ChecksumActivity.existsFile | ( | ) |
long de.fu_berlin.inf.dpp.activities.ChecksumActivity.getHash | ( | ) |
long de.fu_berlin.inf.dpp.activities.ChecksumActivity.getLength | ( | ) |
Timestamp de.fu_berlin.inf.dpp.activities.ChecksumActivity.getTimestamp | ( | ) |
int de.fu_berlin.inf.dpp.activities.ChecksumActivity.hashCode | ( | ) |
Reimplemented from de.fu_berlin.inf.dpp.activities.AbstractResourceActivity.
static ChecksumActivity de.fu_berlin.inf.dpp.activities.ChecksumActivity.missing | ( | User | source, |
SPath | path | ||
) | [static] |
Create a ChecksumActivity which indicates that the file is missing on the host.
String de.fu_berlin.inf.dpp.activities.ChecksumActivity.toString | ( | ) |
ChecksumActivity de.fu_berlin.inf.dpp.activities.ChecksumActivity.withTimestamp | ( | Timestamp | jupiterTimestamp | ) |
Returns a copy of the ChecksumActivity with a new Timestamp.
final long de.fu_berlin.inf.dpp.activities.ChecksumActivity.hash [protected] |
final Timestamp de.fu_berlin.inf.dpp.activities.ChecksumActivity.jupiterTimestamp [protected] |
final long de.fu_berlin.inf.dpp.activities.ChecksumActivity.length [protected] |
final int de.fu_berlin.inf.dpp.activities.ChecksumActivity.NON_EXISTING_DOC = -1 [static] |
Constant used for representing a missing file