Author: mduerig
Date: Tue Mar 18 10:05:41 2014
New Revision: 1578806
URL: http://svn.apache.org/r1578806
Log:
OAK-1160: Generic interfaces for operation tasks
Per component interfaces for management tasks
Added:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/backup/FileStoreBackupRestoreMBean.java
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobGCMBean.java
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/RevisionGCMBean.java
Added:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/backup/FileStoreBackupRestoreMBean.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/backup/FileStoreBackupRestoreMBean.java?rev=1578806&view=auto
==============================================================================
---
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/backup/FileStoreBackupRestoreMBean.java
(added)
+++
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/backup/FileStoreBackupRestoreMBean.java
Tue Mar 18 10:05:41 2014
@@ -0,0 +1,64 @@
+/*
+ * 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.jackrabbit.oak.plugins.backup;
+
+import javax.annotation.Nonnull;
+
+/**
+ * MBean for backing up and restoring a {@code NodeStore}.
+ *
+ * @see org.apache.jackrabbit.oak.api.jmx.RepositoryManagementMBean
+ */
+public interface FileStoreBackupRestoreMBean {
+
+ /**
+ * Initiate a backup operation.
+ *
+ * @return the status of the operation right after it was initiated
+ */
+ @Nonnull
+ String startBackup();
+
+ /**
+ * Backup status
+ *
+ * @return the status of the ongoing operation or if none the terminal
+ * status of the last operation or {@code null} if none.
+ */
+ @Nonnull
+ String getBackupStatus();
+
+ /**
+ * Initiate a restore operation.
+ *
+ * @return the status of the operation right after it was initiated
+ */
+ @Nonnull
+ String startRestore();
+
+ /**
+ * Restore status
+ *
+ * @return the status of the ongoing operation or if none the terminal
+ * status of the last operation or {@code null} if none.
+ */
+ @Nonnull
+ String getRestoreStatus();
+}
Added:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobGCMBean.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobGCMBean.java?rev=1578806&view=auto
==============================================================================
---
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobGCMBean.java
(added)
+++
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/blob/BlobGCMBean.java
Tue Mar 18 10:05:41 2014
@@ -0,0 +1,49 @@
+/*
+ * 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.jackrabbit.oak.plugins.blob;
+
+import javax.annotation.Nonnull;
+
+/**
+ * MBean for starting and monitoring the progress of
+ * blob garbage collection.
+ *
+ * @see org.apache.jackrabbit.oak.api.jmx.RepositoryManagementMBean
+ */
+public interface BlobGCMBean {
+
+ /**
+ * Initiate a data store garbage collection operation
+ *
+ * @return the status of the operation right after it was initiated
+ */
+ @Nonnull
+ String startBlobGC();
+
+ /**
+ * Data store garbage collection status
+ *
+ * @return the status of the ongoing operation or if none the terminal
+ * status of the last operation or {@code null} if none.
+ */
+ @Nonnull
+ String getBlobGCStatus();
+
+}
Added:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/RevisionGCMBean.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/RevisionGCMBean.java?rev=1578806&view=auto
==============================================================================
---
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/RevisionGCMBean.java
(added)
+++
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/RevisionGCMBean.java
Tue Mar 18 10:05:41 2014
@@ -0,0 +1,48 @@
+/*
+ * 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.jackrabbit.oak.spi.state;
+
+import javax.annotation.Nonnull;
+
+/**
+ * MBean for starting and monitoring the progress of
+ * revision garbage collection.
+ *
+ * @see org.apache.jackrabbit.oak.api.jmx.RepositoryManagementMBean
+ */
+public interface RevisionGCMBean {
+
+ /**
+ * Initiate a revision garbage collection operation
+ *
+ * @return the status of the operation right after it was initiated
+ */
+ @Nonnull
+ String startRevisionGC();
+
+ /**
+ * Revision garbage collection status
+ *
+ * @return the status of the ongoing operation or if none the terminal
+ * status of the last operation or {@code null} if none.
+ */
+ @Nonnull
+ String getRevisionGCStatus();
+}