MCPcopy Create free account
hub / github.com/apache/mesos / expunge

Method expunge

src/java/src/org/apache/mesos/state/AbstractState.java:129–172  ·  view source on GitHub ↗
(Variable variable)

Source from the content-addressed store, hash-verified

127 }
128
129 @Override
130 public Future<Boolean> expunge(Variable variable) {
131 if (!MesosNativeLibrary.version().before(MESOS_2161_JIRA_FIX_VERSION)) {
132 return new ExpungeFuture(variable);
133 }
134
135 // TODO(jmlvanre): Deprecate anonymous future in 0.24 (MESOS-2161).
136 final long future = __expunge(variable); // Asynchronously start the operation.
137 return new Future<Boolean>() {
138 @Override
139 public boolean cancel(boolean mayInterruptIfRunning) {
140 if (mayInterruptIfRunning) {
141 return __expunge_cancel(future);
142 }
143 return false; // Should not interrupt and already running (or finished).
144 }
145
146 @Override
147 public boolean isCancelled() {
148 return __expunge_is_cancelled(future);
149 }
150
151 @Override
152 public boolean isDone() {
153 return __expunge_is_done(future);
154 }
155
156 @Override
157 public Boolean get() throws InterruptedException, ExecutionException {
158 return __expunge_get(future);
159 }
160
161 @Override
162 public Boolean get(long timeout, TimeUnit unit)
163 throws InterruptedException, ExecutionException, TimeoutException {
164 return __expunge_get_timeout(future, timeout, unit);
165 }
166
167 @Override
168 protected void finalize() {
169 __expunge_finalize(future);
170 }
171 };
172 }
173
174 public Future<Iterator<String>> names() {
175 if (!MesosNativeLibrary.version().before(MESOS_2161_JIRA_FIX_VERSION)) {

Callers

nothing calls this directly

Calls 2

__expungeMethod · 0.95
versionMethod · 0.80

Tested by

no test coverage detected