Package it.ernytech.tdlib
Class TdApi.OptimizeStorage
- java.lang.Object
-
- it.ernytech.tdlib.TdApi.Object
-
- it.ernytech.tdlib.TdApi.Function
-
- it.ernytech.tdlib.TdApi.OptimizeStorage
-
- Enclosing class:
- TdApi
public static class TdApi.OptimizeStorage extends TdApi.Function
Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted.Returns
StorageStatistics
-
-
Field Summary
Fields Modifier and Type Field Description long[]
chatIds
If not empty, only files from the given chats are considered.int
chatLimit
Same as in getStorageStatistics.static int
CONSTRUCTOR
Identifier uniquely determining type of the object.int
count
Limit on the total count of files after deletion.long[]
excludeChatIds
If not empty, files from the given chats are excluded.TdApi.FileType[]
fileTypes
If not empty, only files with the given type(s) are considered.int
immunityDelay
The amount of time after the creation of a file during which it can't be deleted, in seconds.long
size
Limit on the total size of files after deletion.int
ttl
Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems).
-
Constructor Summary
Constructors Constructor Description OptimizeStorage()
Default constructor.OptimizeStorage(long size, int ttl, int count, int immunityDelay, TdApi.FileType[] fileTypes, long[] chatIds, long[] excludeChatIds, int chatLimit)
Constructor for initialization of all fields.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getConstructor()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class it.ernytech.tdlib.TdApi.Function
toString
-
-
-
-
Field Detail
-
size
public long size
Limit on the total size of files after deletion. Pass -1 to use the default limit.
-
ttl
public int ttl
Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit.
-
count
public int count
Limit on the total count of files after deletion. Pass -1 to use the default limit.
-
immunityDelay
public int immunityDelay
The amount of time after the creation of a file during which it can't be deleted, in seconds. Pass -1 to use the default value.
-
fileTypes
public TdApi.FileType[] fileTypes
If not empty, only files with the given type(s) are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted.
-
chatIds
public long[] chatIds
If not empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat (e.g., profile photos).
-
excludeChatIds
public long[] excludeChatIds
If not empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any chat (e.g., profile photos).
-
chatLimit
public int chatLimit
Same as in getStorageStatistics. Affects only returned statistics.
-
CONSTRUCTOR
public static final int CONSTRUCTOR
Identifier uniquely determining type of the object.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OptimizeStorage
public OptimizeStorage()
Default constructor.
-
OptimizeStorage
public OptimizeStorage(long size, int ttl, int count, int immunityDelay, TdApi.FileType[] fileTypes, long[] chatIds, long[] excludeChatIds, int chatLimit)
Constructor for initialization of all fields.- Parameters:
size
- Limit on the total size of files after deletion. Pass -1 to use the default limit.ttl
- Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit.count
- Limit on the total count of files after deletion. Pass -1 to use the default limit.immunityDelay
- The amount of time after the creation of a file during which it can't be deleted, in seconds. Pass -1 to use the default value.fileTypes
- If not empty, only files with the given type(s) are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted.chatIds
- If not empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat (e.g., profile photos).excludeChatIds
- If not empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any chat (e.g., profile photos).chatLimit
- Same as in getStorageStatistics. Affects only returned statistics.
-
-
Method Detail
-
getConstructor
public int getConstructor()
- Specified by:
getConstructor
in classTdApi.Object
- Returns:
- this.CONSTRUCTOR
-
-