fixed all deprecations execept in grizzly code
This commit is contained in:
parent
8c67eeb139
commit
5736cd9cc1
9 changed files with 20 additions and 25 deletions
|
|
@ -138,7 +138,7 @@ object AMQP {
|
|||
}
|
||||
|
||||
override def shutdown = {
|
||||
asMap(connections).values.foreach(_ ! Stop)
|
||||
asMap(connections).valuesIterator.foreach(_ ! Stop)
|
||||
exit
|
||||
}
|
||||
|
||||
|
|
@ -400,7 +400,7 @@ object AMQP {
|
|||
throw cause
|
||||
|
||||
case Stop =>
|
||||
listeners.elements.toList.map(_._2).foreach(unregisterListener(_))
|
||||
listeners.iterator.toList.map(_._2).foreach(unregisterListener(_))
|
||||
disconnect
|
||||
exit
|
||||
|
||||
|
|
@ -417,7 +417,7 @@ object AMQP {
|
|||
connection = connectionFactory.newConnection(hostname, port)
|
||||
channel = connection.createChannel
|
||||
channel.exchangeDeclare(exchangeName.toString, exchangeType.toString, passive, durable, autoDelete, jConfigMap)
|
||||
listeners.elements.toList.map(_._2).foreach(registerListener)
|
||||
listeners.iterator.toList.map(_._2).foreach(registerListener)
|
||||
if (shutdownListener.isDefined) connection.addShutdownListener(shutdownListener.get)
|
||||
}
|
||||
|
||||
|
|
@ -465,7 +465,7 @@ object AMQP {
|
|||
"MessageConsumerListener [" + listener + "] does not have a tag")
|
||||
listener.tag.get == listenerTag
|
||||
}
|
||||
listeners.elements.toList.map(_._2).find(hasTag(_, listenerTag)) match {
|
||||
listeners.iterator.toList.map(_._2).find(hasTag(_, listenerTag)) match {
|
||||
case None => log.error(
|
||||
"Could not find message listener for tag [%s]; can't shut listener down", listenerTag)
|
||||
case Some(listener) =>
|
||||
|
|
@ -485,7 +485,7 @@ object AMQP {
|
|||
"Can't unregister message consumer listener [%s]; no such listener",
|
||||
listener.toString(exchangeName))
|
||||
case Some(listener) =>
|
||||
listeners - listener
|
||||
listeners -= listener
|
||||
listener.tag match {
|
||||
case None => log.warning(
|
||||
"Can't unregister message consumer listener [%s]; no listener tag",
|
||||
|
|
|
|||
|
|
@ -131,7 +131,6 @@ trait CassandraSession extends Closeable with Flushable {
|
|||
|
||||
def insert(key: String, colPath: ColumnPath, value: Array[Byte], timestamp: Long, consistencyLevel: Int) = ++|(key, colPath, value, timestamp, consistencyLevel)
|
||||
|
||||
|
||||
def insert(key: String, batch: Map[String, List[ColumnOrSuperColumn]]): Unit = ++|(key, batch)
|
||||
|
||||
def insert(key: String, batch: Map[String, List[ColumnOrSuperColumn]], consistencyLevel: Int): Unit = ++|(key, batch, consistencyLevel)
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ private[akka] object CassandraStorageBackend extends
|
|||
for (entry <- entries) {
|
||||
val columnOrSuperColumn = new ColumnOrSuperColumn
|
||||
columnOrSuperColumn.setColumn(new Column(entry._1, entry._2, System.currentTimeMillis))
|
||||
batch + (MAP_COLUMN_PARENT.getColumn_family -> List(columnOrSuperColumn))
|
||||
batch += (MAP_COLUMN_PARENT.getColumn_family -> List(columnOrSuperColumn))
|
||||
}
|
||||
sessions.withSession {
|
||||
_ ++| (name, batch, CONSISTENCY_LEVEL)
|
||||
|
|
|
|||
|
|
@ -71,10 +71,6 @@ object SoftRefPool {
|
|||
def apply[T](factory: PoolItemFactory[T]) = new PoolBridge[T,SoftReferenceObjectPool] {
|
||||
val impl = new SoftReferenceObjectPool(toPoolableObjectFactory(factory))
|
||||
}
|
||||
|
||||
def apply[T](factory: PoolItemFactory[T], initSize: Int) = new PoolBridge[T,SoftReferenceObjectPool] {
|
||||
val impl = new SoftReferenceObjectPool(toPoolableObjectFactory(factory),initSize)
|
||||
}
|
||||
}
|
||||
|
||||
trait TransportFactory[T <: TTransport] extends PoolItemFactory[T] {
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ trait PersistentMap[K, V] extends scala.collection.mutable.Map[K, V]
|
|||
*
|
||||
* @author <a href="http://jonasboner.com">Jonas Bonér</a>
|
||||
*/
|
||||
trait PersistentVector[T] extends RandomAccessSeq[T] with Transactional with Committable {
|
||||
trait PersistentVector[T] extends IndexedSeq[T] with Transactional with Committable {
|
||||
protected val newElems = TransactionalState.newVector[T]
|
||||
protected val updatedElems = TransactionalState.newMap[Int, T]
|
||||
protected val removedElems = TransactionalState.newVector[T]
|
||||
|
|
@ -218,9 +218,9 @@ trait PersistentVector[T] extends RandomAccessSeq[T] with Transactional with Com
|
|||
else storage.getVectorStorageEntryFor(uuid, index)
|
||||
}
|
||||
|
||||
override def slice(start: Int, count: Int): RandomAccessSeq[T] = slice(Some(start), None, count)
|
||||
override def slice(start: Int, count: Int): IndexedSeq[T] = slice(Some(start), None, count)
|
||||
|
||||
def slice(start: Option[Int], finish: Option[Int], count: Int): RandomAccessSeq[T] = {
|
||||
def slice(start: Option[Int], finish: Option[Int], count: Int): IndexedSeq[T] = {
|
||||
val buffer = new scala.collection.mutable.ArrayBuffer[T]
|
||||
storage.getVectorStorageRangeFor(uuid, start, finish, count).foreach(buffer.append(_))
|
||||
buffer
|
||||
|
|
@ -411,7 +411,7 @@ trait PersistentQueue[A] extends scala.collection.mutable.Queue[A]
|
|||
enqueue(elems.toList: _*)
|
||||
this
|
||||
}
|
||||
def ++=(elems: Iterable[A]): Unit = this ++= elems.elements
|
||||
def ++=(elems: Iterable[A]): Unit = this ++= elems.iterator
|
||||
|
||||
override def dequeueFirst(p: A => Boolean): Option[A] =
|
||||
throw new UnsupportedOperationException("dequeueFirst not supported")
|
||||
|
|
@ -537,7 +537,7 @@ trait PersistentSortedSet[A]
|
|||
else if (end >= l) (l - 1)
|
||||
else end
|
||||
// slice is open at the end, we need a closed end range
|
||||
ts.elements.slice(s, e + 1).toList
|
||||
ts.iterator.slice(s, e + 1).toList
|
||||
}
|
||||
|
||||
private def register = {
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ private[akka] object MongoStorageBackend extends
|
|||
else count
|
||||
|
||||
val n =
|
||||
List(m.keySet.toArray: _*).asInstanceOf[List[String]].sort((e1, e2) => (e1 compareTo e2) < 0).slice(s, s + cnt)
|
||||
List(m.keySet.toArray: _*).asInstanceOf[List[String]].sortWith((e1, e2) => (e1 compareTo e2) < 0).slice(s, s + cnt)
|
||||
val vals =
|
||||
for(s <- n)
|
||||
yield (s, serializer.in[AnyRef](m.get(s).asInstanceOf[Array[Byte]]))
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ private [akka] object RedisStorageBackend extends
|
|||
.toList
|
||||
case ((Some(s), None, c)) if c > 0 =>
|
||||
wholeSorted.from(s)
|
||||
.elements
|
||||
.iterator
|
||||
.take(count)
|
||||
.map(e => (e._1.getBytes, e._2))
|
||||
.toList
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import sample.lift.{PersistentSimpleService, SimpleService}
|
|||
* A class that's instantiated early and run. It allows the application
|
||||
* to modify lift's environment
|
||||
*/
|
||||
class Boot {
|
||||
class Boot extends Logging {
|
||||
def boot {
|
||||
// where to search snippet
|
||||
LiftRules.addToPackages("sample.lift")
|
||||
|
|
@ -29,7 +29,7 @@ class Boot {
|
|||
|
||||
LiftRules.authentication = HttpBasicAuthentication("lift") {
|
||||
case ("someuser", "1234", req) => {
|
||||
Log.info("You are now authenticated !")
|
||||
log.info("You are now authenticated !")
|
||||
userRoles(AuthRole("admin"))
|
||||
true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,8 +92,8 @@ class AkkaSecurityFilterFactory extends ResourceFilterFactory with Logging {
|
|||
case Some(r) if r.isInstanceOf[Response] =>
|
||||
throw new WebApplicationException(r.asInstanceOf[Response])
|
||||
case None => throw new WebApplicationException(408)
|
||||
case x => {
|
||||
log.error("Authenticator replied with unexpected result [%s]", x);
|
||||
case unknown => {
|
||||
log.warning("Authenticator replied with unexpected result [%s]", unknown);
|
||||
throw new WebApplicationException(Response.Status.INTERNAL_SERVER_ERROR)
|
||||
}
|
||||
}
|
||||
|
|
@ -256,9 +256,9 @@ trait DigestAuthenticationActor extends AuthenticationActor[DigestCredentials] {
|
|||
protected val invalidateNonces: PartialFunction[Any, Unit] = {
|
||||
case InvalidateNonces =>
|
||||
val ts = System.currentTimeMillis
|
||||
nonceMap.retain((k, v) => (ts - v) < nonceValidityPeriod)
|
||||
case e =>
|
||||
log.info("Don't know what to do with: " + e)
|
||||
nonceMap.filter(tuple => (ts - tuple._2) < nonceValidityPeriod)
|
||||
case unknown =>
|
||||
log.error("Don't know what to do with: ", unknown)
|
||||
}
|
||||
|
||||
//Schedule the invalidation of nonces
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue