Package

com.eharmony

aloha

Permalink

package aloha

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. aloha
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class AlohaException extends RuntimeException

    Permalink
  2. class NoEvictionCache extends AnyRef

    Permalink

    A cache that is a hybrid of the Memoizer in Listing 5.19 in Java Concurrency in Practice and https://www.bionicspirit.com/blog/2012/07/02/love-scala.html.

    A cache that is a hybrid of the Memoizer in Listing 5.19 in Java Concurrency in Practice and https://www.bionicspirit.com/blog/2012/07/02/love-scala.html. Makes sure to put a Promise of the memoized value into the cache only if it's not already there. Then only compute the actual value (in a Future) and complete the Promise with the Future only if the promise was successfully inserted atomically. Otherwise, another promise was snuck in so use the Future associated with that Promise.

    val cache = new NoEvictionCache
    val slow = () => {Thread.sleep(5000); println("executing slow()"); 1}
    val t1 = System.nanoTime                                      // Start the clock
    val futures = Seq(                                            // Returns immediately (non-blocking)
          cache("one"){slow()},                                   // Only execute slow() once.
          cache("one"){slow()})
    val a = Future.fold(futures)(0)(_+_)                          // Returns immediately (non-blocking)
    val t2 = System.nanoTime
    println("Runtime for setup: " + (1.0e-9*(t2-t1)).toFloat)     // Prints: "Runtime for setup: 0.001041"
    a.onSuccess{ case i =>
      val t3 = System.nanoTime                                    // Determine elapsed time.
      println(i + ", runtime: " + (1.0e-9*(t3-t1)).toFloat)       // Prints: "2, runtime: 5.002082"
    }

Value Members

  1. package algebra

    Permalink
  2. package annotate

    Permalink
  3. package audit

    Permalink
  4. package dataset

    Permalink

    This package name is kept to eHarmony compatibility.

  5. package ex

    Permalink
  6. package factory

    Permalink
  7. package feature

    Permalink
  8. package id

    Permalink
  9. package io

    Permalink
  10. package models

    Permalink
  11. def pkgName: String

    Permalink
  12. package reflect

    Permalink

    A facade layer on top of the scala reflection APIs to avoid bugs currently in the TypeTag implementation.

    A facade layer on top of the scala reflection APIs to avoid bugs currently in the TypeTag implementation.

    Because of SI-7555, we want to insulate ourselves from reflection bugs. We do want to make the switch painless when we finally go from scala.reflect.Manifest to scala.reflect.runtime.universe.TypeTag based reflection. To accomplish this, we add a layer of indirection and later, we'll only have to modify the facade assuming that all of the code using reflection refers to the facade. Once everything has settled down on the scala reflection landscape, we'll refer directly to the reflection APIs.

  13. package semantics

    Permalink
  14. package util

    Permalink
  15. def version: String

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped