directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kiran Ayyagari" <ayyagariki...@gmail.com>
Subject Re: svn commit: r675975 - /directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/Tag.java
Date Fri, 11 Jul 2008 15:50:31 GMT
 Both of these fields allow us to have two more indices into the TagStore.

 The tagDate allows us to search TagStore based on a date.

 The revisionDate can also be used for searching in addition to that it
serves as an
 informational field which tesll the date of the revision which this Tag
includes.

 These are my thoughts (without a real production usecase) which lead to
adding
  them in Tag.java.

Kiran Ayyagari

On Fri, Jul 11, 2008 at 9:05 PM, Alex Karasulu <akarasulu@apache.org> wrote:

> Hi Kiran,
>
> Can you comment on why you think these two new fields are needed?  Not
> disagreeing with you just curious what you're thinking here.
>
> Thanks,
> Alex
>
>
> On Fri, Jul 11, 2008 at 10:57 AM, <kayyagari@apache.org> wrote:
>
>> Author: kayyagari
>> Date: Fri Jul 11 07:57:09 2008
>> New Revision: 675975
>>
>> URL: http://svn.apache.org/viewvc?rev=675975&view=rev
>> Log:
>> added two new attributes tagDate and revisionDate
>>
>> Modified:
>>
>>  directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/Tag.java
>>
>> Modified:
>> directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/Tag.java
>> URL:
>> http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/Tag.java?rev=675975&r1=675974&r2=675975&view=diff
>>
>> ==============================================================================
>> ---
>> directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/Tag.java
>> (original)
>> +++
>> directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/changelog/Tag.java
>> Fri Jul 11 07:57:09 2008
>> @@ -20,6 +20,9 @@
>>  package org.apache.directory.server.core.changelog;
>>
>>
>> +import java.util.Date;
>> +
>> +
>>  /**
>>  * A tag on a revision representing a snapshot of the directory server's
>>  * state.
>> @@ -29,18 +32,44 @@
>>  */
>>  public class Tag
>>  {
>> -    /*
>> -     * TODO should we have date in which tag was taken
>> -     * TODO should we have the date of the revision that was tagged
>> -     */
>> +
>>     private final long revision;
>>     private final String description;
>> -
>> -
>> +
>> +    /** the date on which this tag was created*/
>> +    private Date tagDate;
>> +
>> +    /** the date of revision that was tagged*/
>> +    private Date revisionDate;
>> +
>> +
>>     public Tag( long revision, String description )
>>     {
>>         this.revision = revision;
>>         this.description = description;
>> +        this.tagDate = new Date();
>> +    }
>> +
>> +
>> +    public Tag( long revision, String description, Date tagDate, Date
>> revisionDate )
>> +    {
>> +        this.revision = revision;
>> +        this.description = description;
>> +        this.tagDate = tagDate;
>> +        this.revisionDate = revisionDate;
>> +    }
>> +
>> +
>> +    public Tag( long revision, String description, long tagTime, long
>> revisionTime )
>> +    {
>> +        this.revision = revision;
>> +        this.description = description;
>> +        this.tagDate = new Date( tagTime );
>> +
>> +        if( revisionTime > 0 )
>> +        {
>> +            this.revisionDate = new Date( revisionTime );
>> +        }
>>     }
>>
>>
>> @@ -62,6 +91,18 @@
>>     }
>>
>>
>> +    public Date getTagDate()
>> +    {
>> +        return tagDate;
>> +    }
>> +
>> +
>> +    public Date getRevisionDate()
>> +    {
>> +        return revisionDate;
>> +    }
>> +
>> +
>>     public boolean equals( Object other )
>>     {
>>         if ( other instanceof Tag )
>>
>>
>>
>
>
> --
> Microsoft gives you Windows, Linux gives you the whole house ...

Mime
View raw message