Package org.vrspace.server.core
Class WriteBack
- java.lang.Object
-
- org.vrspace.server.core.WriteBack
-
@Component public class WriteBack extends Object
Experimental thread-safe write-back component. Clients may send more events than can be stored into the database. Typically, the most frequent events originate from client movement. While movement events need to be propagated, they doesn't need to be persisted each and every time, as long as client coordinates are consistent overall. This component collects all changed objects, and saves them after configurable delay, all in one one batch. Used by WorldManager.- Author:
- joe
- See Also:
WorldManager
-
-
Constructor Summary
Constructors Constructor Description WriteBack(VRObjectRepository db)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete(VRObject o)
void
flush()
long
getDelay()
boolean
isActive()
void
setActive(boolean active)
void
setDelay(long delay)
int
size()
void
write(VRObject o)
long
writeRequests()
long
writes()
-
-
-
Constructor Detail
-
WriteBack
public WriteBack(VRObjectRepository db)
-
-
Method Detail
-
flush
public void flush()
-
size
public int size()
-
writes
public long writes()
-
writeRequests
public long writeRequests()
-
write
public void write(VRObject o)
-
delete
public void delete(VRObject o)
-
setActive
public void setActive(boolean active)
-
isActive
public boolean isActive()
-
setDelay
public void setDelay(long delay)
-
getDelay
public long getDelay()
-
-