<commit_before>/**
 *    Copyright 2013, Big Switch Networks, Inc.
 *
 *    Licensed under the Apache License, Version 2.0 (the "License"); you may
 *    not use this file except in compliance with the License. You may obtain
 *    a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 *    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 *    License for the specific language governing permissions and limitations
 *    under the License.
 **/

package net.floodlightcontroller.flowcache;

import java.lang.ref.SoftReference;

import net.floodlightcontroller.debugevent.IDebugEventService.EventColumn;
import net.floodlightcontroller.debugevent.IDebugEventService.EventFieldType;
import net.floodlightcontroller.debugevent.IDebugEventService.EventType;
import net.floodlightcontroller.debugevent.IDebugEventService.MaxEventsRegistered;
import net.floodlightcontroller.debugevent.IDebugEventService;
import net.floodlightcontroller.debugevent.IEventUpdater;
import net.floodlightcontroller.flowcache.PriorityPendingQueue.EventPriority;

/**
 * The base Class for FlowReconcileQuery.
 */
public class FlowReconcileQuery {
    public ReconcileQueryEvType evType;
    public EventPriority evPriority;
    public static class FlowReconcileQueryDebugEvent {
        @EventColumn(name = "Event Info",
                     description = EventFieldType.SREF_OBJECT)
        private final SoftReference<FlowReconcileQuery> eventInfo;
        @EventColumn(name = "Stage",
                     description = EventFieldType.STRING)
        private final String stage;
        @EventColumn(name = "Stage Info",
                     description = EventFieldType.SREF_OBJECT)
        private final SoftReference<Object> stageInfo;
        public FlowReconcileQueryDebugEvent(FlowReconcileQuery eventInfo,
                                            String stage,
                                            Object stageInfo) {
            super();
            this.eventInfo = new SoftReference<FlowReconcileQuery>(eventInfo);
            this.stage = stage;
            if (stageInfo != null) {
                this.stageInfo = new SoftReference<Object>(stageInfo);
            } else {
                this.stageInfo = null;
            }
        }
    }
    public static enum ReconcileQueryEvType {
        /* Interface rule of a bvs was modified */
        BVS_INTERFACE_RULE_CHANGED(EventPriority.LOW),
        BVS_INTERFACE_RULE_CHANGED_MATCH_SWITCH_PORT(EventPriority.LOW),
        BVS_INTERFACE_RULE_CHANGED_MATCH_MAC(EventPriority.LOW),
        BVS_INTERFACE_RULE_CHANGED_MATCH_VLAN(EventPriority.LOW),
        BVS_INTERFACE_RULE_CHANGED_MATCH_IPSUBNET(EventPriority.LOW),
        BVS_INTERFACE_RULE_CHANGED_MATCH_TAG(EventPriority.LOW),
        /* Some bvs configuration was changed */
        BVS_PRIORITY_CHANGED(EventPriority.LOW),
        /* ACL configuration was changed */
        ACL_CONFIG_CHANGED(EventPriority.LOW),
        /* VRS routing rule was changed */
        VRS_ROUTING_RULE_CHANGED(EventPriority.LOW),
        /* VRS static ARP table was changed*/
        VRS_STATIC_ARP_CHANGED(EventPriority.LOW),
        /* device had moved to a different port in the network */
        DEVICE_MOVED(EventPriority.HIGH),
        /* device's property had changed, such as tag assignment */
        DEVICE_PROPERTY_CHANGED(EventPriority.LOW),
        /* Link down */
        LINK_DOWN(EventPriority.MEDIUM);

        private EventPriority priority;
        private IEventUpdater<FlowReconcileQueryDebugEvent>
                evReconcileQueryDebugEvent;

        private ReconcileQueryEvType(EventPriority priority) {
            this.priority = priority;
        }
        public EventPriority getPriority() {
             return this.priority;
        }
        public void registerDebugEvent(String packageName,
                                       IDebugEventService debugEvents)
                                       throws MaxEventsRegistered {
            try {
                evReconcileQueryDebugEvent =
                        debugEvents.registerEvent(packageName, this.toString(),
                                                  this.toString(),
                                                  EventType.ALWAYS_LOG,
                                                  FlowReconcileQueryDebugEvent.class,
                                                  100);
            } catch (MaxEventsRegistered e) {
                throw e;
            }<commit_msg>increase flow reconcile event buffer size to 500<commit_after>/**
 *    Copyright 2013, Big Switch Networks, Inc.
 *
 *    Licensed under the Apache License, Version 2.0 (the "License"); you may
 *    not use this file except in compliance with the License. You may obtain
 *    a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 *    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 *    License for the specific language governing permissions and limitations
 *    under the License.
 **/

package net.floodlightcontroller.flowcache;

import java.lang.ref.SoftReference;

import net.floodlightcontroller.debugevent.IDebugEventService.EventColumn;
import net.floodlightcontroller.debugevent.IDebugEventService.EventFieldType;
import net.floodlightcontroller.debugevent.IDebugEventService.EventType;
import net.floodlightcontroller.debugevent.IDebugEventService.MaxEventsRegistered;
import net.floodlightcontroller.debugevent.IDebugEventService;
import net.floodlightcontroller.debugevent.IEventUpdater;
import net.floodlightcontroller.flowcache.PriorityPendingQueue.EventPriority;

/**
 * The base Class for FlowReconcileQuery.
 */
public class FlowReconcileQuery {
    public ReconcileQueryEvType evType;
    public EventPriority evPriority;
    public static class FlowReconcileQueryDebugEvent {
        @EventColumn(name = "Event Info",
                     description = EventFieldType.SREF_OBJECT)
        private final SoftReference<FlowReconcileQuery> eventInfo;
        @EventColumn(name = "Stage",
                     description = EventFieldType.STRING)
        private final String stage;
        @EventColumn(name = "Stage Info",
                     description = EventFieldType.SREF_OBJECT)
        private final SoftReference<Object> stageInfo;
        public FlowReconcileQueryDebugEvent(FlowReconcileQuery eventInfo,
                                            String stage,
                                            Object stageInfo) {
            super();
            this.eventInfo = new SoftReference<FlowReconcileQuery>(eventInfo);
            this.stage = stage;
            if (stageInfo != null) {
                this.stageInfo = new SoftReference<Object>(stageInfo);
            } else {
                this.stageInfo = null;
            }
        }
    }
    public static enum ReconcileQueryEvType {
        /* Interface rule of a bvs was modified */
        BVS_INTERFACE_RULE_CHANGED(EventPriority.LOW),
        BVS_INTERFACE_RULE_CHANGED_MATCH_SWITCH_PORT(EventPriority.LOW),
        BVS_INTERFACE_RULE_CHANGED_MATCH_MAC(EventPriority.LOW),
        BVS_INTERFACE_RULE_CHANGED_MATCH_VLAN(EventPriority.LOW),
        BVS_INTERFACE_RULE_CHANGED_MATCH_IPSUBNET(EventPriority.LOW),
        BVS_INTERFACE_RULE_CHANGED_MATCH_TAG(EventPriority.LOW),
        /* Some bvs configuration was changed */
        BVS_PRIORITY_CHANGED(EventPriority.LOW),
        /* ACL configuration was changed */
        ACL_CONFIG_CHANGED(EventPriority.LOW),
        /* VRS routing rule was changed */
        VRS_ROUTING_RULE_CHANGED(EventPriority.LOW),
        /* VRS static ARP table was changed*/
        VRS_STATIC_ARP_CHANGED(EventPriority.LOW),
        /* device had moved to a different port in the network */
        DEVICE_MOVED(EventPriority.HIGH),
        /* device's property had changed, such as tag assignment */
        DEVICE_PROPERTY_CHANGED(EventPriority.LOW),
        /* Link down */
        LINK_DOWN(EventPriority.MEDIUM);

        private EventPriority priority;
        private IEventUpdater<FlowReconcileQueryDebugEvent>
                evReconcileQueryDebugEvent;

        private ReconcileQueryEvType(EventPriority priority) {
            this.priority = priority;
        }
        public EventPriority getPriority() {
             return this.priority;
        }
        public void registerDebugEvent(String packageName,
                                       IDebugEventService debugEvents)
                                       throws MaxEventsRegistered {
            try {
                evReconcileQueryDebugEvent =
                        debugEvents.registerEvent(packageName, this.toString(),
                                                  this.toString(),
                                                  EventType.ALWAYS_LOG,
                                                  FlowReconcileQueryDebugEvent.class,
                                                  500);
            } catch (MaxEventsRegistered e) {
                throw e;
            }
{'fraction_non_alphanumeric': 0.06484532794727331, 'fraction_numerical': 0.0026575954076751354, 'mean_word_length': 2.221917808219178, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 28, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4557167', 'n_tokens_mistral': 2416, 'n_tokens_neox': 2333, 'n_words': 547}