Class PublisherHandler
java.lang.Object
org.infinispan.reactive.publisher.impl.PublisherHandler
Handler for holding publisher results between requests of data
- Since:
- 10.1
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclosePublisher(String requestId) Closes the publisher that maps to the given request idRetrieves the next response for the same request id that was configured on the command when invokingregister(InitialPublisherCommand).intReturns how many publishers are currently open<I,R> CompletableFuture<PublisherResponse> register(InitialPublisherCommand<?, I, R> command) Registers a publisher given the initial command arguments.voidstart()voidstop()voidviewChange(ViewChangedEvent event)
-
Constructor Details
-
PublisherHandler
public PublisherHandler()
-
-
Method Details
-
viewChange
-
start
public void start() -
stop
public void stop() -
register
Registers a publisher given the initial command arguments. The value returned will eventually contain the first batched response for the publisher of the given id.- Type Parameters:
I- input typeR- output type- Parameters:
command- the command with arguments to start a publisher with- Returns:
- future that will or eventually will contain the first response
-
getNext
Retrieves the next response for the same request id that was configured on the command when invokingregister(InitialPublisherCommand).- Parameters:
requestId- the unique request id to continue the response with- Returns:
- future that will or eventually will contain the next response
-
openPublishers
public int openPublishers()Returns how many publishers are currently open- Returns:
- how many publishers are currently open
-
closePublisher
Closes the publisher that maps to the given request id- Parameters:
requestId- unique identifier for the request
-