put method

AsyncReply<bool> put(
  1. IResource resource
)
override
Resource interface Resource trigger. Store interface. Resource.

Implementation

//AsyncReply<bool> trigger(ResourceTrigger trigger)
//{
//  return new AsyncReply<bool>();
//}

/// <summary>
/// Store interface.
/// </summary>
/// <param name="resource">Resource.</param>
/// <returns></returns>
AsyncReply<bool> put(IResource resource) {
  if (Codec.isLocalResource(resource, this))
    _resources.add((resource as DistributedResource).id as int, resource);
  // else .. put it in the server....
  return AsyncReply.ready(true);
}