Class DownloadStubImpl
java.lang.Object
com.biglybt.pifimpl.local.download.DownloadStubImpl
- All Implemented Interfaces:
DownloadStub
,DownloadStub.DownloadStubEx
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.biglybt.pif.download.DownloadStub
DownloadStub.DownloadStubEx, DownloadStub.DownloadStubFile
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final long
private final long
private final DownloadStubImpl.DownloadStubFileImpl[]
private final byte[]
private final String
private final DownloadManagerImpl
private final String[]
private final String
private String
private final int
private final long
private DownloadImpl
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DownloadStubImpl
(DownloadManagerImpl _manager, DownloadImpl _download, DownloadManager _core_dm, String[] _manual_tags, String _category, Map<String, Object> _gm_map) protected
DownloadStubImpl
(DownloadManagerImpl _manager, Map<String, Object> _map) -
Method Summary
Modifier and TypeMethodDescriptionprivate int
countFiles
(File dir) long
long
getGMMap()
long
getLongAttribute
(TorrentAttribute attribute) There are logically separate from the un-stubbed download, if you want to synchronize values from non-stub and stub then it is up to you to do it.String[]
getName()
int
byte[]
long
boolean
isStub()
void
remove()
void
remove
(boolean delete_torrent, boolean delete_data) void
setLongAttribute
(TorrentAttribute attribute, long value) protected void
setSavePath
(String sp) Can ONLY be used before the stub is initially savedprotected void
-
Field Details
-
manager
-
name
-
hash
private final byte[] hash -
size
private final long size -
date_created
private final long date_created -
date_completed
private final long date_completed -
save_path
-
main_tracker
-
files
-
manual_tags
-
category
-
gm_map
-
temp_download
-
attributes
-
-
Constructor Details
-
DownloadStubImpl
protected DownloadStubImpl(DownloadManagerImpl _manager, DownloadImpl _download, DownloadManager _core_dm, String[] _manual_tags, String _category, Map<String, Object> _gm_map) -
DownloadStubImpl
-
-
Method Details
-
exportToMap
-
isStub
public boolean isStub()- Specified by:
isStub
in interfaceDownloadStub
-
setStubbified
protected void setStubbified() -
destubbify
- Specified by:
destubbify
in interfaceDownloadStub
- Throws:
DownloadException
-
getTorrent
- Specified by:
getTorrent
in interfaceDownloadStub
-
getName
- Specified by:
getName
in interfaceDownloadStub
-
getTorrentHash
public byte[] getTorrentHash()- Specified by:
getTorrentHash
in interfaceDownloadStub
-
getTorrentSize
public long getTorrentSize()- Specified by:
getTorrentSize
in interfaceDownloadStub
-
getCreationDate
public long getCreationDate()- Specified by:
getCreationDate
in interfaceDownloadStub.DownloadStubEx
-
getCompletionDate
public long getCompletionDate()- Specified by:
getCompletionDate
in interfaceDownloadStub.DownloadStubEx
-
getSavePath
- Specified by:
getSavePath
in interfaceDownloadStub
-
setSavePath
Can ONLY be used before the stub is initially saved- Parameters:
sp
-
-
getMainTracker
- Specified by:
getMainTracker
in interfaceDownloadStub
-
getStubFiles
- Specified by:
getStubFiles
in interfaceDownloadStub
-
getManualTags
- Specified by:
getManualTags
in interfaceDownloadStub.DownloadStubEx
-
getCategory
- Specified by:
getCategory
in interfaceDownloadStub.DownloadStubEx
-
getLongAttribute
Description copied from interface:DownloadStub
There are logically separate from the un-stubbed download, if you want to synchronize values from non-stub and stub then it is up to you to do it. So I suggest that you infact don't do this but just use these methods as a means to cache essential attributes from unstubbed ones in the 'will-be-added' listener event- Specified by:
getLongAttribute
in interfaceDownloadStub
- Returns:
-
setLongAttribute
- Specified by:
setLongAttribute
in interfaceDownloadStub
-
getGMMap
-
remove
public void remove()- Specified by:
remove
in interfaceDownloadStub
-
remove
public void remove(boolean delete_torrent, boolean delete_data) throws DownloadException, DownloadRemovalVetoException - Specified by:
remove
in interfaceDownloadStub.DownloadStubEx
- Throws:
DownloadException
DownloadRemovalVetoException
-
countFiles
-