This project has retired. For details please refer to its
Attic page.
TemporaryGroupIndex xref
1 package org.apache.archiva.indexer.merger;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import java.io.File;
22 import java.io.Serializable;
23 import java.util.Date;
24
25
26
27
28 public class TemporaryGroupIndex
29 implements Serializable
30 {
31 private long creationTime = new Date().getTime();
32
33 private File directory;
34
35 private String indexId;
36
37 private String groupId;
38
39 private int mergedIndexTtl;
40
41 public TemporaryGroupIndex(File directory, String indexId, String groupId, int mergedIndexTtl)
42 {
43 this.directory = directory;
44 this.indexId = indexId;
45 this.groupId = groupId;
46 this.mergedIndexTtl = mergedIndexTtl;
47 }
48
49 public long getCreationTime()
50 {
51 return creationTime;
52 }
53
54 public TemporaryGroupIndex setCreationTime( long creationTime )
55 {
56 this.creationTime = creationTime;
57 return this;
58 }
59
60 public File getDirectory()
61 {
62 return directory;
63 }
64
65 public TemporaryGroupIndex setDirectory( File directory )
66 {
67 this.directory = directory;
68 return this;
69 }
70
71 public String getIndexId()
72 {
73 return indexId;
74 }
75
76 public TemporaryGroupIndex setIndexId( String indexId )
77 {
78 this.indexId = indexId;
79 return this;
80 }
81
82 public String getGroupId()
83 {
84 return groupId;
85 }
86
87 public void setGroupId( String groupId )
88 {
89 this.groupId = groupId;
90 }
91
92 public int getMergedIndexTtl() {
93 return mergedIndexTtl;
94 }
95
96 public void setMergedIndexTtl(int mergedIndexTtl) {
97 this.mergedIndexTtl = mergedIndexTtl;
98 }
99
100 @Override
101 public int hashCode()
102 {
103 return Long.toString( creationTime ).hashCode();
104 }
105
106 @Override
107 public boolean equals( Object o )
108 {
109 if ( this == o )
110 {
111 return true;
112 }
113 if ( !( o instanceof TemporaryGroupIndex ) )
114 {
115 return false;
116 }
117 return this.creationTime == ( (TemporaryGroupIndex) o ).creationTime;
118 }
119 }