org.apache.mesos.state
Class InMemoryState

java.lang.Object
  extended by org.apache.mesos.state.InMemoryState
All Implemented Interfaces:
State

public class InMemoryState
extends Object
implements State

An in-memory implementation of state.


Constructor Summary
InMemoryState()
           
 
Method Summary
 Future<Boolean> expunge(Variable v)
          Returns true if successfully expunged the variable from the state or false if the variable did not exist or was no longer valid.
 Future<Variable> fetch(String name)
          Returns an immutable "variable" representing the current value from the state associated with the specified name.
 Future<Iterator<String>> names()
          Returns an iterator of variable names in the state.
 Future<Variable> store(Variable v)
          Returns an immutable "variable" representing the current value in the state if updating the specified variable in the state was successful, otherwise returns null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InMemoryState

public InMemoryState()
Method Detail

fetch

public Future<Variable> fetch(String name)
Description copied from interface: State
Returns an immutable "variable" representing the current value from the state associated with the specified name.

Specified by:
fetch in interface State

store

public Future<Variable> store(Variable v)
Description copied from interface: State
Returns an immutable "variable" representing the current value in the state if updating the specified variable in the state was successful, otherwise returns null.

Specified by:
store in interface State

expunge

public Future<Boolean> expunge(Variable v)
Description copied from interface: State
Returns true if successfully expunged the variable from the state or false if the variable did not exist or was no longer valid.

Specified by:
expunge in interface State

names

public Future<Iterator<String>> names()
Description copied from interface: State
Returns an iterator of variable names in the state.

Specified by:
names in interface State


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.