Commit d0f1b134 authored by Paul Asmuth's avatar Paul Asmuth
Browse files

hackety hack

parent a45ac8a4
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
// FnordMetric Enterprise
//   (c) 2011-2013 Paul Asmuth <paul@paulasmuth.com>
//
// Licensed under the MIT License (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of
// the License at: http://opensource.org/licenses/MIT

package com.fnordmetric.enterprise

case class BucketKey(key: String, mode: String, flush_timeout: String)

trait Bucket {

}
+15 −0
Original line number Diff line number Diff line
// FnordMetric Enterprise
//   (c) 2011-2013 Paul Asmuth <paul@paulasmuth.com>
//
// Licensed under the MIT License (the "License"); you may not use this
// file except in compliance with the License. You may obtain a copy of
// the License at: http://opensource.org/licenses/MIT

package com.fnordmetric.enterprise

object BucketFactory {

  def find_or_create_bucket(key: BucketKey) =
    null

}
+5 −2
Original line number Diff line number Diff line

// FnordMetric Enterprise
//   (c) 2011-2013 Paul Asmuth <paul@paulasmuth.com>
//
@@ -10,6 +9,10 @@ package com.fnordmetric.enterprise

class SampleInstruction(key: String, mode: String, flush_interval: String, value: String) extends AbstractInstruction {

  def execute : String = "OK"
  def execute : String = {
    val bucket_key = BucketKey(key, mode, flush_interval)
    val bucket = BucketFactory.find_or_create_bucket(bucket_key)
    "OK"
  }

}