| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (17) --> |
| <title>ScheduledChore (Apache HBase 4.0.0-alpha-1-SNAPSHOT API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="description" content="declaration: package: org.apache.hadoop.hbase, class: ScheduledChore"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jquery-3.6.1.min.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var evenRowColor = "even-row-color"; |
| var oddRowColor = "odd-row-color"; |
| var tableTab = "table-tab"; |
| var activeTableTab = "active-table-tab"; |
| var pathtoroot = "../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="class-use/ScheduledChore.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field-summary">Field</a> | </li> |
| <li><a href="#constructor-summary">Constr</a> | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li><a href="#field-detail">Field</a> | </li> |
| <li><a href="#constructor-detail">Constr</a> | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><label for="search-input">SEARCH:</label> |
| <input type="text" id="search-input" value="search" disabled="disabled"> |
| <input type="reset" id="reset-button" value="reset" disabled="disabled"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.hadoop.hbase</a></div> |
| <h1 title="Class ScheduledChore" class="title">Class ScheduledChore</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a> |
| <div class="inheritance">org.apache.hadoop.hbase.ScheduledChore</div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Runnable.html" title="class or interface in java.lang" class="external-link">Runnable</a></code></dd> |
| </dl> |
| <dl class="notes"> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><code><a href="master/balancer/BalancerChore.html" title="class in org.apache.hadoop.hbase.master.balancer">BalancerChore</a></code>, <code><a href="regionserver/BrokenStoreFileCleaner.html" title="class in org.apache.hadoop.hbase.regionserver">BrokenStoreFileCleaner</a></code>, <code><a href="master/janitor/CatalogJanitor.html" title="class in org.apache.hadoop.hbase.master.janitor">CatalogJanitor</a></code>, <code><a href="master/cleaner/CleanerChore.html" title="class in org.apache.hadoop.hbase.master.cleaner">CleanerChore</a></code>, <code><a href="master/balancer/ClusterStatusChore.html" title="class in org.apache.hadoop.hbase.master.balancer">ClusterStatusChore</a></code>, <code><a href="master/ClusterStatusPublisher.html" title="class in org.apache.hadoop.hbase.master">ClusterStatusPublisher</a></code>, <code><a href="regionserver/CompactedHFilesDischarger.html" title="class in org.apache.hadoop.hbase.regionserver">CompactedHFilesDischarger</a></code>, <code><a href="ExecutorStatusChore.html" title="class in org.apache.hadoop.hbase">ExecutorStatusChore</a></code>, <code><a href="quotas/FileSystemUtilizationChore.html" title="class in org.apache.hadoop.hbase.quotas">FileSystemUtilizationChore</a></code>, <code><a href="master/hbck/HbckChore.html" title="class in org.apache.hadoop.hbase.master.hbck">HbckChore</a></code>, <code><a href="HealthCheckChore.html" title="class in org.apache.hadoop.hbase">HealthCheckChore</a></code>, <code><a href="regionserver/HeapMemoryManager.HeapMemoryTunerChore.html" title="class in org.apache.hadoop.hbase.regionserver">HeapMemoryManager.HeapMemoryTunerChore</a></code>, <code><a href="regionserver/HRegionServer.CompactionChecker.html" title="class in org.apache.hadoop.hbase.regionserver">HRegionServer.CompactionChecker</a></code>, <code><a href="regionserver/HRegionServer.PeriodicMemStoreFlusher.html" title="class in org.apache.hadoop.hbase.regionserver">HRegionServer.PeriodicMemStoreFlusher</a></code>, <code><a href="mob/MobFileCleanerChore.html" title="class in org.apache.hadoop.hbase.mob">MobFileCleanerChore</a></code>, <code><a href="mob/MobFileCompactionChore.html" title="class in org.apache.hadoop.hbase.mob">MobFileCompactionChore</a></code>, <code><a href="namequeues/NamedQueueServiceChore.html" title="class in org.apache.hadoop.hbase.namequeues">NamedQueueServiceChore</a></code>, <code><a href="master/OldWALsDirSizeChore.html" title="class in org.apache.hadoop.hbase.master">OldWALsDirSizeChore</a></code>, <code><a href="quotas/QuotaCache.QuotaRefresherChore.html" title="class in org.apache.hadoop.hbase.quotas">QuotaCache.QuotaRefresherChore</a></code>, <code><a href="quotas/QuotaObserverChore.html" title="class in org.apache.hadoop.hbase.quotas">QuotaObserverChore</a></code>, <code><a href="master/normalizer/RegionNormalizerChore.html" title="class in org.apache.hadoop.hbase.master.normalizer">RegionNormalizerChore</a></code>, <code><a href="quotas/RegionSizeReportingChore.html" title="class in org.apache.hadoop.hbase.quotas">RegionSizeReportingChore</a></code>, <code><a href="master/RegionsRecoveryChore.html" title="class in org.apache.hadoop.hbase.master">RegionsRecoveryChore</a></code>, <code><a href="replication/regionserver/Replication.ReplicationStatisticsChore.html" title="class in org.apache.hadoop.hbase.replication.regionserver">Replication.ReplicationStatisticsChore</a></code>, <code><a href="master/cleaner/ReplicationBarrierCleaner.html" title="class in org.apache.hadoop.hbase.master.cleaner">ReplicationBarrierCleaner</a></code>, <code><a href="replication/regionserver/ReplicationMarkerChore.html" title="class in org.apache.hadoop.hbase.replication.regionserver">ReplicationMarkerChore</a></code>, <code><a href="replication/ReplicationSinkServiceImpl.ReplicationStatisticsChore.html" title="class in org.apache.hadoop.hbase.replication">ReplicationSinkServiceImpl.ReplicationStatisticsChore</a></code>, <code><a href="master/migrate/RollingUpgradeChore.html" title="class in org.apache.hadoop.hbase.master.migrate">RollingUpgradeChore</a></code>, <code><a href="mob/RSMobFileCleanerChore.html" title="class in org.apache.hadoop.hbase.mob">RSMobFileCleanerChore</a></code>, <code><a href="master/ServerManager.FlushedSequenceIdFlusher.html" title="class in org.apache.hadoop.hbase.master">ServerManager.FlushedSequenceIdFlusher</a></code>, <code><a href="master/cleaner/SnapshotCleanerChore.html" title="class in org.apache.hadoop.hbase.master.cleaner">SnapshotCleanerChore</a></code>, <code><a href="quotas/SnapshotQuotaObserverChore.html" title="class in org.apache.hadoop.hbase.quotas">SnapshotQuotaObserverChore</a></code>, <code><a href="quotas/SpaceQuotaRefresherChore.html" title="class in org.apache.hadoop.hbase.quotas">SpaceQuotaRefresherChore</a></code>, <code><a href="master/SplitLogManager.TimeoutMonitor.html" title="class in org.apache.hadoop.hbase.master">SplitLogManager.TimeoutMonitor</a></code>, <code><a href="regionserver/StorefileRefresherChore.html" title="class in org.apache.hadoop.hbase.regionserver">StorefileRefresherChore</a></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="annotations">@Private |
| </span><span class="modifiers">public abstract class </span><span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-41">ScheduledChore</a></span> |
| <span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> |
| implements <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Runnable.html" title="class or interface in java.lang" class="external-link">Runnable</a></span></div> |
| <div class="block">ScheduledChore is a task performed on a period in hbase. ScheduledChores become active once |
| scheduled with a <a href="ChoreService.html" title="class in org.apache.hadoop.hbase"><code>ChoreService</code></a> via <a href="ChoreService.html#scheduleChore(org.apache.hadoop.hbase.ScheduledChore)"><code>ChoreService.scheduleChore(ScheduledChore)</code></a>. The |
| chore is run in a <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/ScheduledThreadPoolExecutor.html" title="class or interface in java.util.concurrent" class="external-link"><code>ScheduledThreadPoolExecutor</code></a> and competes with other ScheduledChores for |
| access to the threads in the core thread pool. If an unhandled exception occurs, the chore |
| cancellation is logged. Implementers should consider whether or not the Chore will be able to |
| execute within the defined period. It is bad practice to define a ScheduledChore whose execution |
| time exceeds its period since it will try to hog one of the threads in the <a href="ChoreService.html" title="class in org.apache.hadoop.hbase"><code>ChoreService</code></a>'s |
| thread pool. |
| <p/> |
| Don't subclass ScheduledChore if the task relies on being woken up for something to do, such as |
| an entry being added to a queue, etc.</div> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <li> |
| <section class="field-summary" id="field-summary"> |
| <h2>Field Summary</h2> |
| <div class="caption"><span>Fields</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Field</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code>private <a href="ChoreService.html" title="class in org.apache.hadoop.hbase">ChoreService</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#choreService" class="member-name-link">choreService</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Interface to the ChoreService that this ScheduledChore is scheduled with.</div> |
| </div> |
| <div class="col-first odd-row-color"><code>private static final long</code></div> |
| <div class="col-second odd-row-color"><code><a href="#DEFAULT_INITIAL_DELAY" class="member-name-link">DEFAULT_INITIAL_DELAY</a></code></div> |
| <div class="col-last odd-row-color"> </div> |
| <div class="col-first even-row-color"><code>private static final <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/TimeUnit.html" title="class or interface in java.util.concurrent" class="external-link">TimeUnit</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#DEFAULT_TIME_UNIT" class="member-name-link">DEFAULT_TIME_UNIT</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Default values for scheduling parameters should they be excluded during construction</div> |
| </div> |
| <div class="col-first odd-row-color"><code>private boolean</code></div> |
| <div class="col-second odd-row-color"><code><a href="#initialChoreComplete" class="member-name-link">initialChoreComplete</a></code></div> |
| <div class="col-last odd-row-color"> </div> |
| <div class="col-first even-row-color"><code>private final long</code></div> |
| <div class="col-second even-row-color"><code><a href="#initialDelay" class="member-name-link">initialDelay</a></code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-first odd-row-color"><code>private static final org.slf4j.Logger</code></div> |
| <div class="col-second odd-row-color"><code><a href="#LOG" class="member-name-link">LOG</a></code></div> |
| <div class="col-last odd-row-color"> </div> |
| <div class="col-first even-row-color"><code>private final <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#name" class="member-name-link">name</a></code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-first odd-row-color"><code>private final int</code></div> |
| <div class="col-second odd-row-color"><code><a href="#period" class="member-name-link">period</a></code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Scheduling parameters.</div> |
| </div> |
| <div class="col-first even-row-color"><code>private final <a href="Stoppable.html" title="interface in org.apache.hadoop.hbase">Stoppable</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#stopper" class="member-name-link">stopper</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">A means by which a ScheduledChore can be stopped.</div> |
| </div> |
| <div class="col-first odd-row-color"><code>private long</code></div> |
| <div class="col-second odd-row-color"><code><a href="#timeOfLastRun" class="member-name-link">timeOfLastRun</a></code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Variables that encapsulate the meaningful state information</div> |
| </div> |
| <div class="col-first even-row-color"><code>private long</code></div> |
| <div class="col-second even-row-color"><code><a href="#timeOfThisRun" class="member-name-link">timeOfThisRun</a></code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-first odd-row-color"><code>private final <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/TimeUnit.html" title="class or interface in java.util.concurrent" class="external-link">TimeUnit</a></code></div> |
| <div class="col-second odd-row-color"><code><a href="#timeUnit" class="member-name-link">timeUnit</a></code></div> |
| <div class="col-last odd-row-color"> </div> |
| </div> |
| </section> |
| </li> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <li> |
| <section class="constructor-summary" id="constructor-summary"> |
| <h2>Constructor Summary</h2> |
| <div class="caption"><span>Constructors</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier</div> |
| <div class="table-header col-second">Constructor</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code>protected </code></div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">ScheduledChore</a>()</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Construct a ScheduledChore</div> |
| </div> |
| <div class="col-first odd-row-color"><code> </code></div> |
| <div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(java.lang.String,org.apache.hadoop.hbase.Stoppable,int)" class="member-name-link">ScheduledChore</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="Stoppable.html" title="interface in org.apache.hadoop.hbase">Stoppable</a> stopper, |
| int period)</code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Construct a ScheduledChore</div> |
| </div> |
| <div class="col-first even-row-color"><code> </code></div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(java.lang.String,org.apache.hadoop.hbase.Stoppable,int,long)" class="member-name-link">ScheduledChore</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="Stoppable.html" title="interface in org.apache.hadoop.hbase">Stoppable</a> stopper, |
| int period, |
| long initialDelay)</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Construct a ScheduledChore</div> |
| </div> |
| <div class="col-first odd-row-color"><code> </code></div> |
| <div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(java.lang.String,org.apache.hadoop.hbase.Stoppable,int,long,java.util.concurrent.TimeUnit)" class="member-name-link">ScheduledChore</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="Stoppable.html" title="interface in org.apache.hadoop.hbase">Stoppable</a> stopper, |
| int period, |
| long initialDelay, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/TimeUnit.html" title="class or interface in java.util.concurrent" class="external-link">TimeUnit</a> unit)</code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Construct a ScheduledChore</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#cancel()" class="member-name-link">cancel</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#cancel(boolean)" class="member-name-link">cancel</a><wbr>(boolean mayInterruptIfRunning)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>protected abstract void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#chore()" class="member-name-link">chore</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">The task to execute on each scheduled execution of the Chore</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#choreForTesting()" class="member-name-link">choreForTesting</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#cleanup()" class="member-name-link">cleanup</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Override to run cleanup tasks when the Chore encounters an error and must stop running</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) <a href="ChoreService.html" title="class in org.apache.hadoop.hbase">ChoreService</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getChoreService()" class="member-name-link">getChoreService</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>long</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getInitialDelay()" class="member-name-link">getInitialDelay</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns initial delay before executing chore in getTimeUnit() units</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>private double</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMaximumAllowedTimeBetweenRuns()" class="member-name-link">getMaximumAllowedTimeBetweenRuns</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns max allowed time in millis between runs.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getName()" class="member-name-link">getName</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPeriod()" class="member-name-link">getPeriod</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns period to execute chore in getTimeUnit() units</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Stoppable.html" title="interface in org.apache.hadoop.hbase">Stoppable</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getStopper()" class="member-name-link">getStopper</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) long</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getTimeBetweenRuns()" class="member-name-link">getTimeBetweenRuns</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Return how long in millis has it been since this chore last run.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) long</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getTimeOfLastRun()" class="member-name-link">getTimeOfLastRun</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) long</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getTimeOfThisRun()" class="member-name-link">getTimeOfThisRun</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/TimeUnit.html" title="class or interface in java.util.concurrent" class="external-link">TimeUnit</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getTimeUnit()" class="member-name-link">getTimeUnit</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#initialChore()" class="member-name-link">initialChore</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Override to run a task before we start looping.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isInitialChoreComplete()" class="member-name-link">isInitialChoreComplete</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isScheduled()" class="member-name-link">isScheduled</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns true when this Chore is scheduled with a ChoreService</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>private boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isValidTime(long)" class="member-name-link">isValidTime</a><wbr>(long time)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Return true if time is earlier or equal to current time</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>private boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#missedStartTime()" class="member-name-link">missedStartTime</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns true when the time between runs exceeds the acceptable threshold</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>private void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#onChoreMissedStartTime()" class="member-name-link">onChoreMissedStartTime</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Notify the ChoreService that this chore has missed its start time.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#run()" class="member-name-link">run</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>(package private) void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setChoreService(org.apache.hadoop.hbase.ChoreService)" class="member-name-link">setChoreService</a><wbr>(<a href="ChoreService.html" title="class in org.apache.hadoop.hbase">ChoreService</a> service)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#shutdown()" class="member-name-link">shutdown</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Call <a href="#shutdown(boolean)"><code>shutdown(boolean)</code></a> with <code>true</code>.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#shutdown(boolean)" class="member-name-link">shutdown</a><wbr>(boolean mayInterruptIfRunning)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Completely shutdown the ScheduleChore, which means we will call cleanup and you should not |
| schedule it again.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">toString</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">A summation of this chore in human readable format.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#triggerNow()" class="member-name-link">triggerNow</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns false when the Chore is not currently scheduled with a ChoreService</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>private void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#updateTimeTrackingBeforeRun()" class="member-name-link">updateTimeTrackingBeforeRun</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Update our time tracking members.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <li> |
| <section class="field-details" id="field-detail"> |
| <h2>Field Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="LOG"> |
| <h3>LOG</h3> |
| <div class="member-signature"><span class="modifiers">private static final</span> <span class="return-type">org.slf4j.Logger</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-43">LOG</a></span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="name"> |
| <h3>name</h3> |
| <div class="member-signature"><span class="modifiers">private final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-45">name</a></span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="DEFAULT_TIME_UNIT"> |
| <h3>DEFAULT_TIME_UNIT</h3> |
| <div class="member-signature"><span class="modifiers">private static final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/TimeUnit.html" title="class or interface in java.util.concurrent" class="external-link">TimeUnit</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-50">DEFAULT_TIME_UNIT</a></span></div> |
| <div class="block">Default values for scheduling parameters should they be excluded during construction</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="DEFAULT_INITIAL_DELAY"> |
| <h3>DEFAULT_INITIAL_DELAY</h3> |
| <div class="member-signature"><span class="modifiers">private static final</span> <span class="return-type">long</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-51">DEFAULT_INITIAL_DELAY</a></span></div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="../../../../constant-values.html#org.apache.hadoop.hbase.ScheduledChore.DEFAULT_INITIAL_DELAY">Constant Field Values</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="period"> |
| <h3>period</h3> |
| <div class="member-signature"><span class="modifiers">private final</span> <span class="return-type">int</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-56">period</a></span></div> |
| <div class="block">Scheduling parameters. Used by ChoreService when scheduling the chore to run periodically</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="timeUnit"> |
| <h3>timeUnit</h3> |
| <div class="member-signature"><span class="modifiers">private final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/TimeUnit.html" title="class or interface in java.util.concurrent" class="external-link">TimeUnit</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-57">timeUnit</a></span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="initialDelay"> |
| <h3>initialDelay</h3> |
| <div class="member-signature"><span class="modifiers">private final</span> <span class="return-type">long</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-58">initialDelay</a></span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="choreService"> |
| <h3>choreService</h3> |
| <div class="member-signature"><span class="modifiers">private</span> <span class="return-type"><a href="ChoreService.html" title="class in org.apache.hadoop.hbase">ChoreService</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-64">choreService</a></span></div> |
| <div class="block">Interface to the ChoreService that this ScheduledChore is scheduled with. null if the chore is |
| not scheduled.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="timeOfLastRun"> |
| <h3>timeOfLastRun</h3> |
| <div class="member-signature"><span class="modifiers">private</span> <span class="return-type">long</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-69">timeOfLastRun</a></span></div> |
| <div class="block">Variables that encapsulate the meaningful state information</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="timeOfThisRun"> |
| <h3>timeOfThisRun</h3> |
| <div class="member-signature"><span class="modifiers">private</span> <span class="return-type">long</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-70">timeOfThisRun</a></span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="initialChoreComplete"> |
| <h3>initialChoreComplete</h3> |
| <div class="member-signature"><span class="modifiers">private</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-71">initialChoreComplete</a></span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="stopper"> |
| <h3>stopper</h3> |
| <div class="member-signature"><span class="modifiers">private final</span> <span class="return-type"><a href="Stoppable.html" title="interface in org.apache.hadoop.hbase">Stoppable</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-79">stopper</a></span></div> |
| <div class="block">A means by which a ScheduledChore can be stopped. Once a chore recognizes that it has been |
| stopped, it will cancel itself. This is particularly useful in the case where a single stopper |
| instance is given to multiple chores. In such a case, a single <a href="Stoppable.html#stop(java.lang.String)"><code>Stoppable.stop(String)</code></a> |
| command can cause many chores to stop together.</div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li> |
| <section class="constructor-details" id="constructor-detail"> |
| <h2>Constructor Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="<init>()"> |
| <h3>ScheduledChore</h3> |
| <div class="member-signature"><span class="annotations">@Private |
| </span><span class="modifiers">protected</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-86">ScheduledChore</a></span>()</div> |
| <div class="block">Construct a ScheduledChore |
| <p> |
| This constructor is for test only. It allows us to create an object and to call chore() on it.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(java.lang.String,org.apache.hadoop.hbase.Stoppable,int)"> |
| <h3>ScheduledChore</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-98">ScheduledChore</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="Stoppable.html" title="interface in org.apache.hadoop.hbase">Stoppable</a> stopper, |
| int period)</span></div> |
| <div class="block">Construct a ScheduledChore</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - Name assigned to Chore. Useful for identification amongst chores of the same |
| type</dd> |
| <dd><code>stopper</code> - When <a href="Stoppable.html#isStopped()"><code>Stoppable.isStopped()</code></a> is true, this chore will cancel and cleanup</dd> |
| <dd><code>period</code> - Period in millis with which this Chore repeats execution when scheduled.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(java.lang.String,org.apache.hadoop.hbase.Stoppable,int,long)"> |
| <h3>ScheduledChore</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-113">ScheduledChore</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="Stoppable.html" title="interface in org.apache.hadoop.hbase">Stoppable</a> stopper, |
| int period, |
| long initialDelay)</span></div> |
| <div class="block">Construct a ScheduledChore</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - Name assigned to Chore. Useful for identification amongst chores of the |
| same type</dd> |
| <dd><code>stopper</code> - When <a href="Stoppable.html#isStopped()"><code>Stoppable.isStopped()</code></a> is true, this chore will cancel and |
| cleanup</dd> |
| <dd><code>period</code> - Period in millis with which this Chore repeats execution when scheduled.</dd> |
| <dd><code>initialDelay</code> - Delay before this Chore begins to execute once it has been scheduled. A |
| value of 0 means the chore will begin to execute immediately. Negative |
| delays are invalid and will be corrected to a value of 0.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(java.lang.String,org.apache.hadoop.hbase.Stoppable,int,long,java.util.concurrent.TimeUnit)"> |
| <h3>ScheduledChore</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-131">ScheduledChore</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="Stoppable.html" title="interface in org.apache.hadoop.hbase">Stoppable</a> stopper, |
| int period, |
| long initialDelay, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/TimeUnit.html" title="class or interface in java.util.concurrent" class="external-link">TimeUnit</a> unit)</span></div> |
| <div class="block">Construct a ScheduledChore</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - Name assigned to Chore. Useful for identification amongst chores of the |
| same type</dd> |
| <dd><code>stopper</code> - When <a href="Stoppable.html#isStopped()"><code>Stoppable.isStopped()</code></a> is true, this chore will cancel and |
| cleanup</dd> |
| <dd><code>period</code> - Period in Timeunit unit with which this Chore repeats execution when |
| scheduled.</dd> |
| <dd><code>initialDelay</code> - Delay in Timeunit unit before this Chore begins to execute once it has been |
| scheduled. A value of 0 means the chore will begin to execute immediately. |
| Negative delays are invalid and will be corrected to a value of 0.</dd> |
| <dd><code>unit</code> - The unit that is used to measure period and initialDelay</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="run()"> |
| <h3>run</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-140">run</a></span>()</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Runnable.html#run()" title="class or interface in java.lang" class="external-link">run</a></code> in interface <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Runnable.html" title="class or interface in java.lang" class="external-link">Runnable</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="updateTimeTrackingBeforeRun()"> |
| <h3>updateTimeTrackingBeforeRun</h3> |
| <div class="member-signature"><span class="modifiers">private</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-181">updateTimeTrackingBeforeRun</a></span>()</div> |
| <div class="block">Update our time tracking members. Called at the start of an execution of this chore's run() |
| method so that a correct decision can be made as to whether or not we missed the start time</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="onChoreMissedStartTime()"> |
| <h3>onChoreMissedStartTime</h3> |
| <div class="member-signature"><span class="modifiers">private</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-191">onChoreMissedStartTime</a></span>()</div> |
| <div class="block">Notify the ChoreService that this chore has missed its start time. Allows the ChoreService to |
| make the decision as to whether or not it would be worthwhile to increase the number of core |
| pool threads</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getTimeBetweenRuns()"> |
| <h3>getTimeBetweenRuns</h3> |
| <div class="member-signature"><span class="return-type">long</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-201">getTimeBetweenRuns</a></span>()</div> |
| <div class="block">Return how long in millis has it been since this chore last run. Useful for checking if the |
| chore has missed its scheduled start time by too large of a margin</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="missedStartTime()"> |
| <h3>missedStartTime</h3> |
| <div class="member-signature"><span class="modifiers">private</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-206">missedStartTime</a></span>()</div> |
| <div class="block">Returns true when the time between runs exceeds the acceptable threshold</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getMaximumAllowedTimeBetweenRuns()"> |
| <h3>getMaximumAllowedTimeBetweenRuns</h3> |
| <div class="member-signature"><span class="modifiers">private</span> <span class="return-type">double</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-212">getMaximumAllowedTimeBetweenRuns</a></span>()</div> |
| <div class="block">Returns max allowed time in millis between runs.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isValidTime(long)"> |
| <h3>isValidTime</h3> |
| <div class="member-signature"><span class="modifiers">private</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-218">isValidTime</a></span><wbr><span class="parameters">(long time)</span></div> |
| <div class="block">Return true if time is earlier or equal to current time</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="triggerNow()"> |
| <h3>triggerNow</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-223">triggerNow</a></span>()</div> |
| <div class="block">Returns false when the Chore is not currently scheduled with a ChoreService</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setChoreService(org.apache.hadoop.hbase.ChoreService)"> |
| <h3>setChoreService</h3> |
| <div class="member-signature"><span class="return-type">void</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-231">setChoreService</a></span><wbr><span class="parameters">(<a href="ChoreService.html" title="class in org.apache.hadoop.hbase">ChoreService</a> service)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="cancel()"> |
| <h3>cancel</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-238">cancel</a></span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="cancel(boolean)"> |
| <h3>cancel</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-242">cancel</a></span><wbr><span class="parameters">(boolean mayInterruptIfRunning)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getName()"> |
| <h3>getName</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-249">getName</a></span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getStopper()"> |
| <h3>getStopper</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Stoppable.html" title="interface in org.apache.hadoop.hbase">Stoppable</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-253">getStopper</a></span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getPeriod()"> |
| <h3>getPeriod</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-258">getPeriod</a></span>()</div> |
| <div class="block">Returns period to execute chore in getTimeUnit() units</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getInitialDelay()"> |
| <h3>getInitialDelay</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">long</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-263">getInitialDelay</a></span>()</div> |
| <div class="block">Returns initial delay before executing chore in getTimeUnit() units</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getTimeUnit()"> |
| <h3>getTimeUnit</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/TimeUnit.html" title="class or interface in java.util.concurrent" class="external-link">TimeUnit</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-267">getTimeUnit</a></span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isInitialChoreComplete()"> |
| <h3>isInitialChoreComplete</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-271">isInitialChoreComplete</a></span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getChoreService()"> |
| <h3>getChoreService</h3> |
| <div class="member-signature"><span class="return-type"><a href="ChoreService.html" title="class in org.apache.hadoop.hbase">ChoreService</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-275">getChoreService</a></span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getTimeOfLastRun()"> |
| <h3>getTimeOfLastRun</h3> |
| <div class="member-signature"><span class="return-type">long</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-279">getTimeOfLastRun</a></span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getTimeOfThisRun()"> |
| <h3>getTimeOfThisRun</h3> |
| <div class="member-signature"><span class="return-type">long</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-283">getTimeOfThisRun</a></span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isScheduled()"> |
| <h3>isScheduled</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-288">isScheduled</a></span>()</div> |
| <div class="block">Returns true when this Chore is scheduled with a ChoreService</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="choreForTesting()"> |
| <h3>choreForTesting</h3> |
| <div class="member-signature"><span class="annotations">@Private |
| </span><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-292">choreForTesting</a></span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="chore()"> |
| <h3>chore</h3> |
| <div class="member-signature"><span class="modifiers">protected abstract</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-300">chore</a></span>()</div> |
| <div class="block">The task to execute on each scheduled execution of the Chore</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="initialChore()"> |
| <h3>initialChore</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-306">initialChore</a></span>()</div> |
| <div class="block">Override to run a task before we start looping.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>true if initial chore was successful</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="cleanup()"> |
| <h3>cleanup</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-314">cleanup</a></span>()</div> |
| <div class="block">Override to run cleanup tasks when the Chore encounters an error and must stop running</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="shutdown()"> |
| <h3>shutdown</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-321">shutdown</a></span>()</div> |
| <div class="block">Call <a href="#shutdown(boolean)"><code>shutdown(boolean)</code></a> with <code>true</code>.</div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#shutdown(boolean)"><code>shutdown(boolean)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="shutdown(boolean)"> |
| <h3>shutdown</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-331">shutdown</a></span><wbr><span class="parameters">(boolean mayInterruptIfRunning)</span></div> |
| <div class="block">Completely shutdown the ScheduleChore, which means we will call cleanup and you should not |
| schedule it again. |
| <p/> |
| This is another path to cleanup the chore, comparing to stop the stopper instance passed in.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="toString()"> |
| <h3>toString</h3> |
| <div class="member-signature"><span class="annotations">@Private |
| </span><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name"><a href="../../../../src-html/org/apache/hadoop/hbase/ScheduledChore.html#line-341">toString</a></span>()</div> |
| <div class="block">A summation of this chore in human readable format. Downstream users should not presume parsing |
| of this string can relaibly be done between versions. Instead, they should rely on the public |
| accessor methods to get the information they desire.</div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a></code> in class <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><small>Copyright © 2007–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |