Add @InternalApi annotations and private markers on internal apis (#22563)

* #22506 Mark materializer extension as @InternalApi

* #22506 Added missing annotations on internal apis in the fusing package

* #22506 Missing annotations in io package

* #22506 Add internal api annotations in impl package

* #22563 more hiding of the classes in the impl package

* #22563 Formatting fixes

* #22506 Fix private access in stream tcl tests
This commit is contained in:
Martynas Mickevičius 2017-03-16 21:04:07 +02:00 committed by Patrik Nordwall
parent 6434cbe868
commit 2a9c0370e0
60 changed files with 568 additions and 316 deletions

View file

@ -6,6 +6,7 @@ package akka.stream.impl.io
import java.io.InputStream
import java.nio.file.Path
import akka.annotation.InternalApi
import akka.stream._
import akka.stream.ActorAttributes.Dispatcher
import akka.stream.IOResult
@ -13,13 +14,14 @@ import akka.stream.impl.Stages.DefaultAttributes.IODispatcher
import akka.stream.impl.{ ErrorPublisher, SourceModule }
import akka.util.ByteString
import org.reactivestreams._
import scala.concurrent.{ Future, Promise }
/**
* INTERNAL API
* Creates simple synchronous Source backed by the given file.
*/
private[akka] final class FileSource(f: Path, chunkSize: Int, val attributes: Attributes, shape: SourceShape[ByteString])
@InternalApi private[akka] final class FileSource(f: Path, chunkSize: Int, val attributes: Attributes, shape: SourceShape[ByteString])
extends SourceModule[ByteString, Future[IOResult]](shape) {
require(chunkSize > 0, "chunkSize must be greater than 0")
override def create(context: MaterializationContext) = {
@ -49,7 +51,7 @@ private[akka] final class FileSource(f: Path, chunkSize: Int, val attributes: At
* INTERNAL API
* Source backed by the given input stream.
*/
private[akka] final class InputStreamSource(createInputStream: () InputStream, chunkSize: Int, val attributes: Attributes, shape: SourceShape[ByteString])
@InternalApi private[akka] final class InputStreamSource(createInputStream: () InputStream, chunkSize: Int, val attributes: Attributes, shape: SourceShape[ByteString])
extends SourceModule[ByteString, Future[IOResult]](shape) {
override def create(context: MaterializationContext) = {
val materializer = ActorMaterializerHelper.downcast(context.materializer)