Package net.dv8tion.jda.api
Class JDA.ShardInfo
- java.lang.Object
- 
- net.dv8tion.jda.api.JDA.ShardInfo
 
- 
- Enclosing interface:
- JDA
 
 public static class JDA.ShardInfo extends java.lang.ObjectRepresents the information used to create this shard.
- 
- 
Field SummaryFields Modifier and Type Field Description static JDA.ShardInfoSINGLEDefault sharding config with one shard
 - 
Constructor SummaryConstructors Constructor Description ShardInfo(int shardId, int shardTotal)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)intgetShardId()Represents the id of the shard of the current instance.java.lang.StringgetShardString()Provides a shortcut method for easily printing shard info.intgetShardTotal()The total amount of shards based on the value provided during JDA instance creation usingJDABuilder.useSharding(int, int).java.lang.StringtoString()
 
- 
- 
- 
Field Detail- 
SINGLEpublic static final JDA.ShardInfo SINGLE Default sharding config with one shard
 
- 
 - 
Method Detail- 
getShardIdpublic int getShardId() Represents the id of the shard of the current instance.
 This value will be between 0 and (getShardTotal()- 1).- Returns:
- The id of the currently logged in shard.
 
 - 
getShardTotalpublic int getShardTotal() The total amount of shards based on the value provided during JDA instance creation usingJDABuilder.useSharding(int, int).
 This does not query Discord to determine the total number of shards.
 This does not represent the amount of logged in shards.
 It strictly represents the integer value provided to discord representing the total amount of shards that the developer indicated that it was going to use when initially starting JDA.- Returns:
- The total of shards based on the total provided by the developer during JDA initialization.
 
 - 
getShardStringpublic java.lang.String getShardString() Provides a shortcut method for easily printing shard info.
 Format: "[# / #]"
 Where the first # is shardId and the second # is shardTotal.- Returns:
- A String representing the information used to build this shard.
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object o) - Overrides:
- equalsin class- java.lang.Object
 
 
- 
 
-