public void init(){ netEventService = BeanHelper.getServiceBean(NetEventService.class); TShortObjectHashMap<Set<Class<?>>> handlerClassMap= ServiceHelper.getEventListenerHandlerClassMap(); handlerClassMap.forEachEntry(new TShortObjectProcedure<Set<Class<?>>>() { @Override public boolean execute(short i, Set<Class<?>> classes) { Set<EventListenerHandler> handlerSet=new HashSet<EventListenerHandler>(); for(Class<?> cls : classes){ handlerSet.add((EventListenerHandler)BeanHelper.getServiceBean(cls)); } handlerMap.put(i,handlerSet); return true; } }); }
/** * Constructor which specifies the index's key. * * @param keyDefinition * the {@code IndexKeyDefinition} to be used */ public TroveShortIndexedCollection(final IndexKeyDefinition keyDefinition) { super(keyDefinition); if (!keyDefinition.isSingleTypedKey(Short.class)) { throw new IllegalArgumentException("The key must be a single Short"); } troveMap = new TShortObjectHashMap<Object>(); }
public static TShortObjectHashMap<Set<Class<?>>> getEventListenerHandlerClassMap(){ return eventListenerHandlerClassMap; }
public ChatApiTcpHandler() { packetTypes = new TShortObjectHashMap<>(); insertPacketHandlers(); }
public AutoDeltaShortObjectMap(Function<ByteBuffer, V> valueCreator) { this.changes = new ArrayList<>(5); this.container = new TShortObjectHashMap<>(); this.baselineCommandCount = 0; this.valueCreator = valueCreator; }
public AutoDeltaShortStringMap() { this.changes = new ArrayList<>(5); this.container = new TShortObjectHashMap<>(); this.baselineCommandCount = 0; }