private boolean isEndOfPartitionEvent(Buffer buffer) throws IOException { return EventSerializer.isEvent(buffer, EndOfPartitionEvent.class); }
private boolean isEndOfPartitionEvent(Buffer buffer) throws IOException { return EventSerializer.isEvent(buffer, EndOfPartitionEvent.class); }
private boolean isEndOfPartitionEvent(Buffer buffer) throws IOException { return EventSerializer.isEvent(buffer, EndOfPartitionEvent.class); }
private boolean isEndOfPartitionEvent(Buffer buffer) throws IOException { return EventSerializer.isEvent(buffer, EndOfPartitionEvent.class, getClass().getClassLoader()); }
/** * Identifies whether the given buffer encodes the given event. Custom events are not supported. * * @param buffer the buffer to peak into * @param eventClass the expected class of the event type * @return whether the event class of the <tt>buffer</tt> matches the given <tt>eventClass</tt> */ public static boolean isEvent(Buffer buffer, Class<?> eventClass) throws IOException { return !buffer.isBuffer() && isEvent(buffer.getNioBufferReadable(), eventClass); } }
/** * Identifies whether the given buffer encodes the given event. Custom events are not supported. * * @param buffer the buffer to peak into * @param eventClass the expected class of the event type * @return whether the event class of the <tt>buffer</tt> matches the given <tt>eventClass</tt> */ public static boolean isEvent(Buffer buffer, Class<?> eventClass) throws IOException { return !buffer.isBuffer() && isEvent(buffer.getNioBufferReadable(), eventClass); } }
/** * Identifies whether the given buffer encodes the given event. Custom events are not supported. * * @param buffer the buffer to peak into * @param eventClass the expected class of the event type * @return whether the event class of the <tt>buffer</tt> matches the given <tt>eventClass</tt> */ public static boolean isEvent(Buffer buffer, Class<?> eventClass) throws IOException { return !buffer.isBuffer() && isEvent(buffer.getNioBufferReadable(), eventClass); } }
/** * Identifies whether the given buffer encodes the given event. * * @param buffer the buffer to peak into * @param eventClass the expected class of the event type * @param classLoader the class loader to use for custom event classes * @return whether the event class of the <tt>buffer</tt> matches the given <tt>eventClass</tt> * @throws IOException */ public static boolean isEvent(final Buffer buffer, final Class<?> eventClass, final ClassLoader classLoader) throws IOException { return !buffer.isBuffer() && isEvent(buffer.getNioBuffer(), eventClass, classLoader); } }