com.hazelcast.nio
Interface SocketWritable

All Known Subinterfaces:
TextCommand
All Known Implementing Classes:
AbstractTextCommand, DataAdapter, DeleteCommand, EndCommand, ErrorCommand, GetCommand, HttpCommand, HttpDeleteCommand, HttpGetCommand, HttpPostCommand, IncrementCommand, NoOpCommand, Packet, PartialGetCommand, SetCommand, SimpleCommand, StatsCommand, TouchCommand, VersionCommand

public interface SocketWritable

Represents something that can be written to a Connection. todo: Perhaps this class should be renamed to ConnectionWritable since it is written to a Connection.write(SocketWritable). This aligns the names.


Method Summary
 boolean isUrgent()
          Checks if this SocketWritable is urgent.
 boolean writeTo(ByteBuffer destination)
          Asks the SocketWritable to write its content to the destination ByteBuffer.
 

Method Detail

writeTo

boolean writeTo(ByteBuffer destination)
Asks the SocketWritable to write its content to the destination ByteBuffer.

Parameters:
destination - the ByteBuffer to write to.
Returns:
todo: unclear what return value means.

isUrgent

boolean isUrgent()
Checks if this SocketWritable is urgent. SocketWritable that are urgent, have priority above regular SocketWritable. This is useful to implement System Operations so that they can be send faster than regular operations; especially when the system is under load you want these operations have precedence.

Returns:
true if urgent, false otherwise.


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.