| org.space4j.Space4J
All known Subclasses: org.space4j.implementation.SimpleSpace4J,
Space4J | public interface Space4J (Code) | | Our database of objects in RAM. Clients will use the Space4J object to execute Commands in the
underlying space. Space4J will be running in the same Virtual Machine the client is running, in other words, the client will be
able to access the Space4J directly in memomy. No need for remote calls !!!
|
Method Summary | |
public int | executeCommand(Command cmd, boolean log) Executes a command on the underlying Space.
The client must use this method to perform any update on the Space.
The client must never do any modifications on the Space objects without using this method.
Space4J will execute the command and log the changes for future recovery if needed.
OBS: Logging is done AFTER the command is executed. | public int | executeCommand(Command cmd) Executes a command on the underlying Space.
The client must use this method to perform any update on the Space.
The client must never do any modifications on the Space objects without using this method.
Space4J will execute the command and log the changes for future recovery if needed.
OBS: Logging is done AFTER the command is executed. | public void | executeSnapshot() Take a snapshot of the Space to disk. | public String | getDirName() Get the directory name where this Space4J is saving its data. | public IndexManager | getIndexManager() Get the IndexManager for this Space4J. | public Space | getSpace() | public void | start() Starts the Space4J. |
executeCommand | public int executeCommand(Command cmd, boolean log) throws CommandException, LoggerException(Code) | | Executes a command on the underlying Space.
The client must use this method to perform any update on the Space.
The client must never do any modifications on the Space objects without using this method.
Space4J will execute the command and log the changes for future recovery if needed.
OBS: Logging is done AFTER the command is executed. If, for some reason, a CommandException is thrown, the command will not be logged.
Parameters: cmd - The command to execute. Parameters: log - A flag indicating whether this command should be logged or not. An int containing the number of objects modified by this operation. throws: CommandException - if there is a problem executing this command throws: LoggerException - if there is a problem logging thie command |
executeCommand | public int executeCommand(Command cmd) throws CommandException, LoggerException(Code) | | Executes a command on the underlying Space.
The client must use this method to perform any update on the Space.
The client must never do any modifications on the Space objects without using this method.
Space4J will execute the command and log the changes for future recovery if needed.
OBS: Logging is done AFTER the command is executed. If, for some reason, a CommandException is thrown, the command will not be logged.
Parameters: cmd - The command to execute. An int containing the number of objects modified by this operation. throws: CommandException - if there is a problem executing this command throws: LoggerException - if there is a problem logging thie command |
executeSnapshot | public void executeSnapshot() throws LoggerException(Code) | | Take a snapshot of the Space to disk. The Space will be serialized and written to disk.
|
getDirName | public String getDirName()(Code) | | Get the directory name where this Space4J is saving its data.
The name of the dir |
getIndexManager | public IndexManager getIndexManager()(Code) | | Get the IndexManager for this Space4J.
A IndexManager is responsible for managing Indexes.
The IndexManager for this Space4J. |
getSpace | public Space getSpace()(Code) | | Returns the Space where the Objects are stored, so the client can direct access them.
a Space if Space4J is running locally or null otherwise |
|
|