Interface FileProducerEngine

  • All Superinterfaces:
    io.gridgo.framework.ComponentLifecycle, io.gridgo.connector.support.FormattedMarshallable, io.gridgo.connector.Producer, io.gridgo.connector.support.ProducerCapability
    All Known Implementing Classes:
    BasicFileProducerEngine, DisruptorFileProducerEngine

    public interface FileProducerEngine
    extends io.gridgo.connector.Producer, io.gridgo.connector.support.FormattedMarshallable
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default byte[] appendWithLength​(byte[] bytesToSend)  
      long getTotalSentBytes()  
      void setLimitStrategy​(FileLimitStrategy limitStrategy)  
      default void writeBytesWithLength​(io.gridgo.bean.BElement bArray, java.nio.ByteBuffer buffer)  
      default long writeToFile​(io.gridgo.bean.BElement payload, boolean lengthPrepend, java.nio.ByteBuffer buffer, java.nio.channels.FileChannel fileChannel)  
      default long writeWithBuffer​(io.gridgo.bean.BElement payload, java.nio.ByteBuffer buffer, java.nio.channels.FileChannel channel, boolean lengthPrepend)  
      • Methods inherited from interface io.gridgo.framework.ComponentLifecycle

        getName, start, stop
      • Methods inherited from interface io.gridgo.connector.support.FormattedMarshallable

        deserialize, getFormat, serialize
      • Methods inherited from interface io.gridgo.connector.Producer

        call, send, sendWithAck
      • Methods inherited from interface io.gridgo.connector.support.ProducerCapability

        isCallSupported, isSendSupported, isSendWithAckSupported
    • Method Detail

      • getTotalSentBytes

        long getTotalSentBytes()
      • writeToFile

        default long writeToFile​(io.gridgo.bean.BElement payload,
                                 boolean lengthPrepend,
                                 java.nio.ByteBuffer buffer,
                                 java.nio.channels.FileChannel fileChannel)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • writeWithBuffer

        default long writeWithBuffer​(io.gridgo.bean.BElement payload,
                                     java.nio.ByteBuffer buffer,
                                     java.nio.channels.FileChannel channel,
                                     boolean lengthPrepend)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • appendWithLength

        default byte[] appendWithLength​(byte[] bytesToSend)
      • writeBytesWithLength

        default void writeBytesWithLength​(io.gridgo.bean.BElement bArray,
                                          java.nio.ByteBuffer buffer)