flink akka scala

原创 2015年11月20日 18:41:08
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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 org.apache.flink.runtime


import _root_.akka.actor.Actor
import grizzled.slf4j.Logger


/** Base trait for Flink's actors.
  *
  * The message handling logic is defined in the handleMessage method. This allows to mixin
  * stackable traits which change the message receiving behaviour.
  */
trait FlinkActor extends Actor {
  val log: Logger


  override def receive: Receive = handleMessage


  /** Handle incoming messages
    *
    * @return
    */
  def handleMessage: Receive


  /** Factory method for messages. This method can be used by mixins to decorate messages
    *
    * @param message The message to decorate
    * @return The decorated message
    */
  def decorateMessage(message: Any): Any = {
    message
  }
}
版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

Akka在Flink中的使用剖析

Akka与Actor 模型Akka是一个用来开发支持并发、容错、扩展性的应用程序框架。它是actor model的实现,因此跟Erlang的并发模型很像。在actor模型的上下文中,所有的活动实体都被...

flink-1.0.3-bin-hadoop27-scala_2

  • 2016-07-23 07:53
  • 83.50MB
  • 下载

scala akka

  • 2016-04-08 22:09
  • 1.75MB
  • 下载

scala笔记和akka笔记

原文地址:http://my.oschina.net/jingxing05/blog/290567 非阻塞的程序 应该保障的一些特性 : 等待无关性wait-free:能确保...

Play开发资源+scala+akka

  • 2016-01-10 15:28
  • 56.33MB
  • 下载

第90讲:基于Scala的Actor之上的分布式并发消息驱动框架Akka初体验学习笔记

第90讲:基于Scala的Actor之上的分布式并发消息驱动框架Akka初体验学习笔记 akka在业界使用非常广泛 spark背后就是由akka驱动的 要写消息驱动的编程模型都首推akka 下...

scala之Akka的Actor模型(上)

原文地址:http://my.oschina.net/jingxing05/blog/287213 明确并行和并发 看两张图 并行parallelism 并发c...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)