1 | package org.dcache.vehicles; |
2 | |
3 | import java.util.List; |
4 | |
5 | import diskCacheV111.util.PnfsId; |
6 | import diskCacheV111.vehicles.Message; |
7 | import diskCacheV111.vehicles.StorageInfo; |
8 | import diskCacheV111.vehicles.ProtocolInfo; |
9 | |
10 | /** |
11 | * Message to project a set of link groups to the link groups capable |
12 | * of accepting a given file. |
13 | * |
14 | * The message basically contains two pieces of information: A |
15 | * description of a file that is about to be written (e.g. PnfsId, |
16 | * StorageInfo and ProtocolInfo) and optionally a set of link groups. |
17 | * |
18 | * The reply to the message should hold the subset of the set of link |
19 | * groups that would actually be able to select a write pool for the |
20 | * given file. |
21 | * |
22 | * If no link groups where provided in the request message, i.e. |
23 | * getLinkGroups returns null, then PoolManager must consider all link |
24 | * groups. |
25 | */ |
26 | public class PoolManagerSelectLinkGroupForWriteMessage extends Message |
27 | { |
28 | private PnfsId _pnfsId; |
29 | private StorageInfo _storageInfo; |
30 | private ProtocolInfo _protocolInfo; |
31 | private long _fileSize; |
32 | private String _pnfsPath; |
33 | private List<String> _linkGroups; |
34 | |
35 | public PoolManagerSelectLinkGroupForWriteMessage(PnfsId pnfsId, |
36 | StorageInfo storageInfo, |
37 | ProtocolInfo protocolInfo, |
38 | long fileSize) |
39 | { |
40 | _pnfsId = pnfsId; |
41 | _storageInfo = storageInfo; |
42 | _protocolInfo = protocolInfo; |
43 | _fileSize = fileSize; |
44 | } |
45 | |
46 | public long getFileSize() |
47 | { |
48 | return _fileSize; |
49 | } |
50 | |
51 | public void setFileSize(long fileSize) |
52 | { |
53 | _fileSize = fileSize; |
54 | } |
55 | |
56 | public StorageInfo getStorageInfo() |
57 | { |
58 | return _storageInfo; |
59 | } |
60 | |
61 | public void setStorageInfo(StorageInfo storageInfo) |
62 | { |
63 | _storageInfo = storageInfo; |
64 | } |
65 | |
66 | public ProtocolInfo getProtocolInfo() |
67 | { |
68 | return _protocolInfo; |
69 | } |
70 | |
71 | public void setProtocolInfo(ProtocolInfo protocolInfo) |
72 | { |
73 | _protocolInfo = protocolInfo; |
74 | } |
75 | |
76 | public String getPnfsPath() |
77 | { |
78 | return _pnfsPath; |
79 | } |
80 | |
81 | public void setPnfsPath(String pnfsPath) |
82 | { |
83 | _pnfsPath = pnfsPath; |
84 | } |
85 | |
86 | public List<String> getLinkGroups() |
87 | { |
88 | return _linkGroups; |
89 | } |
90 | |
91 | public void setLinkGroups(List<String> linkGroups) |
92 | { |
93 | _linkGroups = linkGroups; |
94 | } |
95 | } |