ONOS源码笔记--前提

常用服务

   @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
   protected TopologyService topologyService ;//用于提供网络拓补信息

   @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
   protected PacketService packetService ;
   //Service for intercepting data plane packets and for emitting synthetic outbound packets.
   //用于截获数据包信息、构建并发送数据包
   @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
   protected HostService hostService ;
   //Service for interacting with the inventory of end-station hosts.
   //用于与终端主机交互

   @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
   protected FlowRuleService flowRuleService ;
   //Service for injecting flow rules into the environment
   //and for obtaining information about flow rules already in the environment.
   //This implements semantics of a distributed authoritative flow table
   //where the master copy of the flow rules lies with the controller and the devices hold only the 'cached' copy.
   //下发等操作

   @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
   protected FlowObjectiveService flowObjectiveService ;
   //Service for programming data plane flow rules
   //in manner independent of specific device table pipeline configuration.
   //用于构造特定设备的流表

   @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
   protected CoreService coreService ;
   //Service for interacting with the core system of the controller.

   @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
   protected ComponentConfigService cfgService ;
   //Service for tracking system-wide configurations for various software components.
   //追踪整个系统各个组件的配置

   @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
   protected StorageService storageService ;
   //Storage service.
   //This service provides builders for various distributed primitives.
   //提供构建者
   //It is expected that services and applications
   //will leverage the primitives
   //indirectly provided by this service for their distributed state management and coordination.

   @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
   protected DeviceService deviceService ;
   //与现有基础设备交互服务

   @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
   protected MastershipService mastershipService ;
   //Service responsible for determining the controller instance mastership
   //of a device in a clustered environment.
   //This is the central authority for determining mastership,
   //but is not responsible for actually applying it to the devices;
   //决定master授权,但不应用
   //this falls on the device service.

   @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
   protected ClusterService clusterService ;
   //Service for obtaining information about the individual nodes within the controller cluster.
   //获取集群中的单个节点信息

常量设置

@Property(name = "flowTimeout", intValue = DEFAULT_TIMEOUT,
        label = "Configure Flow Timeout for installed flow rules; " +
                "default is 10 sec")
private int flowTimeout = DEFAULT_TIMEOUT;
//常量的设置方式,此处是流表过期时间设定
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值