s/transport details/transport properties/g

This commit is contained in:
akwizgran
2011-08-02 13:08:44 +01:00
parent 0e48f4ba55
commit 2740b2b002
7 changed files with 29 additions and 27 deletions

View File

@@ -77,8 +77,8 @@ interface Database<T> {
void addBatchToAck(T txn, ContactId c, BatchId b) throws DbException;
/**
* Adds a new contact to the database with the given transport details and
* returns an ID for the contact.
* Adds a new contact to the database with the given transport properties
* and returns an ID for the contact.
* <p>
* Locking: contacts write, transports write.
*/
@@ -268,14 +268,14 @@ interface Database<T> {
Collection<Group> getSubscriptions(T txn, ContactId c) throws DbException;
/**
* Returns the local transport details.
* Returns the local transport properties.
* <p>
* Locking: transports read.
*/
Map<String, String> getTransports(T txn) throws DbException;
/**
* Returns the transport details for the given contact.
* Returns the transport properties for the given contact.
* <p>
* Locking: contacts read, transports read.
*/
@@ -397,8 +397,7 @@ interface Database<T> {
long timestamp) throws DbException;
/**
* Sets the local transport details, replacing any existing transport
* details.
* Sets the local transport properties, replacing any existing properties.
* <p>
* Locking: transports write.
*/
@@ -406,8 +405,9 @@ interface Database<T> {
throws DbException;
/**
* Sets the transport details for the given contact, replacing any existing
* transport details unless the existing details have a newer timestamp.
* Sets the transport properties for the given contact, replacing any
* existing properties unless the existing properties have a newer
* timestamp.
* <p>
* Locking: contacts write, transports write.
*/

View File

@@ -444,7 +444,7 @@ abstract class JdbcDatabase implements Database<Connection> {
int rowsAffected = ps.executeUpdate();
assert rowsAffected == 1;
ps.close();
// Store the contact's transport details
// Store the contact's transport properties
if(transports != null) {
sql = "INSERT INTO contactTransports (contactId, key, value)"
+ " VALUES (?, ?, ?)";

View File

@@ -818,7 +818,7 @@ class ReadWriteLockDatabaseComponent<Txn> extends DatabaseComponentImpl<Txn> {
public void receiveTransports(ContactId c, Transports t)
throws DbException {
// Update the contact's transport details
// Update the contact's transport properties
contactLock.writeLock().lock();
try {
if(!containsContact(c)) throw new NoSuchContactException();

View File

@@ -608,7 +608,7 @@ class SynchronizedDatabaseComponent<Txn> extends DatabaseComponentImpl<Txn> {
public void receiveTransports(ContactId c, Transports t)
throws DbException {
// Update the contact's transport details
// Update the contact's transport properties
synchronized(contactLock) {
if(!containsContact(c)) throw new NoSuchContactException();
synchronized(transportLock) {