Interface OutputPrinter


  • public interface OutputPrinter
    Converts binary array from Cache into output format.

    In order to avoid unnecessary conversion steps, all methods need to return a byte array. This way Netty doesn't need to do any conversion - it just wraps it into a ByteBuf.

    Author:
    Sebastian Ɓaskawiec
    • Method Detail

      • print

        byte[] print​(String cacheName,
                     CacheSet<?> cacheSet,
                     Charset charset)
              throws ServerInternalException
        Converts all values in the cache to a desired output format.
        Parameters:
        cacheName - Cache name (sometimes might be used as xml or json key).
        cacheSet - Key Set.
        charset - Desired Charset
        Returns:
        Byte array representation of converted values.
        Throws:
        ServerInternalException - Thrown if conversion was not successful.