java.lang.Object | |
↳ | com.atlassian.jira.functest.config.Checksummer<T> |
Keeps the checksums of a group of objects of type T.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Checksummer.Helper<T> | Helps with the conversion of T into and from its different forms needed for the operation of the checksummer. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a checksummer that uses the passed helper to covert T to and from a form that allows it to be serialized.
| |||||||||||
Create a checksummer that uses the passed helper to convert T to and from a form that allows it to be serialized.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Static factory method that will create a checksum that stores
File objects by hashing their
contents. | |||||||||||
Return the hash algorithm used when adding new objects to the checkum.
| |||||||||||
Tells the caller if the passed object has a hash the same as the one already stored in the checksum.
| |||||||||||
Return true if the checksummer was modified since
write(org.dom4j.Element) was called, false otherwise. | |||||||||||
Read the checksummer state as was previously saved using
write(org.dom4j.Element) . | |||||||||||
Remove the passed object and its hash from checksummer.
| |||||||||||
Set the default hash algorithm used when adding new objects.
| |||||||||||
Update the current state of the passed object with its current hash.
| |||||||||||
Write the current state of the checksummer to the passed element.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Create a checksummer that uses the passed helper to covert T to and from a form that allows it to be serialized.
helper | the helper this checksum will use to process instances of T. |
---|
Create a checksummer that uses the passed helper to convert T to and from a form that allows it to be serialized. The checksum will use the passed hashing algorithm for any new objects added to the checksum.
helper | the helper this checksum will use to process instance of T. |
---|---|
defaultSum | the checksum used to add any new objects. |
Static factory method that will create a checksum that stores File
objects by hashing their
contents. This can be used to find out quickly from a set of files which have changed.
hash | the checksum oused to add any new objects. |
---|
File
objects.
Return the hash algorithm used when adding new objects to the checkum.
Tells the caller if the passed object has a hash the same as the one already stored in the checksum. This gives a good indication whether the passed object has changed since it was added to the checksum. The method will return true if the passed object has not already been added to the checksum.
object | the object to test. |
---|
Return true if the checksummer was modified since write(org.dom4j.Element)
was called, false otherwise.
write(org.dom4j.Element)
was called, false otherwise.
Read the checksummer state as was previously saved using write(org.dom4j.Element)
.
element | the element where the configuration is stored. |
---|
Remove the passed object and its hash from checksummer.
object | the object to remove from the checksummer. |
---|
Set the default hash algorithm used when adding new objects.
defaultSum | the default hash algorithm used when adding new objects. |
---|
Update the current state of the passed object with its current hash. This will add the passed object to the checksum if it has not already been added.
object | the object to update or add. |
---|
Write the current state of the checksummer to the passed element. The checksummer can later be reconstructed
by calling read(org.dom4j.Element)
.
checkElement | the element to write the state to. |
---|