AMQ-4858: Moved scala source file from java to scala dir. Thanks to Jaromir Hamala for patch.
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/2119a70d Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/2119a70d Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/2119a70d Branch: refs/heads/activemq-5.9 Commit: 2119a70d8bffe11b2ee3f9bc50f8ba31e8b31c53 Parents: 351f05e Author: Claus Ibsen <[email protected]> Authored: Fri Nov 22 11:25:08 2013 +0100 Committer: Hadrian Zbarcea <[email protected]> Committed: Wed Mar 12 12:11:10 2014 -0400 ---------------------------------------------------------------------- .../ReplicatedLevelDBStoreTrait.scala | 66 -------------------- .../ReplicatedLevelDBStoreTrait.scala | 66 ++++++++++++++++++++ 2 files changed, 66 insertions(+), 66 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq/blob/2119a70d/activemq-leveldb-store/src/main/java/org/apache/activemq/leveldb/replicated/ReplicatedLevelDBStoreTrait.scala ---------------------------------------------------------------------- diff --git a/activemq-leveldb-store/src/main/java/org/apache/activemq/leveldb/replicated/ReplicatedLevelDBStoreTrait.scala b/activemq-leveldb-store/src/main/java/org/apache/activemq/leveldb/replicated/ReplicatedLevelDBStoreTrait.scala deleted file mode 100644 index 1c522aa..0000000 --- a/activemq-leveldb-store/src/main/java/org/apache/activemq/leveldb/replicated/ReplicatedLevelDBStoreTrait.scala +++ /dev/null @@ -1,66 +0,0 @@ -/** - * 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.activemq.leveldb.replicated - -import scala.reflect.BeanProperty -import java.util.UUID -import org.apache.activemq.leveldb.LevelDBStore -import org.apache.activemq.leveldb.util.FileSupport._ -import java.io.File - -object ReplicatedLevelDBStoreTrait { - - def create_uuid = UUID.randomUUID().toString - - def node_id(directory:File):String = { - val nodeid_file = directory / "nodeid.txt" - if( nodeid_file.exists() ) { - nodeid_file.readText() - } else { - val rc = create_uuid - nodeid_file.getParentFile.mkdirs() - nodeid_file.writeText(rc) - rc - } - } -} - -/** - */ -trait ReplicatedLevelDBStoreTrait extends LevelDBStore { - - @BeanProperty - var securityToken = "" - - def node_id = ReplicatedLevelDBStoreTrait.node_id(directory) - - def storeId:String = { - val storeid_file = directory / "storeid.txt" - if( storeid_file.exists() ) { - storeid_file.readText() - } else { - null - } - } - - def storeId_=(value:String) { - val storeid_file = directory / "storeid.txt" - storeid_file.writeText(value) - } - - -} http://git-wip-us.apache.org/repos/asf/activemq/blob/2119a70d/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ReplicatedLevelDBStoreTrait.scala ---------------------------------------------------------------------- diff --git a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ReplicatedLevelDBStoreTrait.scala b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ReplicatedLevelDBStoreTrait.scala new file mode 100644 index 0000000..1c522aa --- /dev/null +++ b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ReplicatedLevelDBStoreTrait.scala @@ -0,0 +1,66 @@ +/** + * 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.activemq.leveldb.replicated + +import scala.reflect.BeanProperty +import java.util.UUID +import org.apache.activemq.leveldb.LevelDBStore +import org.apache.activemq.leveldb.util.FileSupport._ +import java.io.File + +object ReplicatedLevelDBStoreTrait { + + def create_uuid = UUID.randomUUID().toString + + def node_id(directory:File):String = { + val nodeid_file = directory / "nodeid.txt" + if( nodeid_file.exists() ) { + nodeid_file.readText() + } else { + val rc = create_uuid + nodeid_file.getParentFile.mkdirs() + nodeid_file.writeText(rc) + rc + } + } +} + +/** + */ +trait ReplicatedLevelDBStoreTrait extends LevelDBStore { + + @BeanProperty + var securityToken = "" + + def node_id = ReplicatedLevelDBStoreTrait.node_id(directory) + + def storeId:String = { + val storeid_file = directory / "storeid.txt" + if( storeid_file.exists() ) { + storeid_file.readText() + } else { + null + } + } + + def storeId_=(value:String) { + val storeid_file = directory / "storeid.txt" + storeid_file.writeText(value) + } + + +}
