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 org.apache.archiva.repository.storage.StorageAsset;
22
23 import java.io.Serializable;
24 import java.nio.file.Path;
25 import java.util.Date;
26
27
28
29
30 public class TemporaryGroupIndex
31 implements Serializable
32 {
33 private long creationTime = new Date().getTime();
34
35 private StorageAsset directory;
36
37 private String indexId;
38
39 private String groupId;
40
41 private int mergedIndexTtl;
42
43 public TemporaryGroupIndex(StorageAsset directory, String indexId, String groupId, int mergedIndexTtl)
44 {
45 this.directory = directory;
46 this.indexId = indexId;
47 this.groupId = groupId;
48 this.mergedIndexTtl = mergedIndexTtl;
49 }
50
51 public long getCreationTime()
52 {
53 return creationTime;
54 }
55
56 public TemporaryGroupIndex setCreationTime( long creationTime )
57 {
58 this.creationTime = creationTime;
59 return this;
60 }
61
62 public StorageAsset getDirectory()
63 {
64 return directory;
65 }
66
67 public TemporaryGroupIndex setDirectory( StorageAsset directory )
68 {
69 this.directory = directory;
70 return this;
71 }
72
73 public String getIndexId()
74 {
75 return indexId;
76 }
77
78 public TemporaryGroupIndex setIndexId( String indexId )
79 {
80 this.indexId = indexId;
81 return this;
82 }
83
84 public String getGroupId()
85 {
86 return groupId;
87 }
88
89 public void setGroupId( String groupId )
90 {
91 this.groupId = groupId;
92 }
93
94 public int getMergedIndexTtl() {
95 return mergedIndexTtl;
96 }
97
98 public void setMergedIndexTtl(int mergedIndexTtl) {
99 this.mergedIndexTtl = mergedIndexTtl;
100 }
101
102 @Override
103 public int hashCode()
104 {
105 return Long.toString( creationTime ).hashCode();
106 }
107
108 @Override
109 public boolean equals( Object o )
110 {
111 if ( this == o )
112 {
113 return true;
114 }
115 if ( !( o instanceof TemporaryGroupIndex ) )
116 {
117 return false;
118 }
119 return this.creationTime == ( (TemporaryGroupIndex) o ).creationTime;
120 }
121 }