- public static final byte MESSAGE_TYPE = 20;
- private static BarrierInputMessageFactory instance;
- private static final int MESSAGE_LENGTH = 8;
-
- private BarrierInputMessageFactory() {
- // do nothing, just singleton
- }
-
- /**
- * @return singleton factory
- */
- public static synchronized BarrierInputMessageFactory getInstance() {
- if (instance == null) {
- instance = new BarrierInputMessageFactory();
- }
- return instance;
- }
-
- @Override
- public void messageToBuffer(short version, ByteBuf out, BarrierInput message) {
- ByteBufUtils.writeOFHeader(instance, message, out);
- }