org.hd.d.pg2k.svrCore.vars
Interface SimpleVariablePipelineIF

All Superinterfaces:
BasicVarMgrInterface
All Known Subinterfaces:
ExhibitPipelineReducedExceptionIF, SimpleExhibitPipelineIF
All Known Implementing Classes:
AHStandaloneMain.FakeTunnel, DataSourceBean, ExhibitDataFileSource, ExhibitDataHTTPTunnelSource, ExhibitDataSimpleCache, ExhibitDataTunnelSource, PipelineVarMgr, SimpleCacheTest.DataConcurrencyAccessMonitor, SimpleCacheTest.DummyDataSource, SimpleCacheTest.RawDataAccessMonitor, SimpleExhibitPipelineFilter, SystemVariablesTest.BasicVarMgrEndpoint, SystemVariablesTest.EventValueRequestMonitor, SystemVariablesTest.LocalTunnelSource, SystemVariablesTest.TestVarCacheStage

public interface SimpleVariablePipelineIF
extends BasicVarMgrInterface

Simple interface implemented by several stages in the Web distributed-variable-handling pipeline. The pipeline stages that implement this may well implement other interfaces in parallel to provide richer and more efficient cacheing, etc.


Method Summary
 void syncVariables(boolean force)
          Synchronise variables with upstream values.
 
Methods inherited from interface org.hd.d.pg2k.svrCore.vars.BasicVarMgrInterface
getEventValue, getEventValues, getVariable, getVariables, setVariable, setVariables
 

Method Detail

syncVariables

void syncVariables(boolean force)
                   throws java.io.IOException
Synchronise variables with upstream values. Pushes updated values upstream to the source, calls sync on the source if called with the "force" argument true, and then retrieves changed values from upstream.

When called with force==true, this acts like a full "memory barrier", flushing all write-cached items downstream immediately and afterwards getting the value of all upstream values with getVariables(-1), but may be expensive in terms of CPU or bandwidth, so use sparingly.

When called with force==false, this incrementally flushes outstanding writes and will then fetch all, or only new, values from upstream, so is potentially much less resource-intensive. In particular, this does not propagate the sync() upstream.

In any case, it is rarely the right thing for a casual user to call this as it may be very expensive.

Parameters:
force - if true, this will force a full write flush, a full sync upstream, then full read with getVariables(-1), to get the effect of a full "barrier"; otherwise, in general, a more incremental and non-propagating mode is used which still does a write flush but may chose to do a partial read of "new" upstream values
Throws:
java.io.IOException - if one is received from upstream

DHD Multimedia Gallery V1.60.69

Copyright (c) 1996-2012, Damon Hart-Davis. All rights reserved.