public static AtomicCounter allocate ( final MutableDirectBuffer tempBuffer , final String name , final int typeId , final CountersManager countersManager , final String channel ) { final int keyLength = tempBuffer . putStringWithoutLengthAscii ( CHANNEL_OFFSET + SIZE_OF_INT , channel , 0 , MAX_CHANNEL_LENGTH ) ; tempBuffer . putInt ( CHANNEL_OFFSET , keyLength ) ; int labelLength = 0 ; labelLength += tempBuffer . putStringWithoutLengthAscii ( keyLength + labelLength , name ) ; labelLength += tempBuffer . putStringWithoutLengthAscii ( keyLength + labelLength , ": " ) ; labelLength += tempBuffer . putStringWithoutLengthAscii ( keyLength + labelLength , channel , 0 , MAX_LABEL_LENGTH - labelLength ) ; return countersManager . newCounter ( typeId , tempBuffer , 0 , keyLength , tempBuffer , keyLength , labelLength ) ; }
Allocate an indicator for tracking the status of a channel endpoint .