JAMES-2096 Defines API for migration tasks
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/4f13da5a Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/4f13da5a Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/4f13da5a Branch: refs/heads/master Commit: 4f13da5ad42ffe15f63b3552deb0a873579dc938 Parents: 0e1cfb1 Author: quynhn <[email protected]> Authored: Wed Jul 19 17:54:17 2017 +0700 Committer: benwa <[email protected]> Committed: Tue Jul 25 17:50:52 2017 +0700 ---------------------------------------------------------------------- .../cassandra/mail/migration/Migration.java | 29 ++++++++++++++++++++ .../mail/migration/V1ToV2Migration.java | 7 ++++- 2 files changed, 35 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/4f13da5a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/Migration.java ---------------------------------------------------------------------- diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/Migration.java b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/Migration.java new file mode 100644 index 0000000..cac3fd7 --- /dev/null +++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/Migration.java @@ -0,0 +1,29 @@ +/**************************************************************** + * 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.james.mailbox.cassandra.mail.migration; + +public interface Migration { + /** + * Runs the migration + * + * @return Return true if fully migrated. Returns false otherwise. + */ + boolean run(); +} http://git-wip-us.apache.org/repos/asf/james-project/blob/4f13da5a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/V1ToV2Migration.java ---------------------------------------------------------------------- diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/V1ToV2Migration.java b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/V1ToV2Migration.java index e794a8e..d3a8cb6 100644 --- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/V1ToV2Migration.java +++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/migration/V1ToV2Migration.java @@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory; import com.github.fge.lambdas.Throwing; import com.google.common.collect.ImmutableList; -public class V1ToV2Migration { +public class V1ToV2Migration implements Migration { private static final Logger LOGGER = LoggerFactory.getLogger(V1ToV2MigrationThread.class); @@ -104,4 +104,9 @@ public class V1ToV2Migration { } return messageV1; } + + @Override + public boolean run() { + return false; + } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
