Search in sources :

Example 1 with ClusterEntryImpl

use of lucee.runtime.type.scope.ClusterEntryImpl in project Lucee by lucee.

the class Admin method _doSetCluster.

private void _doSetCluster() throws PageException {
    Struct entries = Caster.toStruct(getObject("admin", action, "entries"));
    Struct entry;
    Iterator<Object> it = entries.valueIterator();
    Cluster cluster = pageContext.clusterScope();
    while (it.hasNext()) {
        entry = Caster.toStruct(it.next());
        cluster.setEntry(new ClusterEntryImpl(KeyImpl.getInstance(Caster.toString(entry.get(KeyConstants._key))), Caster.toSerializable(entry.get(KeyConstants._value, null), null), Caster.toLongValue(entry.get(KeyConstants._time))));
    }
    cluster.broadcast();
}
Also used : ClusterEntryImpl(lucee.runtime.type.scope.ClusterEntryImpl) Cluster(lucee.runtime.type.scope.Cluster) Struct(lucee.runtime.type.Struct)

Aggregations

Struct (lucee.runtime.type.Struct)1 Cluster (lucee.runtime.type.scope.Cluster)1 ClusterEntryImpl (lucee.runtime.type.scope.ClusterEntryImpl)1