Class ExplicitShardedFile

  • All Implemented Interfaces:
    java.io.Serializable, ShardedFile

    @Internal
    public class ExplicitShardedFile
    extends java.lang.Object
    implements ShardedFile
    A sharded file where the file names are simply provided.
    See Also:
    Serialized Form
    • Constructor Detail

      • ExplicitShardedFile

        public ExplicitShardedFile​(java.util.Collection<java.lang.String> files)
                            throws java.io.IOException
        Constructs an ExplicitShardedFile for the given files.
        Throws:
        java.io.IOException
    • Method Detail

      • readFilesWithRetries

        public java.util.List<java.lang.String> readFilesWithRetries​(Sleeper sleeper,
                                                                     BackOff backOff)
                                                              throws java.io.IOException,
                                                                     java.lang.InterruptedException
        Discovers all shards of this file using the provided Sleeper and BackOff.

        Because of eventual consistency, reads may discover no files or fewer files than the explicit list of files implies. In this case, the read is considered to have failed.

        Specified by:
        readFilesWithRetries in interface ShardedFile
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • readFilesWithRetries

        public java.util.List<java.lang.String> readFilesWithRetries()
                                                              throws java.io.IOException,
                                                                     java.lang.InterruptedException
        Discovers all shards of this file.

        Because of eventual consistency, reads may discover no files or fewer files than the shard template implies. In this case, the read is considered to have failed.

        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object